interact with villa cart and ordering endpoints
Project description
SDK for villa e-commerce Backend
postman Terminal file
Full Documentation Here
How to use
- Create a bucket
- fill in the products
- modify the quantity and update products
- trigger conversion to cart referencing a bucket
SDK docs
from villaBackendSdk.basket import BasketSdk
basketSdk = BasketSdk(branch='dev')
inputDict = {
"basketId" : "1234",
"basketName" : "1234",
"ownerId" : "1234"
}
basketSdk.create(inputDict)
{'body': '{"result":{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]},"Metadata":{"ConsumedCapacity":{"TableName":"basket-table-dev","CapacityUnits":3.0}}}',
'statusCode': 200,
'headers': {}}
inputDict = {
'basketId': '1234',
'items': [{'sku':'123','quantity':-123},{'sku':'456','quantity':123}],
}
basketSdk.add(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"456","quantity":123}]}',
'statusCode': 200,
'headers': {}}
inputDict = {
'basketId': '1234',
'basketName': 'test',
'ownerId': '1234',
'items': [{'sku':'123234','quantity':123},{'sku':'456','quantity':123}]
}
basketSdk.update(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"123234","quantity":123},{"sku":"456","quantity":123}]}',
'statusCode': 200,
'headers': {}}
inputDict = {
'basketId': '1234',
}
basketSdk.get(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"123234","quantity":123},{"sku":"456","quantity":123}]}',
'statusCode': 200,
'headers': {}}
inputDict = {
'basketId': '1234'
}
basketSdk.empty(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]}',
'statusCode': 200,
'headers': {}}
inputDict = {
'basketId': '1234'
}
basketSdk.remove(inputDict)
{'body': '{"basketDeleted":{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]}}',
'statusCode': 200,
'headers': {}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
villaBackendSdk-0.0.1.tar.gz
(9.8 kB
view details)
Built Distribution
File details
Details for the file villaBackendSdk-0.0.1.tar.gz
.
File metadata
- Download URL: villaBackendSdk-0.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56283baa576bac5d3d27acce1735c7628455e81342c11e8d1bdf529a06e7cccf |
|
MD5 | 01039ee4f38e90677a7d89555a65cc5d |
|
BLAKE2b-256 | 2f224f5f0003350bd4147d710533e7d5b39e300d1bdd8d7d88c64cfe4d1e0766 |
File details
Details for the file villaBackendSdk-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: villaBackendSdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c1d3155612f6ac5775e808931fa9e64cc0c8d3cfeb23a0c11ee39110827b37 |
|
MD5 | 0a11cf26d0fd80f986cb2b550189a1d0 |
|
BLAKE2b-256 | c83f7603a0efa74821e1b4c57c07b0282fcdc6417b252a795401e7d1de889017 |