Skip to content

Commit

Permalink
Merge pull request #76 from cashfree/4.3.0
Browse files Browse the repository at this point in the history
4.3.0
  • Loading branch information
suhas-cashfree authored Nov 15, 2024
2 parents 74d4c75 + 5382615 commit 003a21e
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 86 deletions.
2 changes: 1 addition & 1 deletion cashfree_pg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "4.2.3"
__version__ = "4.3.0"

# import apis into sdk package
# import ApiClient
Expand Down
140 changes: 70 additions & 70 deletions cashfree_pg/api_client.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cashfree_pg/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 6 additions & 2 deletions cashfree_pg/models/terminal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
8 changes: 6 additions & 2 deletions cashfree_pg/models/update_terminal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
7 changes: 2 additions & 5 deletions cashfree_pg/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <developers@cashfree.com>"]
license = "Apache 2.0"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion test/test_terminal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion test/test_update_terminal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 003a21e

Please sign in to comment.