@@ -49,6 +49,32 @@ def get_eet_receipt_by_payment_id(self, id_payment):
4949 def find_eet_receipts_by_filter (self , filter ):
5050 return self ._api ('eet-receipts' , JSON , filter )
5151
52+ def create_supercash_coupon (self , base_coupon ):
53+ base_coupon .update ({'go_id' : self .gopay .config ['goid' ]})
54+ return self ._api ('supercash/coupon' , JSON , base_coupon )
55+
56+ def create_supercash_batch (self , base_batch ):
57+ base_batch .update ({'go_id' : self .gopay .config ['goid' ]})
58+ return self ._api ('supercash/coupon/batch' , JSON , base_batch )
59+
60+ def get_supercash_coupon_batch_status (self , batch_id ):
61+ return self ._api ('batch/' + str (batch_id ), FORM , None )
62+
63+ def get_supercash_coupon_batch (self , batch_id ):
64+ return self ._api ('supercash/coupon/find?batch_request_id=' + str (batch_id ) + '&go_id='
65+ + str (self .gopay .config ['goid' ]), FORM , None )
66+
67+ def find_supercash_coupons (self , paymentSessionId ):
68+ if type (paymentSessionId ) is list :
69+ ids_string = ',' .join (map (str , paymentSessionId ))
70+ else :
71+ ids_string = str (paymentSessionId )
72+ return self ._api ('supercash/coupon/find?payment_session_id_list=' + ids_string + '&go_id='
73+ + str (self .gopay .config ['goid' ]), FORM , None )
74+
75+ def get_supercash_coupon (self , coupon_id ):
76+ return self ._api ('supercash/coupon/' + str (coupon_id ), FORM , None )
77+
5278 def url_to_embedjs (self ):
5379 return self .gopay .url ('gp-gw/js/embed.js' )
5480
0 commit comments