|
1 | 1 | from starkcore.utils.resource import Resource
|
| 2 | +from starkcore.utils.checks import check_datetime |
2 | 3 |
|
3 | 4 | class Purchase(Resource):
|
4 | 5 | """# Purchase object
|
5 | 6 | Check out our API Documentation at https://starkbank.com/docs/api#merchant-session
|
6 | 7 | """
|
7 | 8 |
|
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): |
9 | 10 | Resource.__init__(self, id=id)
|
10 | 11 |
|
11 | 12 | self.amount = amount
|
12 |
| - self.installment_count = installment_count |
13 | 13 | self.card_expiration = card_expiration
|
14 | 14 | self.card_number = card_number
|
15 | 15 | self.card_security_code = card_security_code
|
16 | 16 | self.holder_name = holder_name
|
| 17 | + self.funding_type = funding_type |
17 | 18 | self.holder_email = holder_email
|
18 | 19 | self.holder_phone = holder_phone
|
19 |
| - self.funding_type = funding_type |
| 20 | + self.installment_count = installment_count |
20 | 21 | self.billing_country_code = billing_country_code
|
21 | 22 | self.billing_city = billing_city
|
22 | 23 | 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 |
25 | 26 | self.billing_zip_code = billing_zip_code
|
26 | 27 | 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 | + |
27 | 42 |
|
28 | 43 | _resource = {"class": Purchase, "name": "Purchase"}
|
29 | 44 |
|
0 commit comments