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"
applicationId = "issued when connecting to the application"
applicationKey = "issued when connecting to the application"
Token = mthmr_query.get_token(URL, applicationId, applicationKey)
# 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:
# "transaction_id" - unique transaction ID
# "description" - description of the transaction
# "customer_id" - your internal customer_id
# "date" - transaction date GMT
# "merchant_name" - merchant Name,
# "amount" - transaction amount
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_name": 'Merhant Name',
"amount": 100
},
{
"transaction_id": "b65cca2a-6809-11ee-8c99-0242ac120003",
"description": "description",
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d2",
"date": "2023-10-11T10:27:03.987662",
"merchant_name": 'Merhant Name',
"amount": 150
}
]
addTransactions = mthmr_query.add_transactions(URL, Token, dataTransactions)
# Adding Transactions History:
# "transaction_id" - unique transaction ID
# "description" - description of the transaction
# "customer_id" - your internal customer_id
# "date" - transaction date GMT
# "merchant_name" - merchant Name,
# "amount" - transaction amount
dataTransactionsHistory=[
{
"transaction_id": "b65cca2a-6809-11ee-8c99-0242ac12001",
"description": "description",
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d",
"date": "2023-10-11T10:27:03.987662",
"merchant_name": 'Merhant Name',
"amount": 100
},
{
"transaction_id": "b65cca2a-6809-11ee-8c99-0242ac120003",
"description": "description",
"customer_id": "a8de52aa-49e7-4e5c-bb66-1c82ac1d551d2",
"date": "2023-10-11T10:27:03.987662",
"merchant_name": 'Merhant Name',
"amount": 150
}
]
addTransactionsHistory = mthmr_query.add_transactions_history(URL, Token, dataTransactionsHistory)
# Receiving Active Offers data:
activeOffers = mthmr_query.get_active_offers(URL, Token)
# Receiving CashBack data:
# date_from = "2023-01-01"
# date_to = "2024-02-01"
cashBack = mthmr_query.get_cashback_payments(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.5.tar.gz
.
File metadata
- Download URL: mthmrcashbacksdk-0.0.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ecb7bbcf444b0632279b0b8257703051dfbd155f4269a66779684e5aa29ba2 |
|
MD5 | ce724b511b7da75a1972e658a642970e |
|
BLAKE2b-256 | 2f71ed295bd55dff1100ee0c36fb01096e29cf479dea52334ca288f78de95246 |
Provenance
File details
Details for the file mthmrcashbacksdk-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: mthmrcashbacksdk-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 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 | f08f6ee2a8abeaf8a36c07b62d4f02a2b5f1defa9f8cd18087d4b801c4e90d5a |
|
MD5 | 67255bda81821978fd51f05a342d7a43 |
|
BLAKE2b-256 | 3976408af138a6d09a0a8ea818dde708a04394161140118ee27adf0aa334620d |