Skip to content

Commit 6dd801c

Browse files
author
bitbucket-pipelines
committed
Generating Python SDK.
1 parent 4e4d008 commit 6dd801c

File tree

551 files changed

+4045
-3720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+4045
-3720
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.0
1+
7.18.0

cashfree_pg/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

17-
18-
__version__ = "4.5.1"
17+
__version__ = "1.0.0"
1918

2019
# import apis into sdk package
2120
# import ApiClient

cashfree_pg/api_client.py

Lines changed: 907 additions & 816 deletions
Large diffs are not rendered by default.

cashfree_pg/api_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from typing import Any, Dict, Optional
55
from pydantic import Field, StrictInt, StrictStr
66

7+
# Updated imports for Pydantic v2 compatibility
8+
79
class ApiResponse:
810
"""
911
API response object

cashfree_pg/configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
import copy
1716
import logging
1817
import multiprocessing
@@ -434,7 +433,7 @@ def to_debug_report(self):
434433
"OS: {env}\n"\
435434
"Python Version: {pyversion}\n"\
436435
"Version of the API: 2023-08-01\n"\
437-
"SDK Package Version: 4.5.1".\
436+
"SDK Package Version: 1.0.0".\
438437
format(env=sys.platform, pyversion=sys.version)
439438

440439
def get_host_settings(self):

cashfree_pg/exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
class OpenApiException(Exception):
1716
"""The base exception class for all OpenAPIExceptions"""
1817

cashfree_pg/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Do not edit the class manually.
1414
""" # noqa: E501
1515

16-
1716
# import models into model package
1817
from cashfree_pg.models.address_details import AddressDetails
1918
from cashfree_pg.models.adjust_vendor_balance_request import AdjustVendorBalanceRequest

cashfree_pg/models/address_details.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,39 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
from __future__ import annotations
1716
import pprint
1817
import re # noqa: F401
1918
import json
2019

2120

22-
from typing import Optional
23-
from pydantic import BaseModel, Field, StrictStr
21+
22+
23+
from pydantic import field_validator
2424

2525
class AddressDetails(BaseModel):
2626
"""
2727
Address associated with the customer.
2828
"""
29-
name: Optional[StrictStr] = Field(None, description="Full Name of the customer associated with the address.")
30-
address_line_one: Optional[StrictStr] = Field(None, description="First line of the address.")
31-
address_line_two: Optional[StrictStr] = Field(None, description="Second line of the address.")
32-
country: Optional[StrictStr] = Field(None, description="Country Name.")
33-
country_code: Optional[StrictStr] = Field(None, description="Country Code.")
34-
state: Optional[StrictStr] = Field(None, description="State Name.")
35-
state_code: Optional[StrictStr] = Field(None, description="State Code.")
36-
city: Optional[StrictStr] = Field(None, description="City Name.")
37-
pin_code: Optional[StrictStr] = Field(None, description="Pin Code/Zip Code.")
38-
phone: Optional[StrictStr] = Field(None, description="Customer Phone Number.")
39-
email: Optional[StrictStr] = Field(None, description="Cutomer Email Address.")
29+
name: Optional[StrictStr] = Field(default=None, description="Full Name of the customer associated with the address.")
30+
address_line_one: Optional[StrictStr] = Field(default=None, description="First line of the address.")
31+
address_line_two: Optional[StrictStr] = Field(default=None, description="Second line of the address.")
32+
country: Optional[StrictStr] = Field(default=None, description="Country Name.")
33+
country_code: Optional[StrictStr] = Field(default=None, description="Country Code.")
34+
state: Optional[StrictStr] = Field(default=None, description="State Name.")
35+
state_code: Optional[StrictStr] = Field(default=None, description="State Code.")
36+
city: Optional[StrictStr] = Field(default=None, description="City Name.")
37+
pin_code: Optional[StrictStr] = Field(default=None, description="Pin Code/Zip Code.")
38+
phone: Optional[StrictStr] = Field(default=None, description="Customer Phone Number.")
39+
email: Optional[StrictStr] = Field(default=None, description="Cutomer Email Address.")
4040
__properties = ["name", "address_line_one", "address_line_two", "country", "country_code", "state", "state_code", "city", "pin_code", "phone", "email"]
4141

