Skip to content

Commit ff8c219

Browse files
Fix variables
1 parent 7a600d9 commit ff8c219

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

starkbank/merchantinstallment/__merchantinstallment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class MerchantInstallment(Resource):
77
Check out our API Documentation at https://starkbank.com/docs/api#merchant-installment
88
"""
99

10-
def __init__(self, amount=None, created=None, due=None, fee=None, funding_type=None, network=None, purchase_id=None, status=None, tags=None, transaction_ids=None, updated=None):
10+
def __init__(self, id=None, amount=None, created=None, due=None, fee=None, funding_type=None, network=None, purchase_id=None, status=None, tags=None, transaction_ids=None, updated=None):
1111
Resource.__init__(self, id=id)
1212

1313
self.amount = amount

starkbank/merchantpurchase/__merchantpurchase.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MerchantPurchase(Resource):
1010

1111
def __init__(self, amount, card_id, funding_type, installment_count, id=None, card_expiration=None, card_number=None, card_security_code=None,
1212
holder_name=None, holder_email=None, holder_phone=None, billing_country_code=None, billing_city=None,
13-
billing_state_code=None, billing_street_line1=None, billing_street_line2=None, billing_zip_code=None, metadata=None,
13+
billing_state_code=None, billing_street_line_1=None, billing_street_line_2=None, billing_zip_code=None, metadata=None,
1414
card_ending=None, challenge_mode=None, challenge_url=None, created=None, currency_code=None, end_to_end_id=None,
1515
fee=None, network=None, source=None, status=None, tags=None, updated=None):
1616
Resource.__init__(self, id=id)
@@ -27,8 +27,8 @@ def __init__(self, amount, card_id, funding_type, installment_count, id=None, ca
2727
self.billing_country_code = billing_country_code
2828
self.billing_city = billing_city
2929
self.billing_state_code = billing_state_code
30-
self.billing_street_line1 = billing_street_line1
31-
self.billing_street_line2 = billing_street_line2
30+
self.billing_street_line_1 = billing_street_line_1
31+
self.billing_street_line_2 = billing_street_line_2
3232
self.billing_zip_code = billing_zip_code
3333
self.metadata = metadata
3434
self.card_ending = card_ending
+20-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,44 @@
11
from starkcore.utils.resource import Resource
2+
from starkcore.utils.checks import check_datetime
23

34
class Purchase(Resource):
45
"""# Purchase object
56
Check out our API Documentation at https://starkbank.com/docs/api#merchant-session
67
"""
78

8-
def __init__(self, amount, card_expiration, card_number, card_security_code, holder_name, funding_type, id=None, holder_email=None, holder_phone=None, installment_count=None, billing_country_code=None, billing_city=None, billing_state_code=None, billing_street_line1=None, billing_street_line2=None, billing_zip_code=None, metadata=None):
9+
def __init__(self, amount, card_expiration, card_number, card_security_code, holder_name, funding_type, id=None, holder_email=None, holder_phone=None, installment_count=None, billing_country_code=None, billing_city=None, billing_state_code=None, billing_street_line_1=None, billing_street_line_2=None, billing_zip_code=None, metadata=None, card_ending=None, card_id=None, challenge_mode=None, challenge_url=None, created=None, currency_code=None, end_to_end_id=None, fee=None, network=None, source=None, status=None, tags=None, updated=None):
910
Resource.__init__(self, id=id)
1011

1112
self.amount = amount
12-
self.installment_count = installment_count
1313
self.card_expiration = card_expiration
1414
self.card_number = card_number
1515
self.card_security_code = card_security_code
1616
self.holder_name = holder_name
17+
self.funding_type = funding_type
1718
self.holder_email = holder_email
1819
self.holder_phone = holder_phone
19-
self.funding_type = funding_type
20+
self.installment_count = installment_count
2021
self.billing_country_code = billing_country_code
2122
self.billing_city = billing_city
2223
self.billing_state_code = billing_state_code
23-
self.billing_street_line1 = billing_street_line1
24-
self.billing_street_line2 = billing_street_line2
24+
self.billing_street_line_1 = billing_street_line_1
25+
self.billing_street_line_2 = billing_street_line_2
2526
self.billing_zip_code = billing_zip_code
2627
self.metadata = metadata
28+
self.card_ending = card_ending
29+
self.card_id = card_id
30+
self.challenge_mode = challenge_mode
31+
self.challenge_url = challenge_url
32+
self.created = check_datetime(created)
33+
self.currency_code = currency_code
34+
self.end_to_end_id = end_to_end_id
35+
self.fee = fee
36+
self.network = network
37+
self.source = source
38+
self.status = status
39+
self.tags = tags
40+
self.updated = check_datetime(updated)
41+
2742

2843
_resource = {"class": Purchase, "name": "Purchase"}
2944

0 commit comments

Comments
 (0)