Skip to main content

Moip API wrapper for asyncio/aiohttp

Project description

async_moip

asyncio/aiohttp (Python3.5+) Moip API wrapper based on moip providing asyncronous requests.

Usage

import async_moip
import aiohttp
import asyncio

async def main():
    moip = async_moip.Moip(environment='<production or sandbox', key='<key>', token='<token>')
    order = await moip.get_order('ORD-W121212121')
    print(order)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Functions

post_customer(params) # create new customer 
get_customer(parameters) # get customer data
post_creditcard(customer_id, parameters) # add new credit card to customer account
delete_creditcard(creditcard_id) # delete credit card
post_order(parameters) # create a new order
get_order(order_id) # get order by id
post_payment(order_id, parameters) # create a payment
get_payment(payment_id) # get payment data by id
capture_payment(payment_id) # capture of a preauthorized payment
void_payment(payment_id) # cancel the capture of a preauthorized payment
account_exists(account_id) # check if account exists

params examples here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_moip-0.0.4.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

async_moip-0.0.4-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page