From 1e5f9dfd87db2c9f75761e5a2f8fe1285036400a Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Fri, 7 Feb 2025 12:34:27 -0600 Subject: [PATCH 1/2] payment dry-run --- method/resources/Payments/Payment.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/method/resources/Payments/Payment.py b/method/resources/Payments/Payment.py index 6b91e0c..4a5f232 100644 --- a/method/resources/Payments/Payment.py +++ b/method/resources/Payments/Payment.py @@ -80,6 +80,7 @@ class PaymentCreateOpts(TypedDict): description: str metadata: Optional[Dict[str, Any]] fee: Optional[PaymentFee] + dry_run: Optional[bool] class PaymentListOpts(ResourceListOpts): diff --git a/setup.py b/setup.py index 010375c..c99d8d5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='method-python', - version='1.1.7', + version='1.1.8', description='Python library for the Method API', long_description='Python library for the Method API', long_description_content_type='text/x-rst', From 7603e20dd77998841171ac9e4751637fe593ab7f Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Fri, 7 Feb 2025 12:42:54 -0600 Subject: [PATCH 2/2] fix tests --- test/resources/Entity_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/resources/Entity_test.py b/test/resources/Entity_test.py index e00e8b0..d7a584c 100644 --- a/test/resources/Entity_test.py +++ b/test/resources/Entity_test.py @@ -248,7 +248,8 @@ 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 - entities_list_response = method.entities.list( {'from_date': (datetime.now() - timedelta(hours=1)).strftime('%Y-%m-%d')} ) + from_date = (datetime.now() - timedelta(hours=1)).strftime('%Y-%m-%dT%H:%M:%S.000Z') + entities_list_response = method.entities.list({'from_date': from_date}) entities_list_response = [entity['id'] for entity in entities_list_response] assert entities_create_response['id'] in entities_list_response