42-
class Config:
43-
"""Pydantic configuration"""
44-
allow_population_by_field_name = True
45-
validate_assignment = True
42+
# Updated to Pydantic v2
43+
"""Pydantic configuration"""
44+
model_config = {
45+
"populate_by_name": True,
46+
"validate_assignment": True
47+
}
4648

4749
def to_str(self) -> str:
4850
"""Returns the string representation of the model using alias"""

cashfree_pg/models/adjust_vendor_balance_request.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,33 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
from __future__ import annotations
1716
import pprint
1817
import re # noqa: F401
1918
import json
2019

2120

22-
from typing import Any, Dict, Optional, Union
23-
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
21+
22+
23+
from pydantic import field_validator
2424

2525
class AdjustVendorBalanceRequest(BaseModel):
2626
"""
2727
Adjust Vendor Balance Request
2828
"""
29-
transfer_from: StrictStr = Field(..., description="Mention to whom you want to transfer the on demand balance. Possible values - MERCHANT, VENDOR.")
30-
transfer_type: StrictStr = Field(..., description="Mention the type of transfer. Possible values: ON_DEMAND.")
31-
transfer_amount: Union[StrictFloat, StrictInt] = Field(..., description="Mention the on demand transfer amount.")
32-
remark: Optional[StrictStr] = Field(None, description="Mention remarks if any for the on demand transfer.")
33-
tags: Optional[Dict[str, Any]] = Field(None, description="Provide additional data fields using tags.")
29+
transfer_from: StrictStr = Field(description="Mention to whom you want to transfer the on demand balance. Possible values - MERCHANT, VENDOR.")
30+
transfer_type: StrictStr = Field(description="Mention the type of transfer. Possible values: ON_DEMAND.")
31+
transfer_amount: Union[StrictFloat, StrictInt] = Field(description="Mention the on demand transfer amount.")
32+
remark: Optional[StrictStr] = Field(default=None, description="Mention remarks if any for the on demand transfer.")
33+
tags: Optional[Dict[str, Any]] = Field(default=None, description="Provide additional data fields using tags.")
3434
__properties = ["transfer_from", "transfer_type", "transfer_amount", "remark", "tags"]
3535

36-
class Config:
37-
"""Pydantic configuration"""
38-
allow_population_by_field_name = True
39-
validate_assignment = True
36+
# Updated to Pydantic v2
37+
"""Pydantic configuration"""
38+
model_config = {
39+
"populate_by_name": True,
40+
"validate_assignment": True
41+
}
4042

4143
def to_str(self) -> str:
4244
"""Returns the string representation of the model using alias"""

cashfree_pg/models/adjust_vendor_balance_response.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
from __future__ import annotations
1716
import pprint
1817
import re # noqa: F401
1918
import json
2019

2120

22-
from typing import Optional, Union
23-
from pydantic import BaseModel, StrictFloat, StrictInt
21+
22+
2423
from cashfree_pg.models.balance_details import BalanceDetails
2524
from cashfree_pg.models.charges_details import ChargesDetails
2625
from cashfree_pg.models.transfer_details import TransferDetails
26+
from pydantic import field_validator
2727

2828
class AdjustVendorBalanceResponse(BaseModel):
2929
"""
@@ -35,10 +35,12 @@ class AdjustVendorBalanceResponse(BaseModel):
3535
charges: Optional[ChargesDetails] = None
3636
__properties = ["settlement_id", "transfer_details", "balances", "charges"]
3737

38-
class Config:
39-
"""Pydantic configuration"""
40-
allow_population_by_field_name = True
41-
validate_assignment = True
38+
# Updated to Pydantic v2
39+
"""Pydantic configuration"""
40+
model_config = {
41+
"populate_by_name": True,
42+
"validate_assignment": True
43+
}
4244

4345
def to_str(self) -> str:
4446
"""Returns the string representation of the model using alias"""

0 commit comments

Comments
 (0)