Skip to content

Commit

Permalink
Generating Python SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbucket-pipelines committed Nov 17, 2024
1 parent 003a21e commit c50ecc6
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 91 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.3.0"
__version__ = "4.3.3"

# import apis into sdk package
# import ApiClient
Expand Down
134 changes: 67 additions & 67 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.3.0".\
"SDK Package Version: 4.3.3".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
4 changes: 2 additions & 2 deletions cashfree_pg/models/link_meta_response_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@


from typing import Optional
from pydantic import BaseModel, Field, StrictBool, StrictStr
from pydantic import BaseModel, Field, StrictStr

class LinkMetaResponseEntity(BaseModel):
"""
Payment link meta information object
"""
notify_url: Optional[StrictStr] = Field(None, description="Notification URL for server-server communication. It should be an https URL.")
upi_intent: Optional[StrictBool] = Field(None, description="If \"true\", link will directly open UPI Intent flow on mobile, and normal link flow elsewhere")
upi_intent: Optional[StrictStr] = Field(None, description="If \"true\", link will directly open UPI Intent flow on mobile, and normal link flow elsewhere")
return_url: Optional[StrictStr] = Field(None, description="The URL to which user will be redirected to after the payment is done on the link. Maximum length: 250.")
payment_methods: Optional[StrictStr] = Field(None, description="Allowed payment modes for this link. Pass comma-separated values among following options - \"cc\", \"dc\", \"ccc\", \"ppc\", \"nb\", \"upi\", \"paypal\", \"app\". Leave it blank to show all available payment methods")
__properties = ["notify_url", "upi_intent", "return_url", "payment_methods"]
Expand Down
10 changes: 0 additions & 10 deletions cashfree_pg/models/refund_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ def refund_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PAYMENT_AUTO_REFUND', 'MERCHANT_INITIATED', 'UNRECONCILED_AUTO_REFUND')")
return value

@validator('refund_mode')
def refund_mode_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in ('STANDARD', 'INSTANT'):
raise ValueError("must be one of enum values ('STANDARD', 'INSTANT')")
return value

class Config:
"""Pydantic configuration"""
allow_population_by_field_name = True
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.4".\
"SDK Package Version: 4.3.0".\
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.3.0"
version = "4.3.3"
description = "Cashfree Payment Gateway APIs"
authors = ["API Support <developers@cashfree.com>"]
license = "Apache 2.0"
Expand Down
7 changes: 2 additions & 5 deletions 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 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.3.0"
VERSION = "4.3.3"
with open("README.md", "r", encoding="utf-8") as fh:
readme = fh.read()
PYTHON_REQUIRES = ">=3.7"
Expand Down
2 changes: 1 addition & 1 deletion test/test_link_meta_response_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def make_instance(self, include_optional):
if include_optional :
return LinkMetaResponseEntity(
notify_url = '',
upi_intent = True,
upi_intent = '',
return_url = '',
payment_methods = ''
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_refund_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def make_instance(self, include_optional):
{"vendor_id":"Vendor01","amount":100.12,"description":"order amount should be more than equal to 100.12"}
],
refund_type = 'PAYMENT_AUTO_REFUND',
refund_mode = 'STANDARD',
refund_mode = '',
created_at = '',
processed_at = '',
refund_speed = {"requested":"STANDARD","accepted":"STANDARD","processed":"STANDARD","message":"Error message, if any"}
Expand Down

0 comments on commit c50ecc6

Please sign in to comment.