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 details)
Built Distribution
File details
Details for the file async_moip-0.0.4.tar.gz
.
File metadata
- Download URL: async_moip-0.0.4.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12722376b1ad4af53fb8247f9ebb82b534f3b3d8ed4cee88401916ca7d8a8268 |
|
MD5 | be0f53d88614badfe24e003d0fcb787e |
|
BLAKE2b-256 | 44cd7442f3fb177cfcd7606f884f080ecac287827e59d9d6b91b7d5e8d0e0912 |
File details
Details for the file async_moip-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: async_moip-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6863dae33bd35498c61db25978ab169bfc227cac955c47855cb87f0afd2d4eae |
|
MD5 | f0f86332afc70bc0c74cae23cea87b11 |
|
BLAKE2b-256 | c63a374778c239512ddd046345736a09d205379622a40574c7dd295f5474b922 |