From 5382615863dfb0c6894a012c58934810cfec9f36 Mon Sep 17 00:00:00 2001 From: bitbucket-pipelines Date: Fri, 15 Nov 2024 10:03:55 +0000 Subject: [PATCH] Generating Python SDK. --- cashfree_pg/__init__.py | 2 +- cashfree_pg/api_client.py | 140 +++++++++---------- cashfree_pg/configuration.py | 2 +- cashfree_pg/models/terminal_entity.py | 8 +- cashfree_pg/models/update_terminal_entity.py | 8 +- cashfree_pg/rest.py | 7 +- configuration.py | 2 +- pyproject.toml | 2 +- setup.py | 2 +- test/test_terminal_entity.py | 3 +- test/test_update_terminal_entity.py | 3 +- 11 files changed, 93 insertions(+), 86 deletions(-) diff --git a/cashfree_pg/__init__.py b/cashfree_pg/__init__.py index 658f52b..1595397 100644 --- a/cashfree_pg/__init__.py +++ b/cashfree_pg/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "4.2.3" +__version__ = "4.3.0" # import apis into sdk package # import ApiClient diff --git a/cashfree_pg/api_client.py b/cashfree_pg/api_client.py index 5e83756..42f69c5 100644 --- a/cashfree_pg/api_client.py +++ b/cashfree_pg/api_client.py @@ -38,6 +38,9 @@ import re import tempfile import warnings +import base64 +import hashlib +import hmac from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from typing import overload, Optional, Union, Awaitable @@ -286,9 +289,6 @@ from cashfree_pg.models.vendor_entity_related_docs_inner import * from cashfree_pg.models.vendor_split import * from cashfree_pg.models.wallet_offer import * -import base64 -import hashlib -import hmac class CFEnvironment(Enum): SANDBOX = 1 @@ -432,7 +432,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -594,7 +594,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -745,7 +745,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -900,7 +900,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1049,7 +1049,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1207,7 +1207,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1348,7 +1348,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1490,7 +1490,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1638,7 +1638,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1780,7 +1780,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -1919,7 +1919,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2076,7 +2076,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2237,7 +2237,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2393,7 +2393,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2549,7 +2549,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2704,7 +2704,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -2860,7 +2860,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3017,7 +3017,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3175,7 +3175,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3321,7 +3321,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3479,7 +3479,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3630,7 +3630,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3792,7 +3792,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -3951,7 +3951,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4096,7 +4096,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4254,7 +4254,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4409,7 +4409,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4561,7 +4561,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4723,7 +4723,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -4888,7 +4888,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5037,7 +5037,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5183,7 +5183,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5346,7 +5346,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5511,7 +5511,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5660,7 +5660,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5812,7 +5812,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -5973,7 +5973,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6129,7 +6129,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6284,7 +6284,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6434,7 +6434,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6577,7 +6577,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6731,7 +6731,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -6885,7 +6885,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7045,7 +7045,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7199,7 +7199,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7356,7 +7356,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7502,7 +7502,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7654,7 +7654,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7800,7 +7800,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -7953,7 +7953,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8102,7 +8102,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8268,7 +8268,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8433,7 +8433,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8593,7 +8593,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8757,7 +8757,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -8912,7 +8912,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9067,7 +9067,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9221,7 +9221,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9368,7 +9368,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9523,7 +9523,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9681,7 +9681,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9835,7 +9835,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -9989,7 +9989,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -10140,7 +10140,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -10301,7 +10301,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -10462,7 +10462,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.4" + _header_params["x-sdk-platform"] = "pythonsdk-4.3.0" # process the form parameters _form_params = [] @@ -10561,7 +10561,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.4/python' + self.user_agent = 'OpenAPI-Generator/4.3.0/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 c7419b6..df4a558 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.4".\ + "SDK Package Version: 4.3.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/cashfree_pg/models/terminal_entity.py b/cashfree_pg/models/terminal_entity.py index 506fc16..9a07326 100644 --- a/cashfree_pg/models/terminal_entity.py +++ b/cashfree_pg/models/terminal_entity.py @@ -21,6 +21,7 @@ from typing import Optional from pydantic import BaseModel, StrictInt, StrictStr +from cashfree_pg.models.create_terminal_request_terminal_meta import CreateTerminalRequestTerminalMeta class TerminalEntity(BaseModel): """ @@ -37,7 +38,7 @@ class TerminalEntity(BaseModel): terminal_note: Optional[StrictStr] = None terminal_phone_no: Optional[StrictStr] = None terminal_status: Optional[StrictStr] = None - terminal_meta: Optional[StrictStr] = None + terminal_meta: Optional[CreateTerminalRequestTerminalMeta] = None __properties = ["added_on", "cf_terminal_id", "last_updated_on", "terminal_address", "terminal_email", "terminal_type", "teminal_id", "terminal_name", "terminal_note", "terminal_phone_no", "terminal_status", "terminal_meta"] class Config: @@ -72,6 +73,9 @@ def to_dict(self): exclude={ }, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of terminal_meta + if self.terminal_meta: + _dict['terminal_meta'] = self.terminal_meta.to_dict() return _dict @classmethod @@ -95,7 +99,7 @@ def from_dict(cls, obj: dict) -> TerminalEntity: "terminal_note": obj.get("terminal_note"), "terminal_phone_no": obj.get("terminal_phone_no"), "terminal_status": obj.get("terminal_status"), - "terminal_meta": obj.get("terminal_meta") + "terminal_meta": CreateTerminalRequestTerminalMeta.from_dict(obj.get("terminal_meta")) if obj.get("terminal_meta") is not None else None }) return _obj diff --git a/cashfree_pg/models/update_terminal_entity.py b/cashfree_pg/models/update_terminal_entity.py index 90ad8ad..f1f838f 100644 --- a/cashfree_pg/models/update_terminal_entity.py +++ b/cashfree_pg/models/update_terminal_entity.py @@ -21,6 +21,7 @@ from typing import Optional from pydantic import BaseModel, StrictInt, StrictStr +from cashfree_pg.models.create_terminal_request_terminal_meta import CreateTerminalRequestTerminalMeta class UpdateTerminalEntity(BaseModel): """ @@ -37,7 +38,7 @@ class UpdateTerminalEntity(BaseModel): terminal_note: Optional[StrictStr] = None terminal_phone_no: Optional[StrictStr] = None terminal_status: Optional[StrictStr] = None - terminal_meta: Optional[StrictStr] = None + terminal_meta: Optional[CreateTerminalRequestTerminalMeta] = None __properties = ["added_on", "cf_terminal_id", "last_updated_on", "terminal_address", "terminal_email", "terminal_type", "teminal_id", "terminal_name", "terminal_note", "terminal_phone_no", "terminal_status", "terminal_meta"] class Config: @@ -72,6 +73,9 @@ def to_dict(self): exclude={ }, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of terminal_meta + if self.terminal_meta: + _dict['terminal_meta'] = self.terminal_meta.to_dict() return _dict @classmethod @@ -95,7 +99,7 @@ def from_dict(cls, obj: dict) -> UpdateTerminalEntity: "terminal_note": obj.get("terminal_note"), "terminal_phone_no": obj.get("terminal_phone_no"), "terminal_status": obj.get("terminal_status"), - "terminal_meta": obj.get("terminal_meta") + "terminal_meta": CreateTerminalRequestTerminalMeta.from_dict(obj.get("terminal_meta")) if obj.get("terminal_meta") is not None else None }) return _obj diff --git a/cashfree_pg/rest.py b/cashfree_pg/rest.py index f8d6e8e..309f1f5 100644 --- a/cashfree_pg/rest.py +++ b/cashfree_pg/rest.py @@ -54,11 +54,8 @@ def __init__(self, configuration, pools_size=4, maxsize=None): # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE + # cert_reqs set to NONE + cert_reqs = ssl.CERT_NONE addition_pool_args = {} if configuration.assert_hostname is not None: diff --git a/configuration.py b/configuration.py index 8b9bf87..c7419b6 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.2.2".\ + "SDK Package Version: 4.2.4".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pyproject.toml b/pyproject.toml index 286ae95..fed2371 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cashfree_pg" -version = "4.2.4" +version = "4.3.0" description = "Cashfree Payment Gateway APIs" authors = ["API Support "] license = "Apache 2.0" diff --git a/setup.py b/setup.py index 94e995f..6a4fdb1 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.4" +VERSION = "4.3.0" with open("README.md", "r", encoding="utf-8") as fh: readme = fh.read() PYTHON_REQUIRES = ">=3.7" diff --git a/test/test_terminal_entity.py b/test/test_terminal_entity.py index 1c022b3..5a69d8a 100644 --- a/test/test_terminal_entity.py +++ b/test/test_terminal_entity.py @@ -50,7 +50,8 @@ def make_instance(self, include_optional): terminal_note = '', terminal_phone_no = '', terminal_status = '', - terminal_meta = '' + terminal_meta = cashfree_pg.models.create_terminal_request_terminal_meta.CreateTerminalRequest_terminal_meta( + terminal_operator = '', ) ) else : return TerminalEntity( diff --git a/test/test_update_terminal_entity.py b/test/test_update_terminal_entity.py index 45d87af..5fb8c8b 100644 --- a/test/test_update_terminal_entity.py +++ b/test/test_update_terminal_entity.py @@ -50,7 +50,8 @@ def make_instance(self, include_optional): terminal_note = '', terminal_phone_no = '', terminal_status = '', - terminal_meta = '' + terminal_meta = cashfree_pg.models.create_terminal_request_terminal_meta.CreateTerminalRequest_terminal_meta( + terminal_operator = '', ) ) else : return UpdateTerminalEntity(