MTHMR CashBack Service
Project description
SDK for working with the MTHMR CashBack application.
Functional:
- get Token
- add customers data
- add transactions data
- read customers data
- read data on accrued cashbacks
Examples of using:
from mthmrcashback import mthmr_query
URL = "issued when connecting to the application"
APPLICATION_ID = "issued when connecting to the application"
APPLICATION_KEY = "issued when connecting to the application"
Token = mthmr_query.get_token(URL, APPLICATION_ID, APPLICATION_KEY)
# Adding Customers:
# "customer_id" - your internal customer_id
dataCustomers=[
{
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d",
"birthday": "1995-03-15",
"gender": "Male",
"location_id": 1
},
{
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d2",
"birthday": "1983-05-01",
"gender": "Female",
"location_id": 1
}
]
addCustomers = mthmr_query.add_customers(URL, Token, dataCustomers)
# Reading Customers:
customers = mthmr_query.get_customers(URL, Token)
# Adding Transactions:
# "customer_id" - your internal customer_id
# "transaction_id" - unique transaction ID
# "description" - description of the transaction
# "date" - transaction date GMT
# "merchant_id" - merchant ID,
# "category_id" - category ID,
# "amount" - transaction amount
# "location" - transaction location
dataTransactions=[
{
"transaction_id": "b65cca2a-6809-11ee-8c99-0242ac12001",
"description": "description",
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d",
"date": "2023-10-11T10:27:03.987662",
"merchant_id": 123,
"amount": 100
},
{
"transaction_id": "b65cca2a-6809-11ee-8c99-0242ac120003",
"description": "description",
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d",
"date": "2023-10-11T10:27:03.987662",
"merchant_id": 123,
"amount": 150
}
]
addTransactions = mthmr_query.add_transactions(URL, Token, dataTransactions)
# Receiving CashBack data:
# date_from = "2023-01-01"
# date_to = "2023-02-01"
cashBack = mthmr_query.get_cashbackpayments(URL, Token, date_from, date_to)
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
Built Distribution
File details
Details for the file mthmrcashbacksdk-0.0.3.tar.gz
.
File metadata
- Download URL: mthmrcashbacksdk-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc97065f300cd629e1d1880cc090047d8bc21b00c731f0208e30394838c13062 |
|
MD5 | c07e55fd4c4e4e6078268c64596f9e90 |
|
BLAKE2b-256 | 19b3c34f58d6958eaab67bfb8955ae018ab8354aa5d53647251d089d693f577c |
File details
Details for the file mthmrcashbacksdk-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mthmrcashbacksdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64aee870a8850c015cc02836fe8186b12d9f87ea3a57a50349c16183c25b2ec9 |
|
MD5 | fc0097683a0ca85a0e83fc277a76750d |
|
BLAKE2b-256 | 48fc0b77ba8108ff3f460bea23797556df2fd866f01e55532cdbe3d1849ba152 |