Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions method/resources/Accounts/Updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class AccountUpdate(TypedDict):
mortgage: Optional[AccountLiabilityMortgage]
personal_loan: Optional[AccountLiabilityPersonalLoan]
student_loans: Optional[AccountLiabilityStudentLoans]
data_as_of: Optional[str]
error: Optional[ResourceError]
created_at: str
updated_at: str
Expand Down
10 changes: 9 additions & 1 deletion method/resources/Payments/Payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
'reversed',
'reversal_required',
'reversal_processing',
'settled'
'settled',
'cashed'
]


Expand Down Expand Up @@ -44,6 +45,12 @@
]


PaymentDestinationPaymentMethodsLiterals = Literal[
'paper',
'electronic'
]


class PaymentFee(TypedDict):
type: PaymentFeeTypesLiterals
amount: int
Expand All @@ -67,6 +74,7 @@ class Payment(TypedDict):
destination_settlement_date: Optional[str]
source_status: PaymentStatusesLiterals
destination_status: PaymentStatusesLiterals
destination_payment_method: Optional[PaymentDestinationPaymentMethodsLiterals]
fee: Optional[PaymentFee]
type: PaymentTypesLiterals
created_at: str
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='method-python',
version='1.1.8',
version='1.1.9',
description='Python library for the Method API',
long_description='Python library for the Method API',
long_description_content_type='text/x-rst',
Expand Down
5 changes: 5 additions & 0 deletions test/resources/Account_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ def setup():
'holder_id': holder_1_response['id'],
'liability.type': 'credit_card',
'liability.mch_id': 'mch_302086',
'status': 'active',
})
test_credit_card_account = test_credit_card_accounts[0]

test_auto_loan_accounts = method.accounts.list({
'holder_id': holder_1_response['id'],
'liability.type': 'auto_loan',
'liability.mch_id': 'mch_2347',
'status': 'active',
})
test_auto_loan_account = test_auto_loan_accounts[0]

Expand Down Expand Up @@ -802,6 +804,7 @@ def test_create_updates(setup):
'credit_limit': None,
'usage_pattern': None
},
'data_as_of': None,
'error': None,
'created_at': create_updates_response['created_at'],
'updated_at': create_updates_response['updated_at'],
Expand Down Expand Up @@ -840,6 +843,7 @@ def get_updates():
'credit_limit': 2800000,
'usage_pattern': None
},
'data_as_of': None,
'error': None,
'created_at': updates_retrieve_response['created_at'],
'updated_at': updates_retrieve_response['updated_at'],
Expand Down Expand Up @@ -878,6 +882,7 @@ def test_list_updates_for_account(setup):
'credit_limit': 2800000,
'usage_pattern': None
},
'data_as_of': None,
'error': None,
'created_at': update_to_check['created_at'] if update_to_check else None,
'updated_at': update_to_check['updated_at'] if update_to_check else None
Expand Down
2 changes: 1 addition & 1 deletion test/resources/Entity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def test_update_entity():
def test_list_entities():
global entities_list_response
# list only those entities created in past hour, in the format of YYYY-MM-DD
from_date = (datetime.now() - timedelta(hours=1)).strftime('%Y-%m-%dT%H:%M:%S.000Z')
from_date = (datetime.now() - timedelta(hours=1)).strftime('%Y-%m-%d')
entities_list_response = method.entities.list({'from_date': from_date})
entities_list_response = [entity['id'] for entity in entities_list_response]

Expand Down