From 78caa75d8d0f28769f5329a84ca6a544c1f31a00 Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 10:16:21 -0600 Subject: [PATCH 1/9] types and requests --- cuenca_validations/types/enums.py | 22 ++++++++++++++++++++++ cuenca_validations/types/requests.py | 21 +++++++++++++++++++++ cuenca_validations/version.py | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/cuenca_validations/types/enums.py b/cuenca_validations/types/enums.py index 80cd3ddf..d41a9279 100644 --- a/cuenca_validations/types/enums.py +++ b/cuenca_validations/types/enums.py @@ -640,3 +640,25 @@ class BankAccountStatus(str, Enum): created = 'created' succeeded = 'succeeded' failed = 'failed' + + +class DeliveryType(str, Enum): + # domestic = 'domestic' + # local = 'local' + local_next_day = 'local_next_day' + # domestic_apl = 'domestic_apl' + local_minutes = 'local_99_minutes' + domestic_estafeta = 'estafeta' + + +class DeliveryStatus(str, Enum): + arriving = 'arriving' + cancelled = 'cancelled' + confirmed = 'confirmed' + created = 'created' + delivered = 'delivered' + in_process = 'in_process' + not_requested = 'not_requested' + on_the_way = 'on_the_way' + visited = 'visited' + unknown = 'unknown' diff --git a/cuenca_validations/types/requests.py b/cuenca_validations/types/requests.py index 2c88947a..cd0514d9 100644 --- a/cuenca_validations/types/requests.py +++ b/cuenca_validations/types/requests.py @@ -28,6 +28,8 @@ CardStatus, CardType, Country, + DeliveryType, + DeliveryStatus, EcommerceIndicator, FileExtension, Gender, @@ -656,3 +658,22 @@ class KYCValidationRequest(BaseRequest): class BankAccountValidationRequest(BaseModel): account_number: Union[Clabe, PaymentCardNumber] + + +class CardRequestRequest(BaseRequest): + user_id: str + delivery_type: DeliveryType + latitude: str + longitude: str + external_number: str + internal_number: Optional[str] + street: str + city: str + colonia: str + postal_code: str + full_address: str + + +class CardRequestUpdate(BaseRequest): + status: Optional[DeliveryStatus] + delivery_type: Optional[DeliveryType] diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index bbdc5a32..13f908e2 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.16' +__version__ = '0.11.17.dev0' From be727aea7d5707ffe860f097ca9f10d178e6b87c Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 10:31:13 -0600 Subject: [PATCH 2/9] format --- cuenca_validations/types/requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuenca_validations/types/requests.py b/cuenca_validations/types/requests.py index cd0514d9..b37e34dd 100644 --- a/cuenca_validations/types/requests.py +++ b/cuenca_validations/types/requests.py @@ -28,8 +28,8 @@ CardStatus, CardType, Country, - DeliveryType, DeliveryStatus, + DeliveryType, EcommerceIndicator, FileExtension, Gender, From 780bfb08bfb31b8f5a953ad9b4a3bd5173b0e9c0 Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 14:00:16 -0600 Subject: [PATCH 3/9] minor errors --- cuenca_validations/types/__init__.py | 4 ++++ cuenca_validations/types/requests.py | 2 +- cuenca_validations/version.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cuenca_validations/types/__init__.py b/cuenca_validations/types/__init__.py index 1ea7fc32..73dbee2a 100644 --- a/cuenca_validations/types/__init__.py +++ b/cuenca_validations/types/__init__.py @@ -25,6 +25,8 @@ 'CurpField', 'CurpValidationRequest', 'CommissionType', + 'DeliveryType', + 'DeliveryStatus', 'DepositNetwork', 'DepositQuery', 'EcommerceIndicator', @@ -116,6 +118,8 @@ CardType, CommissionType, Country, + DeliveryType, + DeliveryStatus, DepositNetwork, EcommerceIndicator, EntryType, diff --git a/cuenca_validations/types/requests.py b/cuenca_validations/types/requests.py index b37e34dd..7719750b 100644 --- a/cuenca_validations/types/requests.py +++ b/cuenca_validations/types/requests.py @@ -674,6 +674,6 @@ class CardRequestRequest(BaseRequest): full_address: str -class CardRequestUpdate(BaseRequest): +class CardRequestUpdateRequest(BaseRequest): status: Optional[DeliveryStatus] delivery_type: Optional[DeliveryType] diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index 13f908e2..818bc05f 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.17.dev0' +__version__ = '0.11.17.dev1' From 9c5db570b78c38f96803d85b28b7588bb45465fe Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 14:01:09 -0600 Subject: [PATCH 4/9] format --- cuenca_validations/types/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuenca_validations/types/__init__.py b/cuenca_validations/types/__init__.py index 73dbee2a..fe938131 100644 --- a/cuenca_validations/types/__init__.py +++ b/cuenca_validations/types/__init__.py @@ -118,8 +118,8 @@ CardType, CommissionType, Country, - DeliveryType, DeliveryStatus, + DeliveryType, DepositNetwork, EcommerceIndicator, EntryType, From cf6484f72f0ee9ddee9057a37ce39b5aa092425c Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 16:11:04 -0600 Subject: [PATCH 5/9] added more fields to request --- cuenca_validations/types/requests.py | 3 +++ cuenca_validations/version.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cuenca_validations/types/requests.py b/cuenca_validations/types/requests.py index 7719750b..dfcf0b82 100644 --- a/cuenca_validations/types/requests.py +++ b/cuenca_validations/types/requests.py @@ -672,6 +672,9 @@ class CardRequestRequest(BaseRequest): colonia: str postal_code: str full_address: str + phone: str + name: str + email: str class CardRequestUpdateRequest(BaseRequest): diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index 818bc05f..5aa83f93 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.17.dev1' +__version__ = '0.11.17.dev2' From 0cb2d69fc23b7969e7aa6e4189b2edf4a571f534 Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Fri, 6 Jan 2023 16:20:44 -0600 Subject: [PATCH 6/9] sorry for more versions --- cuenca_validations/types/requests.py | 6 +++--- cuenca_validations/version.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cuenca_validations/types/requests.py b/cuenca_validations/types/requests.py index dfcf0b82..1a53ef81 100644 --- a/cuenca_validations/types/requests.py +++ b/cuenca_validations/types/requests.py @@ -672,9 +672,9 @@ class CardRequestRequest(BaseRequest): colonia: str postal_code: str full_address: str - phone: str - name: str - email: str + recipient_phone: str + recipient_name: str + recipient_email: str class CardRequestUpdateRequest(BaseRequest): diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index 5aa83f93..5f5cb43a 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.17.dev2' +__version__ = '0.11.17.dev3' From d37e21805ec37b94b105856ff2ba04a755f03b7d Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Wed, 11 Jan 2023 13:07:25 -0600 Subject: [PATCH 7/9] cr query --- cuenca_validations/types/__init__.py | 6 ++++++ cuenca_validations/types/queries.py | 7 +++++++ cuenca_validations/version.py | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cuenca_validations/types/__init__.py b/cuenca_validations/types/__init__.py index fe938131..0fad4976 100644 --- a/cuenca_validations/types/__init__.py +++ b/cuenca_validations/types/__init__.py @@ -17,6 +17,9 @@ 'CardIssuer', 'CardNetwork', 'CardQuery', + 'CardRequestQuery', + 'CardRequestRequest', + 'CardRequestUpdateRequest', 'CardStatus', 'CardTransactionQuery', 'CardTransactionType', @@ -173,6 +176,7 @@ BankAccountValidationQuery, BillPaymentQuery, CardQuery, + CardRequestQuery, CardTransactionQuery, DepositQuery, EventQuery, @@ -191,6 +195,8 @@ from .requests import ( ApiKeyUpdateRequest, BankAccountValidationRequest, + CardRequestRequest, + CardRequestUpdateRequest, CurpValidationRequest, EndpointRequest, EndpointUpdateRequest, diff --git a/cuenca_validations/types/queries.py b/cuenca_validations/types/queries.py index d3f05d0b..e524c48b 100644 --- a/cuenca_validations/types/queries.py +++ b/cuenca_validations/types/queries.py @@ -12,6 +12,8 @@ CardIssuer, CardStatus, CardType, + DeliveryStatus, + DeliveryType, EventType, KYCFileType, SessionType, @@ -184,3 +186,8 @@ class FileQuery(QueryParams): class BankAccountValidationQuery(QueryParams): account_number: Optional[str] = None status: Optional[BankAccountStatus] = None + + +class CardRequestQuery(QueryParams): + status: Optional[DeliveryStatus] = None + delivery_type: Optional[DeliveryType] = None diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index 5f5cb43a..96ecc332 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.17.dev3' +__version__ = '0.11.17.dev4' From dc1501333415d96f575dad3dcc5e3c89eaade448 Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Wed, 11 Jan 2023 13:44:17 -0600 Subject: [PATCH 8/9] ready to order --- cuenca_validations/types/enums.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cuenca_validations/types/enums.py b/cuenca_validations/types/enums.py index d41a9279..00003367 100644 --- a/cuenca_validations/types/enums.py +++ b/cuenca_validations/types/enums.py @@ -660,5 +660,6 @@ class DeliveryStatus(str, Enum): in_process = 'in_process' not_requested = 'not_requested' on_the_way = 'on_the_way' + ready_to_order = 'ready_to_order' visited = 'visited' - unknown = 'unknown' + # unknown = 'unknown' From d40b1eac4120d961afcbe9389fae3f3df5d2838b Mon Sep 17 00:00:00 2001 From: Luis Brime Date: Wed, 11 Jan 2023 13:50:18 -0600 Subject: [PATCH 9/9] did not bump version mb --- cuenca_validations/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuenca_validations/version.py b/cuenca_validations/version.py index 96ecc332..0d90a54b 100644 --- a/cuenca_validations/version.py +++ b/cuenca_validations/version.py @@ -1 +1 @@ -__version__ = '0.11.17.dev4' +__version__ = '0.11.17.dev5'