diff --git a/cashfree_pg/__init__.py b/cashfree_pg/__init__.py index 0e83865..a517070 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 diff --git a/cashfree_pg/api_client.py b/cashfree_pg/api_client.py index 2742f6a..48dff9c 100644 --- a/cashfree_pg/api_client.py +++ b/cashfree_pg/api_client.py @@ -426,7 +426,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 +588,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 +739,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 +894,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 +1043,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 +1201,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 +1342,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 +1484,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 +1632,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 +1774,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 +1913,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 +2070,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 +2231,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 +2387,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 +2543,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 +2698,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 +2854,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 +3011,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 +3169,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 +3315,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 +3473,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 +3624,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 +3786,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 +3945,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 +4090,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 +4248,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 +4397,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 +4549,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 +4711,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 +4876,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 +5025,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 +5171,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 +5334,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 +5499,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 +5648,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 +5800,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 +5961,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 +6117,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 +6272,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 +6422,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 +6565,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 +6719,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 +6754,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 +6873,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 +6908,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 +7033,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 +7068,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 +7187,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 +7222,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 +7344,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 +7490,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 +7514,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 +7642,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 +7666,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 +7788,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 +7813,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 +7941,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 +7965,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 +8090,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 +8125,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 +8256,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 +8290,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 +8421,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 +8462,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 +8581,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 +8616,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 +8745,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 +8900,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 +9055,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 +9209,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 +9356,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 +9511,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 +9669,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 +9823,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 +9977,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 +10128,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 +10289,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 +10450,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 +10549,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/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 index 44e0249..11934a8 100644 --- a/cashfree_pg/models/customer_details_response.py +++ b/cashfree_pg/models/customer_details_response.py @@ -33,7 +33,7 @@ class CustomerDetailsResponse(BaseModel): 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 ") + 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: 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 = '',