Socket
Socket
Sign inDemoInstall

paggcerto-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paggcerto-python

Python bindings for Paggcerto API


Maintainers
1

Paggcerto Python API

The Paggcerto Python API provides convenient access to the Paggcerto API from applications written in the Python language.

Quick Install

This lib can be found on pip. To install it, use:

$ pip install paggcerto-python

Usage

Export environment variables

export PAGGCERTO_API_USER=...
export PAGGCERTO_API_PASSWORD=...
export PAGGCERTO_API_USE_SANDBOX=True

Creating a Client

import python_http_client
from paggcerto import PaggcertoAPIClient, Client, PersonType, SexType, PaymentMethodType

api = PaggcertoAPIClient()

client = Client(
    cpfCnpj="31618850075",
    name="Maria Joao dos Santos",
    sex=SexType.F,
    dateOfBirth="01/25/1978",
    phone="7927667035",
    cellphone="79993764596",
    email="saragabriellyribeiro_@zf.com",
    typePerson=PersonType.F,
    zipCode="49030-720",
    address="Avenida Tancredo Neves",
    number="10",
    complement="Próximo ao conjunto inácio barbosa",
    neighborhood="Inacio Barbosa",
    city="Aracaju",
    uf="SE",
    note="O cliente possui apenas um dependente.",
    paymentMethod=PaymentMethodType.C
)
try:
    response = api.client.core.client.register.post(request_body=client.get())
    print(response.to_dict['client']['publicId'])
except python_http_client.HTTPError as e:
    print(e.to_dict)

Adding a credit card

import python_http_client
from paggcerto import PaggcertoAPIClient, CreditCard, Expiration

api = PaggcertoAPIClient()

credit_card = CreditCard(
    numberCard="4329626344167265",
    name="Maria Joao dos Santos",
    cvv="345",
    publicIdClient="MAY0uoO7mTpO4tBnY"
    expiration=Expiration(month="11", year="21")
)
try:
    response = api.client.core.card.register.post(request_body=credit_card.get())
    print(response.to_dict['card']['publicId'])
except python_http_client.HTTPError as e:
    print(e.to_dict)

Documentation

  • Paggcerto API Docs

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc