@@ -25,7 +25,7 @@ class pyCryptomusAPI:
25
25
26
26
def __init__ (self ,
27
27
merchant_uuid , payment_api_key = None , payout_api_key = None ,
28
- print_errors = False , timeout = None ):
28
+ print_errors = False , timeout = None , add_request_params = None ):
29
29
"""
30
30
Create the pyCryptomusAPI instance.
31
31
@@ -34,12 +34,14 @@ def __init__(self,
34
34
:param payout_api_key: API key for accepting payment and making payouts
35
35
:param print_errors: (Optional) Print dumps on request errors
36
36
:param timeout: (Optional) Request timeout
37
+ :param add_request_params: (List, Optional) Additional request parameters to pass with API calls
37
38
"""
38
39
self .merchant_uuid = merchant_uuid
39
40
self .payment_api_key = payment_api_key
40
41
self .payout_api_key = payout_api_key
41
42
self .print_errors = print_errors
42
43
self .timeout = timeout
44
+ self .add_request_params = add_request_params
43
45
if not (self .payment_api_key ) and not (self .payout_api_key ):
44
46
raise Exception ("You must specify at least one API key." )
45
47
@@ -56,6 +58,9 @@ def __request(self, method_url, mode, **kwargs):
56
58
else :
57
59
data = {}
58
60
61
+ if self .add_request_params :
62
+ data .update (self .add_request_params )
63
+
59
64
base_resp = None
60
65
try :
61
66
key = self .payment_api_key if (mode == 1 ) else self .payout_api_key
0 commit comments