From 3bd23bdbb18607ff0facba184cff9c6af9883829 Mon Sep 17 00:00:00 2001 From: bitbucket-pipelines Date: Wed, 17 Jul 2024 08:23:36 +0000 Subject: [PATCH] Generating Python SDK. --- .openapi-generator/FILES | 3 - cashfree_pg/__init__.py | 3 +- cashfree_pg/api_client.py | 159 +++++++++--------- cashfree_pg/configuration.py | 2 +- cashfree_pg/models/__init__.py | 1 - cashfree_pg/models/cardless_emi.py | 6 +- .../create_subscription_payment_request.py | 6 +- cashfree_pg/models/customer_details.py | 2 +- .../models/customer_details_response.py | 94 ----------- cashfree_pg/models/order_entity.py | 6 +- cashfree_pg/models/simulate_request.py | 4 +- cashfree_pg/models/simulation_response.py | 4 +- .../models/subscription_customer_details.py | 8 +- configuration.py | 2 +- pyproject.toml | 2 +- setup.py | 2 +- ...est_create_subscription_payment_request.py | 2 +- test/test_create_subscription_request.py | 4 +- test/test_simulate_request.py | 4 +- test/test_simulation_response.py | 2 +- test/test_subscription_customer_details.py | 2 +- test/test_subscription_entity.py | 2 +- 22 files changed, 110 insertions(+), 210 deletions(-) delete mode 100644 cashfree_pg/models/customer_details_response.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e20c63b..9044fac 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -78,7 +78,6 @@ cashfree_pg/models/create_vendor_response.py cashfree_pg/models/cryptogram_entity.py cashfree_pg/models/customer_details.py cashfree_pg/models/customer_details_cardless_emi.py -cashfree_pg/models/customer_details_response.py cashfree_pg/models/customer_entity.py cashfree_pg/models/discount_details.py cashfree_pg/models/eligibility_cardless_emi_entity.py @@ -306,7 +305,6 @@ docs/CreateVendorResponse.md docs/CryptogramEntity.md docs/CustomerDetails.md docs/CustomerDetailsCardlessEMI.md -docs/CustomerDetailsResponse.md docs/CustomerEntity.md docs/CustomersApi.md docs/DiscountDetails.md @@ -554,7 +552,6 @@ test/test_create_vendor_response.py test/test_cryptogram_entity.py test/test_customer_details.py test/test_customer_details_cardless_emi.py -test/test_customer_details_response.py test/test_customer_entity.py test/test_customers_api.py test/test_discount_details.py diff --git a/cashfree_pg/__init__.py b/cashfree_pg/__init__.py index 0e83865..44430b7 100644 --- a/cashfree_pg/__init__.py +++ b/cashfree_pg/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "4.2.0" +__version__ = "4.2.1" # import apis into sdk package # import ApiClient @@ -82,7 +82,6 @@ from cashfree_pg.models.cryptogram_entity import CryptogramEntity from cashfree_pg.models.customer_details import CustomerDetails from cashfree_pg.models.customer_details_cardless_emi import CustomerDetailsCardlessEMI -from cashfree_pg.models.customer_details_response import CustomerDetailsResponse from cashfree_pg.models.customer_entity import CustomerEntity from cashfree_pg.models.discount_details import DiscountDetails from cashfree_pg.models.emi_offer import EMIOffer diff --git a/cashfree_pg/api_client.py b/cashfree_pg/api_client.py index 2742f6a..b20dace 100644 --- a/cashfree_pg/api_client.py +++ b/cashfree_pg/api_client.py @@ -109,7 +109,6 @@ from cashfree_pg.models.cryptogram_entity import * from cashfree_pg.models.customer_details import * from cashfree_pg.models.customer_details_cardless_emi import * -from cashfree_pg.models.customer_details_response import * from cashfree_pg.models.customer_entity import * from cashfree_pg.models.discount_details import * from cashfree_pg.models.emi_offer import * @@ -426,7 +425,7 @@ def PGCreateCustomer(self, x_api_version : Annotated[StrictStr, Field(..., descr if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -588,7 +587,7 @@ def PGOrderSplitAfterPayment(self, x_api_version : Annotated[StrictStr, Field(.. if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -739,7 +738,7 @@ def PGOrderStaticSplit(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -894,7 +893,7 @@ def PGesCreateOnDemandTransfer(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1043,7 +1042,7 @@ def PGesCreateVendors(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1201,7 +1200,7 @@ def PGesDownloadVendorsDocs(self, x_api_version : Annotated[StrictStr, Field(... if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1342,7 +1341,7 @@ def PGesFetchVendors(self, x_api_version : Annotated[StrictStr, Field(..., descr if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1484,7 +1483,7 @@ def PGesGetVendorBalance(self, x_api_version : Annotated[StrictStr, Field(..., d if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1632,7 +1631,7 @@ def PGesGetVendorBalanceTransferCharges(self, x_api_version : Annotated[StrictSt if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1774,7 +1773,7 @@ def PGesGetVendorsDocs(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -1913,7 +1912,7 @@ def PGesOrderRecon(self, x_api_version : Annotated[StrictStr, Field(..., descrip if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2070,7 +2069,7 @@ def PGesUpdateVendors(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2231,7 +2230,7 @@ def PGesUploadVendorsDocs(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2387,7 +2386,7 @@ def PGEligibilityFetchCardlessEmi(self, x_api_version : Annotated[StrictStr, Fie if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2543,7 +2542,7 @@ def PGEligibilityFetchOffers(self, x_api_version : Annotated[StrictStr, Field(.. if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2698,7 +2697,7 @@ def PGEligibilityFetchPaylater(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -2854,7 +2853,7 @@ def PGEligibilityFetchPaymentMethods(self, x_api_version : Annotated[StrictStr, if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3011,7 +3010,7 @@ def PGCreateOffer(self, x_api_version : Annotated[StrictStr, Field(..., descript if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3169,7 +3168,7 @@ def PGFetchOffer(self, x_api_version : Annotated[StrictStr, Field(..., descripti if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3315,7 +3314,7 @@ def PGCreateOrder(self, x_api_version : Annotated[StrictStr, Field(..., descript if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3473,7 +3472,7 @@ def PGFetchOrder(self, x_api_version : Annotated[StrictStr, Field(..., descripti if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3624,7 +3623,7 @@ def PGTerminateOrder(self, x_api_version : Annotated[StrictStr, Field(..., descr if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3786,7 +3785,7 @@ def PGFetchRecon(self, x_api_version : Annotated[StrictStr, Field(..., descripti if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -3945,7 +3944,7 @@ def PGCancelLink(self, x_api_version : Annotated[StrictStr, Field(..., descripti if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4090,7 +4089,7 @@ def PGCreateLink(self, x_api_version : Annotated[StrictStr, Field(..., descripti if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4248,7 +4247,7 @@ def PGFetchLink(self, x_api_version : Annotated[StrictStr, Field(..., descriptio if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4397,7 +4396,7 @@ def PGLinkFetchOrders(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4549,7 +4548,7 @@ def PGAuthorizeOrder(self, x_api_version : Annotated[StrictStr, Field(..., descr if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4711,7 +4710,7 @@ def PGOrderAuthenticatePayment(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -4876,7 +4875,7 @@ def PGOrderFetchPayment(self, x_api_version : Annotated[StrictStr, Field(..., de if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5025,7 +5024,7 @@ def PGOrderFetchPayments(self, x_api_version : Annotated[StrictStr, Field(..., d if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5171,7 +5170,7 @@ def PGPayOrder(self, x_api_version : Annotated[StrictStr, Field(..., description if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5334,7 +5333,7 @@ def PGOrderCreateRefund(self, x_api_version : Annotated[StrictStr, Field(..., de if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5499,7 +5498,7 @@ def PGOrderFetchRefund(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5648,7 +5647,7 @@ def PGOrderFetchRefunds(self, x_api_version : Annotated[StrictStr, Field(..., de if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5800,7 +5799,7 @@ def PGFetchSettlements(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -5961,7 +5960,7 @@ def PGSettlementFetchRecon(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6117,7 +6116,7 @@ def MarkForSettlement(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6272,7 +6271,7 @@ def PGOrderFetchSettlement(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6422,7 +6421,7 @@ def PGFetchSimulation(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6565,7 +6564,7 @@ def PGSimulatePayment(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6719,7 +6718,7 @@ def SubsCreatePayment(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6754,7 +6753,7 @@ def SubsCreatePayment(self, x_api_version : Annotated[StrictStr, Field(..., desc } return api_client.call_api( - '/subscriptions/pay', 'POST', + '/pg/subscriptions/pay', 'POST', _path_params, _query_params, _header_params, @@ -6873,7 +6872,7 @@ def SubsCreatePlan(self, x_api_version : Annotated[StrictStr, Field(..., descrip if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -6908,7 +6907,7 @@ def SubsCreatePlan(self, x_api_version : Annotated[StrictStr, Field(..., descrip } return api_client.call_api( - '/plans', 'POST', + '/pg/plans', 'POST', _path_params, _query_params, _header_params, @@ -7033,7 +7032,7 @@ def SubsCreateRefund(self, x_api_version : Annotated[StrictStr, Field(..., descr if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7068,7 +7067,7 @@ def SubsCreateRefund(self, x_api_version : Annotated[StrictStr, Field(..., descr } return api_client.call_api( - '/subscriptions/{subscription_id}/refunds', 'POST', + '/pg/subscriptions/{subscription_id}/refunds', 'POST', _path_params, _query_params, _header_params, @@ -7187,7 +7186,7 @@ def SubsCreateSubscription(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7222,7 +7221,7 @@ def SubsCreateSubscription(self, x_api_version : Annotated[StrictStr, Field(..., } return api_client.call_api( - '/subscriptions', 'POST', + '/pg/subscriptions', 'POST', _path_params, _query_params, _header_params, @@ -7344,7 +7343,7 @@ def SubsFetchPlan(self, x_api_version : Annotated[StrictStr, Field(..., descript if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7490,7 +7489,7 @@ def SubsFetchSubscription(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7514,7 +7513,7 @@ def SubsFetchSubscription(self, x_api_version : Annotated[StrictStr, Field(..., } return api_client.call_api( - '/subscriptions/{subscription_id}', 'GET', + '/pg/subscriptions/{subscription_id}', 'GET', _path_params, _query_params, _header_params, @@ -7642,7 +7641,7 @@ def SubsFetchSubscriptionPayment(self, x_api_version : Annotated[StrictStr, Fiel if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7666,7 +7665,7 @@ def SubsFetchSubscriptionPayment(self, x_api_version : Annotated[StrictStr, Fiel } return api_client.call_api( - '/subscriptions/{subscription_id}/payments/{payment_id}', 'GET', + '/pg/subscriptions/{subscription_id}/payments/{payment_id}', 'GET', _path_params, _query_params, _header_params, @@ -7788,7 +7787,7 @@ def SubsFetchSubscriptionPayments(self, x_api_version : Annotated[StrictStr, Fie if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7813,7 +7812,7 @@ def SubsFetchSubscriptionPayments(self, x_api_version : Annotated[StrictStr, Fie } return api_client.call_api( - '/subscriptions/{subscription_id}/payments', 'GET', + '/pg/subscriptions/{subscription_id}/payments', 'GET', _path_params, _query_params, _header_params, @@ -7941,7 +7940,7 @@ def SubsFetchSubscriptionRefund(self, x_api_version : Annotated[StrictStr, Field if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -7965,7 +7964,7 @@ def SubsFetchSubscriptionRefund(self, x_api_version : Annotated[StrictStr, Field } return api_client.call_api( - '/subscriptions/{subscription_id}/refunds/{refund_id}', 'GET', + '/pg/subscriptions/{subscription_id}/refunds/{refund_id}', 'GET', _path_params, _query_params, _header_params, @@ -8090,7 +8089,7 @@ def SubsManageSubscription(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -8125,7 +8124,7 @@ def SubsManageSubscription(self, x_api_version : Annotated[StrictStr, Field(..., } return api_client.call_api( - '/subscriptions/{subscription_id}/manage', 'POST', + '/pg/subscriptions/{subscription_id}/manage', 'POST', _path_params, _query_params, _header_params, @@ -8256,7 +8255,7 @@ def SubsManageSubscriptionPayment(self, x_api_version : Annotated[StrictStr, Fie if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -8290,7 +8289,7 @@ def SubsManageSubscriptionPayment(self, x_api_version : Annotated[StrictStr, Fie } return api_client.call_api( - '/subscriptions/{subscription_id}/payments/{payment_id}/manage', 'POST', + '/pg/subscriptions/{subscription_id}/payments/{payment_id}/manage', 'POST', _path_params, _query_params, _header_params, @@ -8421,7 +8420,7 @@ def SubscriptionDocumentUpload(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -8462,7 +8461,7 @@ def SubscriptionDocumentUpload(self, x_api_version : Annotated[StrictStr, Field( } return api_client.call_api( - '/subscriptions/pay/documents/{payment_id}', 'POST', + '/pg/subscriptions/pay/documents/{payment_id}', 'POST', _path_params, _query_params, _header_params, @@ -8581,7 +8580,7 @@ def SubscriptionEligibility(self, x_api_version : Annotated[StrictStr, Field(... if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -8616,7 +8615,7 @@ def SubscriptionEligibility(self, x_api_version : Annotated[StrictStr, Field(... } return api_client.call_api( - '/subscriptions/eligibility/payment_methods', 'POST', + '/pg/subscriptions/eligibility/payment_methods', 'POST', _path_params, _query_params, _header_params, @@ -8745,7 +8744,7 @@ def PGCustomerDeleteInstrument(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -8900,7 +8899,7 @@ def PGCustomerFetchInstrument(self, x_api_version : Annotated[StrictStr, Field(. if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9055,7 +9054,7 @@ def PGCustomerFetchInstruments(self, x_api_version : Annotated[StrictStr, Field( if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9209,7 +9208,7 @@ def PGCustomerInstrumentsFetchCryptogram(self, x_api_version : Annotated[StrictS if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9356,7 +9355,7 @@ def SposCreateTerminal(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9511,7 +9510,7 @@ def SposCreateTerminalTransaction(self, x_api_version : Annotated[StrictStr, Fie if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9669,7 +9668,7 @@ def SposFetchTerminal(self, x_api_version : Annotated[StrictStr, Field(..., desc if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9823,7 +9822,7 @@ def SposFetchTerminalQrCodes(self, x_api_version : Annotated[StrictStr, Field(.. if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -9977,7 +9976,7 @@ def SposFetchTerminalTransaction(self, x_api_version : Annotated[StrictStr, Fiel if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -10128,7 +10127,7 @@ def SposUpdateTerminal(self, x_api_version : Annotated[StrictStr, Field(..., des if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -10289,7 +10288,7 @@ def SposUpdateTerminalStatus(self, x_api_version : Annotated[StrictStr, Field(.. if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -10450,7 +10449,7 @@ def SposUploadTerminalDocs(self, x_api_version : Annotated[StrictStr, Field(..., if x_idempotency_key: _header_params["x-idempotency-key"] = x_idempotency_key - _header_params["x-sdk-platform"] = "pythonsdk-4.2.0" + _header_params["x-sdk-platform"] = "pythonsdk-4.2.1" # process the form parameters _form_params = [] @@ -10549,7 +10548,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.2.0/python' + self.user_agent = 'OpenAPI-Generator/4.2.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/cashfree_pg/configuration.py b/cashfree_pg/configuration.py index d52b6b7..7784533 100644 --- a/cashfree_pg/configuration.py +++ b/cashfree_pg/configuration.py @@ -434,7 +434,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2023-08-01\n"\ - "SDK Package Version: 4.2.0".\ + "SDK Package Version: 4.2.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/cashfree_pg/models/__init__.py b/cashfree_pg/models/__init__.py index 36f0cbf..6646ec3 100644 --- a/cashfree_pg/models/__init__.py +++ b/cashfree_pg/models/__init__.py @@ -67,7 +67,6 @@ from cashfree_pg.models.cryptogram_entity import CryptogramEntity from cashfree_pg.models.customer_details import CustomerDetails from cashfree_pg.models.customer_details_cardless_emi import CustomerDetailsCardlessEMI -from cashfree_pg.models.customer_details_response import CustomerDetailsResponse from cashfree_pg.models.customer_entity import CustomerEntity from cashfree_pg.models.discount_details import DiscountDetails from cashfree_pg.models.emi_offer import EMIOffer diff --git a/cashfree_pg/models/cardless_emi.py b/cashfree_pg/models/cardless_emi.py index 5c9cd93..426a2e5 100644 --- a/cashfree_pg/models/cardless_emi.py +++ b/cashfree_pg/models/cardless_emi.py @@ -27,7 +27,7 @@ class CardlessEMI(BaseModel): Request body for cardless emi payment method """ channel: Optional[StrictStr] = Field(None, description="The channel for cardless EMI is always `link`") - provider: Optional[StrictStr] = Field(None, description="One of [`flexmoney`, `zestmoney`, `hdfc`, `icici`, `cashe`, `idfc`, `kotak`, `snapmint`, `bharatx`]") + provider: Optional[StrictStr] = Field(None, description="One of [`flexmoney`, `zestmoney`, `hdfc`, `icici`, `cashe`, `idfc`, `kotak`]") phone: Optional[StrictStr] = Field(None, description="Customers phone number for this payment instrument. If the customer is not eligible you will receive a 400 error with type as 'invalid_request_error' and code as 'invalid_request_error'") emi_tenure: Optional[StrictInt] = Field(None, description="EMI tenure for the selected provider. This is mandatory when provider is one of [`hdfc`, `icici`, `cashe`, `idfc`, `kotak`]") __properties = ["channel", "provider", "phone", "emi_tenure"] @@ -38,8 +38,8 @@ def provider_validate_enum(cls, value): if value is None: return value - if value not in ('flexmoney', 'zestmoney', 'hdfc', 'icici', 'cashe', 'idfc', 'kotak', 'snapmint', 'bharatx'): - raise ValueError("must be one of enum values ('flexmoney', 'zestmoney', 'hdfc', 'icici', 'cashe', 'idfc', 'kotak', 'snapmint', 'bharatx')") + if value not in ('flexmoney', 'zestmoney', 'hdfc', 'icici', 'cashe', 'idfc', 'kotak'): + raise ValueError("must be one of enum values ('flexmoney', 'zestmoney', 'hdfc', 'icici', 'cashe', 'idfc', 'kotak')") return value class Config: diff --git a/cashfree_pg/models/create_subscription_payment_request.py b/cashfree_pg/models/create_subscription_payment_request.py index 232d547..0e506ef 100644 --- a/cashfree_pg/models/create_subscription_payment_request.py +++ b/cashfree_pg/models/create_subscription_payment_request.py @@ -19,7 +19,7 @@ import json -from typing import Any, Dict, Optional, Union +from typing import Optional, Union from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr class CreateSubscriptionPaymentRequest(BaseModel): @@ -29,11 +29,11 @@ class CreateSubscriptionPaymentRequest(BaseModel): subscription_id: StrictStr = Field(..., description="A unique ID passed by merchant for identifying the subscription.") subscription_session_id: Optional[StrictStr] = Field(None, description="Session ID for the subscription. Required only for Auth.") payment_id: StrictStr = Field(..., description="A unique ID passed by merchant for identifying the subscription payment.") - payment_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The charge amount of the payment. Required in case of charge.") + payment_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The charge amount of the payment. Requried in case of charge.") payment_schedule_date: Optional[StrictStr] = Field(None, description="The date on which the payment is scheduled to be processed. Required for UPI and CARD payment modes.") payment_remarks: Optional[StrictStr] = Field(None, description="Payment remarks.") payment_type: StrictStr = Field(..., description="Payment type. Can be AUTH or CHARGE.") - payment_method: Optional[Dict[str, Any]] = Field(None, description="Payment method. Can be one of [\"upi\", \"enach\", \"pnach\", \"card\"]") + payment_method: Optional[StrictStr] = Field(None, description="Payment method. Can be upi or card or enach or pnach.") __properties = ["subscription_id", "subscription_session_id", "payment_id", "payment_amount", "payment_schedule_date", "payment_remarks", "payment_type", "payment_method"] class Config: diff --git a/cashfree_pg/models/customer_details.py b/cashfree_pg/models/customer_details.py index 5534961..b18f5b3 100644 --- a/cashfree_pg/models/customer_details.py +++ b/cashfree_pg/models/customer_details.py @@ -24,7 +24,7 @@ class CustomerDetails(BaseModel): """ - The customer details that are necessary. + The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details. """ customer_id: constr(strict=True, max_length=50, min_length=3) = Field(..., description="A unique identifier for the customer. Use alphanumeric values only.") customer_email: Optional[constr(strict=True, max_length=100, min_length=3)] = Field(None, description="Customer email address.") diff --git a/cashfree_pg/models/customer_details_response.py b/cashfree_pg/models/customer_details_response.py deleted file mode 100644 index 44e0249..0000000 --- a/cashfree_pg/models/customer_details_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Cashfree Payment Gateway APIs - - Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. - - The version of the OpenAPI document: 2023-08-01 - Contact: developers@cashfree.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr - -class CustomerDetailsResponse(BaseModel): - """ - The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details. - """ - customer_id: Optional[constr(strict=True, max_length=50, min_length=3)] = Field(None, description="A unique identifier for the customer. Use alphanumeric values only.") - customer_email: Optional[constr(strict=True, max_length=100, min_length=3)] = Field(None, description="Customer email address.") - customer_phone: Optional[constr(strict=True, max_length=10, min_length=10)] = Field(None, description="Customer phone number.") - customer_name: Optional[constr(strict=True, max_length=100, min_length=3)] = Field(None, description="Name of the customer.") - customer_bank_account_number: Optional[constr(strict=True, max_length=20, min_length=3)] = Field(None, description="Customer bank account. Required if you want to do a bank account check (TPV)") - customer_bank_ifsc: Optional[StrictStr] = Field(None, description="Customer bank IFSC. Required if you want to do a bank account check (TPV)") - customer_bank_code: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Customer bank code. Required for net banking payments, if you want to do a bank account check (TPV)") - customer_uid: Optional[StrictStr] = Field(None, description="Customer identifier at Cashfree. You will get this when you create/get customer ") - __properties = ["customer_id", "customer_email", "customer_phone", "customer_name", "customer_bank_account_number", "customer_bank_ifsc", "customer_bank_code", "customer_uid"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CustomerDetailsResponse: - """Create an instance of CustomerDetailsResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - @classmethod - def from_json_for_one_of(cls, json_str: str) -> CustomerDetailsResponse: - """Create an instance of CustomerDetailsResponse from a JSON string""" - temp_dict = json.loads(json_str) - if "customer_id, customer_email, customer_phone, customer_name, customer_bank_account_number, customer_bank_ifsc, customer_bank_code, customer_uid" in temp_dict.keys(): - return cls.from_dict(json.loads(json_str)) - return None - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CustomerDetailsResponse: - """Create an instance of CustomerDetailsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CustomerDetailsResponse.parse_obj(obj) - - _obj = CustomerDetailsResponse.parse_obj({ - "customer_id": obj.get("customer_id"), - "customer_email": obj.get("customer_email"), - "customer_phone": obj.get("customer_phone"), - "customer_name": obj.get("customer_name"), - "customer_bank_account_number": obj.get("customer_bank_account_number"), - "customer_bank_ifsc": obj.get("customer_bank_ifsc"), - "customer_bank_code": obj.get("customer_bank_code"), - "customer_uid": obj.get("customer_uid") - }) - return _obj - - diff --git a/cashfree_pg/models/order_entity.py b/cashfree_pg/models/order_entity.py index a7e1b29..42206b1 100644 --- a/cashfree_pg/models/order_entity.py +++ b/cashfree_pg/models/order_entity.py @@ -21,7 +21,7 @@ from datetime import datetime from typing import Dict, List, Optional, Union from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr -from cashfree_pg.models.customer_details_response import CustomerDetailsResponse +from cashfree_pg.models.customer_details import CustomerDetails from cashfree_pg.models.order_meta import OrderMeta from cashfree_pg.models.vendor_split import VendorSplit @@ -40,7 +40,7 @@ class OrderEntity(BaseModel): order_note: Optional[StrictStr] = Field(None, description="Additional note for order") created_at: Optional[datetime] = Field(None, description="When the order was created at cashfree's server") order_splits: Optional[conlist(VendorSplit)] = None - customer_details: Optional[CustomerDetailsResponse] = None + customer_details: Optional[CustomerDetails] = None order_meta: Optional[OrderMeta] = None order_tags: Optional[Dict[str, constr(strict=True, max_length=255, min_length=1)]] = Field(None, description="Custom Tags in thr form of {\"key\":\"value\"} which can be passed for an order. A maximum of 10 tags can be added") __properties = ["cf_order_id", "order_id", "entity", "order_currency", "order_amount", "order_status", "payment_session_id", "order_expiry_time", "order_note", "created_at", "order_splits", "customer_details", "order_meta", "order_tags"] @@ -113,7 +113,7 @@ def from_dict(cls, obj: dict) -> OrderEntity: "order_note": obj.get("order_note"), "created_at": obj.get("created_at"), "order_splits": [VendorSplit.from_dict(_item) for _item in obj.get("order_splits")] if obj.get("order_splits") is not None else None, - "customer_details": CustomerDetailsResponse.from_dict(obj.get("customer_details")) if obj.get("customer_details") is not None else None, + "customer_details": CustomerDetails.from_dict(obj.get("customer_details")) if obj.get("customer_details") is not None else None, "order_meta": OrderMeta.from_dict(obj.get("order_meta")) if obj.get("order_meta") is not None else None, "order_tags": obj.get("order_tags") }) diff --git a/cashfree_pg/models/simulate_request.py b/cashfree_pg/models/simulate_request.py index 8f7a767..3825d34 100644 --- a/cashfree_pg/models/simulate_request.py +++ b/cashfree_pg/models/simulate_request.py @@ -20,7 +20,7 @@ -from pydantic import BaseModel, Field, StrictStr, validator +from pydantic import BaseModel, Field, StrictInt, StrictStr, validator from cashfree_pg.models.entity_simulation_request import EntitySimulationRequest class SimulateRequest(BaseModel): @@ -28,7 +28,7 @@ class SimulateRequest(BaseModel): simulate payment request object """ entity: StrictStr = Field(..., description="Entity type should be PAYMENTS only.") - entity_id: StrictStr = Field(..., description="In case of Entity type is PAYMENTS, entity_id will be transactionId") + entity_id: StrictInt = Field(..., description="In case of Entity type is PAYMENTS, entity_id will be transactionId") entity_simulation: EntitySimulationRequest = Field(...) __properties = ["entity", "entity_id", "entity_simulation"] diff --git a/cashfree_pg/models/simulation_response.py b/cashfree_pg/models/simulation_response.py index 1da72a8..98898d7 100644 --- a/cashfree_pg/models/simulation_response.py +++ b/cashfree_pg/models/simulation_response.py @@ -20,7 +20,7 @@ from typing import Optional -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, StrictInt, StrictStr from cashfree_pg.models.entity_simulation_response import EntitySimulationResponse class SimulationResponse(BaseModel): @@ -29,7 +29,7 @@ class SimulationResponse(BaseModel): """ simulation_id: Optional[StrictStr] = None entity: Optional[StrictStr] = None - entity_id: Optional[StrictStr] = None + entity_id: Optional[StrictInt] = None entity_simulation: Optional[EntitySimulationResponse] = None __properties = ["simulation_id", "entity", "entity_id", "entity_simulation"] diff --git a/cashfree_pg/models/subscription_customer_details.py b/cashfree_pg/models/subscription_customer_details.py index 91afa63..74bd304 100644 --- a/cashfree_pg/models/subscription_customer_details.py +++ b/cashfree_pg/models/subscription_customer_details.py @@ -29,12 +29,12 @@ class SubscriptionCustomerDetails(BaseModel): customer_name: Optional[StrictStr] = Field(None, description="Name of the customer.") customer_email: StrictStr = Field(..., description="Email of the customer.") customer_phone: StrictStr = Field(..., description="Phone number of the customer.") - customer_bank_account_holder_name: Optional[StrictStr] = Field(None, description="Bank holder name of the customer.") + customer_bank_holder_name: Optional[StrictStr] = Field(None, description="Bank holder name of the customer.") customer_bank_account_number: Optional[StrictStr] = Field(None, description="Bank account number of the customer.") customer_bank_ifsc: Optional[StrictStr] = Field(None, description="IFSC code of the customer.") customer_bank_code: Optional[StrictStr] = Field(None, description="Bank code of the customer.") customer_bank_account_type: Optional[StrictStr] = Field(None, description="Bank account type of the customer.") - __properties = ["customer_name", "customer_email", "customer_phone", "customer_bank_account_holder_name", "customer_bank_account_number", "customer_bank_ifsc", "customer_bank_code", "customer_bank_account_type"] + __properties = ["customer_name", "customer_email", "customer_phone", "customer_bank_holder_name", "customer_bank_account_number", "customer_bank_ifsc", "customer_bank_code", "customer_bank_account_type"] class Config: """Pydantic configuration""" @@ -58,7 +58,7 @@ def from_json(cls, json_str: str) -> SubscriptionCustomerDetails: def from_json_for_one_of(cls, json_str: str) -> SubscriptionCustomerDetails: """Create an instance of SubscriptionCustomerDetails from a JSON string""" temp_dict = json.loads(json_str) - if "customer_name, customer_email, customer_phone, customer_bank_account_holder_name, customer_bank_account_number, customer_bank_ifsc, customer_bank_code, customer_bank_account_type" in temp_dict.keys(): + if "customer_name, customer_email, customer_phone, customer_bank_holder_name, customer_bank_account_number, customer_bank_ifsc, customer_bank_code, customer_bank_account_type" in temp_dict.keys(): return cls.from_dict(json.loads(json_str)) return None @@ -83,7 +83,7 @@ def from_dict(cls, obj: dict) -> SubscriptionCustomerDetails: "customer_name": obj.get("customer_name"), "customer_email": obj.get("customer_email"), "customer_phone": obj.get("customer_phone"), - "customer_bank_account_holder_name": obj.get("customer_bank_account_holder_name"), + "customer_bank_holder_name": obj.get("customer_bank_holder_name"), "customer_bank_account_number": obj.get("customer_bank_account_number"), "customer_bank_ifsc": obj.get("customer_bank_ifsc"), "customer_bank_code": obj.get("customer_bank_code"), diff --git a/configuration.py b/configuration.py index 397b314..d52b6b7 100644 --- a/configuration.py +++ b/configuration.py @@ -434,7 +434,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2023-08-01\n"\ - "SDK Package Version: 4.1.3".\ + "SDK Package Version: 4.2.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pyproject.toml b/pyproject.toml index 8d160bd..ab69560 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cashfree_pg" -version = "4.2.0" +version = "4.2.1" description = "Cashfree Payment Gateway APIs" authors = ["API Support "] license = "Apache 2.0" diff --git a/setup.py b/setup.py index d311843..0ad2f4e 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "cashfree_pg" -VERSION = "4.2.0" +VERSION = "4.2.1" with open("README.md", "r", encoding="utf-8") as fh: readme = fh.read() PYTHON_REQUIRES = ">=3.7" diff --git a/test/test_create_subscription_payment_request.py b/test/test_create_subscription_payment_request.py index b6fa879..96bd6d4 100644 --- a/test/test_create_subscription_payment_request.py +++ b/test/test_create_subscription_payment_request.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional): payment_schedule_date = '', payment_remarks = '', payment_type = '', - payment_method = None + payment_method = '' ) else : return CreateSubscriptionPaymentRequest( diff --git a/test/test_create_subscription_request.py b/test/test_create_subscription_request.py index 0dd888c..0722222 100644 --- a/test/test_create_subscription_request.py +++ b/test/test_create_subscription_request.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional): if include_optional : return CreateSubscriptionRequest( subscription_id = '0', - customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_holder_name":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, + customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_number":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, plan_details = cashfree_pg.models.create_subscription_request_plan_details.CreateSubscriptionRequest_plan_details( plan_id = '', plan_name = '', @@ -71,7 +71,7 @@ def make_instance(self, include_optional): else : return CreateSubscriptionRequest( subscription_id = '0', - customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_holder_name":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, + customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_number":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, plan_details = cashfree_pg.models.create_subscription_request_plan_details.CreateSubscriptionRequest_plan_details( plan_id = '', plan_name = '', diff --git a/test/test_simulate_request.py b/test/test_simulate_request.py index 6f50a80..3a16a7e 100644 --- a/test/test_simulate_request.py +++ b/test/test_simulate_request.py @@ -40,13 +40,13 @@ def make_instance(self, include_optional): if include_optional : return SimulateRequest( entity = 'PAYMENTS', - entity_id = '', + entity_id = 56, entity_simulation = {"payment_status":"FAILED","payment_error_code":"ISSUER_NOT_AVAILABLE"} ) else : return SimulateRequest( entity = 'PAYMENTS', - entity_id = '', + entity_id = 56, entity_simulation = {"payment_status":"FAILED","payment_error_code":"ISSUER_NOT_AVAILABLE"}, ) """ diff --git a/test/test_simulation_response.py b/test/test_simulation_response.py index cc85da6..9ec70d2 100644 --- a/test/test_simulation_response.py +++ b/test/test_simulation_response.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional): return SimulationResponse( simulation_id = '', entity = '', - entity_id = '', + entity_id = 56, entity_simulation = {"payment_status":"FAILED","payment_error_code":"ISSUER_NOT_AVAILABLE"} ) else : diff --git a/test/test_subscription_customer_details.py b/test/test_subscription_customer_details.py index c50f9f0..a0b918d 100644 --- a/test/test_subscription_customer_details.py +++ b/test/test_subscription_customer_details.py @@ -42,7 +42,7 @@ def make_instance(self, include_optional): customer_name = '', customer_email = '', customer_phone = '', - customer_bank_account_holder_name = '', + customer_bank_holder_name = '', customer_bank_account_number = '', customer_bank_ifsc = '', customer_bank_code = '', diff --git a/test/test_subscription_entity.py b/test/test_subscription_entity.py index dab3e71..1a4c162 100644 --- a/test/test_subscription_entity.py +++ b/test/test_subscription_entity.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional): return SubscriptionEntity( authorisation_details = {"authorization_amount":1,"authorization_amount_refund":false,"authorization_reference":"","authorization_time":"2022-06-14T23:47:52+05:30","authorization_status":"INITIALIZED","payment_id":"97877","payment_method":"NPCI_SBC"}, cf_subscription_id = '', - customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_holder_name":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, + customer_details = {"customer_name":"Test Cust","customer_email":"test@gmail.com","customer_phone":"9900755700","customer_bank_holder_name":"","customer_bank_account_number":"","customer_bank_ifsc":"","customer_bank_code":"","customer_bank_account_type":""}, plan_details = {"plan_currency":"INR","plan_id":"144436-03471-JD_TEST","plan_interval_type":"WEEK","plan_intervals":1,"plan_max_amount":1,"plan_max_cycles":4,"plan_name":"abscede","plan_note":"lsdkdn","plan_recurring_amount":1,"plan_status":"ACTIVE","plan_type":"PERIODIC"}, subscription_expiry_time = '', subscription_first_charge_time = '',