Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7c5a17b

Browse files
committedFeb 11, 2025·
Add check_datetime
1 parent d3a3205 commit 7c5a17b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎starkbank/merchantcard/__merchantcard.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from starkcore.utils.resource import Resource
22
from ..utils import rest
3-
from starkcore.utils.checks import check_date
3+
from starkcore.utils.checks import check_date, check_datetime
44

55
class MerchantCard(Resource):
66
"""# MerchantCard object
@@ -16,8 +16,8 @@ def __init__(self, id=None, ending=None , funding_type=None, holder_name=None, n
1616
self.status = status
1717
self.tags = tags
1818
self.expiration = expiration
19-
self.created = created
20-
self.updated = updated
19+
self.created = check_datetime(created)
20+
self.updated = check_datetime(updated)
2121

2222
_resource = {"class": MerchantCard, "name": "MerchantCard"}
2323

‎starkbank/merchantinstallment/__merchantinstallment.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from starkcore.utils.resource import Resource
22
from ..utils import rest
3-
from starkcore.utils.checks import check_date
3+
from starkcore.utils.checks import check_date, check_datetime
44

55
class MerchantInstallment(Resource):
66
"""# MerchantInstallment object
@@ -11,7 +11,6 @@ def __init__(self, amount=None, created=None, due=None, fee=None, funding_type=N
1111
Resource.__init__(self, id=id)
1212

1313
self.amount = amount
14-
self.created = created
1514
self.due = due
1615
self.fee = fee
1716
self.funding_type = funding_type
@@ -20,7 +19,8 @@ def __init__(self, amount=None, created=None, due=None, fee=None, funding_type=N
2019
self.status = status
2120
self.tags = tags
2221
self.transaction_ids = transaction_ids
23-
self.updated = updated
22+
self.created = check_datetime(created)
23+
self.updated = check_datetime(updated)
2424

2525
_resource = {"class": MerchantInstallment, "name": "MerchantInstallment"}
2626

‎starkbank/merchantsession/__merchantsession.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from starkcore.utils.api import from_api_json
44
from .allowedinstallments.__allowedinstallments import AllowedInstallments
55
from .allowedinstallments.__allowedinstallments import _sub_resource as _allowed_installments_sub_resource
6-
from starkcore.utils.checks import check_date
6+
from starkcore.utils.checks import check_date, check_datetime
77
from .__purchase import _resource as purchase_resource
88

99

@@ -19,11 +19,11 @@ def __init__(self, allowed_funding_types, allowed_installments, expiration, id=N
1919
self.allowed_installments = _parse_allowed_installments(allowed_installments)
2020
self.allowed_ips = allowed_ips
2121
self.challenge_mode = challenge_mode
22-
self.created = created
2322
self.expiration = expiration
2423
self.status = status
2524
self.tags = tags
26-
self.updated = updated
25+
self.created = check_datetime(created)
26+
self.updated = check_datetime(updated)
2727
self.uuid = uuid
2828

2929
_resource = {"class": MerchantSession, "name": "MerchantSession"}

0 commit comments

Comments
 (0)
Please sign in to comment.