Skip to content

Commit

Permalink
Merge pull request #56 from cashfree/4.0.10
Browse files Browse the repository at this point in the history
4.0.10
  • Loading branch information
suhas-cashfree authored Mar 19, 2024
2 parents f4092e1 + 70c2807 commit f6dde51
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 170 deletions.
3 changes: 0 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ cashfree_pg/models/settlement_webhook.py
cashfree_pg/models/settlement_webhook_data_entity.py
cashfree_pg/models/split_after_payment_request.py
cashfree_pg/models/split_after_payment_request_split_inner.py
cashfree_pg/models/split_after_payment_request_split_inner_tags_inner.py
cashfree_pg/models/split_after_payment_response.py
cashfree_pg/models/static_split_request.py
cashfree_pg/models/static_split_request_scheme_inner.py
Expand Down Expand Up @@ -381,7 +380,6 @@ docs/SettlementsApi.md
docs/SoftPOSApi.md
docs/SplitAfterPaymentRequest.md
docs/SplitAfterPaymentRequestSplitInner.md
docs/SplitAfterPaymentRequestSplitInnerTagsInner.md
docs/SplitAfterPaymentResponse.md
docs/StaticSplitRequest.md
docs/StaticSplitRequestSchemeInner.md
Expand Down Expand Up @@ -590,7 +588,6 @@ test/test_settlements_api.py
test/test_soft_pos_api.py
test/test_split_after_payment_request.py
test/test_split_after_payment_request_split_inner.py
test/test_split_after_payment_request_split_inner_tags_inner.py
test/test_split_after_payment_response.py
test/test_static_split_request.py
test/test_static_split_request_scheme_inner.py
Expand Down
3 changes: 1 addition & 2 deletions cashfree_pg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "4.0.9"
__version__ = "4.0.10"

# import apis into sdk package
# import ApiClient
Expand Down Expand Up @@ -184,7 +184,6 @@
from cashfree_pg.models.settlement_webhook_data_entity import SettlementWebhookDataEntity
from cashfree_pg.models.split_after_payment_request import SplitAfterPaymentRequest
from cashfree_pg.models.split_after_payment_request_split_inner import SplitAfterPaymentRequestSplitInner
from cashfree_pg.models.split_after_payment_request_split_inner_tags_inner import SplitAfterPaymentRequestSplitInnerTagsInner
from cashfree_pg.models.split_after_payment_response import SplitAfterPaymentResponse
from cashfree_pg.models.static_split_request import StaticSplitRequest
from cashfree_pg.models.static_split_request_scheme_inner import StaticSplitRequestSchemeInner
Expand Down
101 changes: 50 additions & 51 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.0.9".\
"SDK Package Version: 4.0.10".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
1 change: 0 additions & 1 deletion cashfree_pg/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
from cashfree_pg.models.settlement_webhook_data_entity import SettlementWebhookDataEntity
from cashfree_pg.models.split_after_payment_request import SplitAfterPaymentRequest
from cashfree_pg.models.split_after_payment_request_split_inner import SplitAfterPaymentRequestSplitInner
from cashfree_pg.models.split_after_payment_request_split_inner_tags_inner import SplitAfterPaymentRequestSplitInnerTagsInner
from cashfree_pg.models.split_after_payment_response import SplitAfterPaymentResponse
from cashfree_pg.models.static_split_request import StaticSplitRequest
from cashfree_pg.models.static_split_request_scheme_inner import StaticSplitRequestSchemeInner
Expand Down
16 changes: 4 additions & 12 deletions cashfree_pg/models/split_after_payment_request_split_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
import json


from typing import List, Optional, Union
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
from cashfree_pg.models.split_after_payment_request_split_inner_tags_inner import SplitAfterPaymentRequestSplitInnerTagsInner
from typing import Dict, Optional, Union
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr

class SplitAfterPaymentRequestSplitInner(BaseModel):
"""
Expand All @@ -30,7 +29,7 @@ class SplitAfterPaymentRequestSplitInner(BaseModel):
vendor_id: Optional[StrictStr] = Field(None, description="Specify the merchant vendor ID to split the payment.")
amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Specify the amount to be split to the vendor.")
percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Specify the percentage of amount to be split.")
tags: Optional[conlist(SplitAfterPaymentRequestSplitInnerTagsInner)] = Field(None, description="Provide additional data fields using tags. Sample data fields are mentioned below.")
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 = ["vendor_id", "amount", "percentage", "tags"]

class Config:
Expand Down Expand Up @@ -65,13 +64,6 @@ def to_dict(self):
exclude={
},
exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in tags (list)
_items = []
if self.tags:
for _item in self.tags:
if _item:
_items.append(_item.to_dict())
_dict['tags'] = _items
return _dict

@classmethod
Expand All @@ -87,7 +79,7 @@ def from_dict(cls, obj: dict) -> SplitAfterPaymentRequestSplitInner:
"vendor_id": obj.get("vendor_id"),
"amount": obj.get("amount"),
"percentage": obj.get("percentage"),
"tags": [SplitAfterPaymentRequestSplitInnerTagsInner.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None
"tags": obj.get("tags")
})
return _obj

Expand Down

This file was deleted.

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.0.7".\
"SDK Package Version: 4.0.9".\
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.0.9"
version = "4.0.10"
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.0.9"
VERSION = "4.0.10"
with open("README.md", "r", encoding="utf-8") as fh:
readme = fh.read()
PYTHON_REQUIRES = ">=3.7"
Expand Down
16 changes: 6 additions & 10 deletions test/test_split_after_payment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ def make_instance(self, include_optional):
vendor_id = '',
amount = 1.337,
percentage = 1.337,
tags = [
cashfree_pg.models.split_after_payment_request_split_inner_tags_inner.SplitAfterPaymentRequest_split_inner_tags_inner(
key_value_1 = '',
key_value_2 = '', )
], )
tags = {
'key' : '0'
}, )
],
disable_split = True
)
Expand All @@ -59,11 +57,9 @@ def make_instance(self, include_optional):
vendor_id = '',
amount = 1.337,
percentage = 1.337,
tags = [
cashfree_pg.models.split_after_payment_request_split_inner_tags_inner.SplitAfterPaymentRequest_split_inner_tags_inner(
key_value_1 = '',
key_value_2 = '', )
], )
tags = {
'key' : '0'
}, )
],
)
"""
Expand Down
8 changes: 3 additions & 5 deletions test/test_split_after_payment_request_split_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ def make_instance(self, include_optional):
vendor_id = '',
amount = 1.337,
percentage = 1.337,
tags = [
cashfree_pg.models.split_after_payment_request_split_inner_tags_inner.SplitAfterPaymentRequest_split_inner_tags_inner(
key_value_1 = '',
key_value_2 = '', )
]
tags = {
'key' : '0'
}
)
else :
return SplitAfterPaymentRequestSplitInner(
Expand Down

0 comments on commit f6dde51

Please sign in to comment.