diff --git a/method/resources/Accounts/Updates.py b/method/resources/Accounts/Updates.py index 663a5c4..d7c9d04 100644 --- a/method/resources/Accounts/Updates.py +++ b/method/resources/Accounts/Updates.py @@ -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 diff --git a/method/resources/Payments/Payment.py b/method/resources/Payments/Payment.py index 4a5f232..75a4e0e 100644 --- a/method/resources/Payments/Payment.py +++ b/method/resources/Payments/Payment.py @@ -16,7 +16,8 @@ 'reversed', 'reversal_required', 'reversal_processing', - 'settled' + 'settled', + 'cashed' ] @@ -44,6 +45,12 @@ ] +PaymentDestinationPaymentMethodsLiterals = Literal[ + 'paper', + 'electronic' +] + + class PaymentFee(TypedDict): type: PaymentFeeTypesLiterals amount: int @@ -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 diff --git a/setup.py b/setup.py index c99d8d5..f5bc969 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/test/resources/Account_test.py b/test/resources/Account_test.py index ae4a1f4..587b906 100644 --- a/test/resources/Account_test.py +++ b/test/resources/Account_test.py @@ -70,6 +70,7 @@ 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] @@ -77,6 +78,7 @@ def setup(): '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] @@ -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'], @@ -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'], @@ -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 diff --git a/test/resources/Entity_test.py b/test/resources/Entity_test.py index d7a584c..02589fa 100644 --- a/test/resources/Entity_test.py +++ b/test/resources/Entity_test.py @@ -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]