Skip to content

Commit 2964f55

Browse files
authored
Updated version 7.0.0 to 7.0.1 (#87)
* the version was updated from 7.0.0 to 7.0.1 * feat: updated the description of the plan_ids field in CheckoutRequest.md to clarify its use in different payment types
1 parent 7d1461a commit 2964f55

14 files changed

+34
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Conekta sdk
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 2.2.0
7-
- Package version: 7.0.0
7+
- Package version: 7.0.1
88
- Generator version: 7.9.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010
For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues)

VERSION

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

conekta/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
""" # noqa: E501
1616

1717

18-
__version__ = "7.0.0"
18+
__version__ = "7.0.1"
1919

2020
# import apis into sdk package
2121
from conekta.api.antifraud_api import AntifraudApi

conekta/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ApiClient:
7474
'lang': 'python',
7575
'lang_version': platform.python_version(),
7676
'publisher': 'conekta',
77-
'bindings_version': '7.0.0',
77+
'bindings_version': '7.0.1',
7878
'uname': platform.uname()
7979
}
8080
_pool = None
@@ -97,7 +97,7 @@ def __init__(
9797
self.default_headers[header_name] = header_value
9898
self.cookie = cookie
9999
# Set default User-Agent.
100-
self.user_agent = 'Conekta/v2 PythonBindings/7.0.0'
100+
self.user_agent = 'Conekta/v2 PythonBindings/7.0.1'
101101
self.conekta_user_agent = json.dumps(self.data)
102102
self.client_side_validation = configuration.client_side_validation
103103

conekta/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def to_debug_report(self):
393393
"OS: {env}\n"\
394394
"Python Version: {pyversion}\n"\
395395
"Version of the API: 2.2.0\n"\
396-
"SDK Package Version: 7.0.0".\
396+
"SDK Package Version: 7.0.1".\
397397
format(env=sys.platform, pyversion=sys.version)
398398

399399
def get_host_settings(self):

conekta/models/checkout_order_template.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from conekta.models.checkout_order_template_customer_info import CheckoutOrderTemplateCustomerInfo
@@ -33,8 +33,9 @@ class CheckoutOrderTemplate(BaseModel):
3333
currency: Annotated[str, Field(strict=True, max_length=3)] = Field(description="It is the currency in which the order will be created. It must be a valid ISO 4217 currency code.")
3434
customer_info: Optional[CheckoutOrderTemplateCustomerInfo] = None
3535
line_items: List[Product] = Field(description="They are the products to buy. Each contains the \"unit price\" and \"quantity\" parameters that are used to calculate the total amount of the order.")
36+
plan_ids: Optional[List[StrictStr]] = Field(default=None, description="It is a list of plan IDs that will be associated with the order.")
3637
metadata: Optional[Dict[str, Any]] = Field(default=None, description="It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format.")
37-
__properties: ClassVar[List[str]] = ["currency", "customer_info", "line_items", "metadata"]
38+
__properties: ClassVar[List[str]] = ["currency", "customer_info", "line_items", "plan_ids", "metadata"]
3839

3940
model_config = ConfigDict(
4041
populate_by_name=True,
@@ -100,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
100101
"currency": obj.get("currency"),
101102
"customer_info": CheckoutOrderTemplateCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None,
102103
"line_items": [Product.from_dict(_item) for _item in obj["line_items"]] if obj.get("line_items") is not None else None,
104+
"plan_ids": obj.get("plan_ids"),
103105
"metadata": obj.get("metadata")
104106
})
105107
return _obj

conekta/models/checkout_request.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing import Optional, Set
2424
from typing_extensions import Self
@@ -27,7 +27,8 @@ class CheckoutRequest(BaseModel):
2727
"""
2828
[Checkout](https://developers.conekta.com/v2.2.0/reference/payment-link) details
2929
""" # noqa: E501
30-
allowed_payment_methods: List[StrictStr] = Field(description="Are the payment methods available for this link")
30+
allowed_payment_methods: List[StrictStr] = Field(description="Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments.")
31+
plan_ids: Optional[List[StrictStr]] = Field(default=None, description="List of plan IDs that will be available for subscription. This field is required for subscription payments.")
3132
expires_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp of checkout expiration")
3233
failure_url: Optional[StrictStr] = Field(default=None, description="Redirection url back to the site in case of failed payment, applies only to HostedPayment.")
3334
monthly_installments_enabled: Optional[StrictBool] = None
@@ -38,7 +39,15 @@ class CheckoutRequest(BaseModel):
3839
redirection_time: Optional[StrictInt] = Field(default=None, description="number of seconds to wait before redirecting to the success_url")
3940
success_url: Optional[StrictStr] = Field(default=None, description="Redirection url back to the site in case of successful payment, applies only to HostedPayment")
4041
type: Optional[StrictStr] = Field(default=None, description="This field represents the type of checkout")
41-
__properties: ClassVar[List[str]] = ["allowed_payment_methods", "expires_at", "failure_url", "monthly_installments_enabled", "monthly_installments_options", "max_failed_retries", "name", "on_demand_enabled", "redirection_time", "success_url", "type"]
42+
__properties: ClassVar[List[str]] = ["allowed_payment_methods", "plan_ids", "expires_at", "failure_url", "monthly_installments_enabled", "monthly_installments_options", "max_failed_retries", "name", "on_demand_enabled", "redirection_time", "success_url", "type"]
43+
44+
@field_validator('allowed_payment_methods')
45+
def allowed_payment_methods_validate_enum(cls, value):
46+
"""Validates the enum"""
47+
for i in value:
48+
if i not in set(['cash', 'card', 'bank_transfer', 'bnpl']):
49+
raise ValueError("each list item must be one of ('cash', 'card', 'bank_transfer', 'bnpl')")
50+
return value
4251

4352
model_config = ConfigDict(
4453
populate_by_name=True,
@@ -92,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92101

93102
_obj = cls.model_validate({
94103
"allowed_payment_methods": obj.get("allowed_payment_methods"),
104+
"plan_ids": obj.get("plan_ids"),
95105
"expires_at": obj.get("expires_at"),
96106
"failure_url": obj.get("failure_url"),
97107
"monthly_installments_enabled": obj.get("monthly_installments_enabled"),

conekta/models/checkout_response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CheckoutResponse(BaseModel):
2828
checkout response
2929
""" # noqa: E501
3030
allowed_payment_methods: Optional[List[StrictStr]] = Field(default=None, description="Are the payment methods available for this link")
31+
plan_ids: Optional[List[StrictStr]] = Field(default=None, description="List of plan IDs that are available for subscription")
3132
can_not_expire: Optional[StrictBool] = None
3233
emails_sent: Optional[StrictInt] = None
3334
exclude_card_networks: Optional[List[Dict[str, Any]]] = None
@@ -52,7 +53,7 @@ class CheckoutResponse(BaseModel):
5253
success_url: Optional[StrictStr] = None
5354
type: Optional[StrictStr] = None
5455
url: Optional[StrictStr] = None
55-
__properties: ClassVar[List[str]] = ["allowed_payment_methods", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "paid_payments_count", "payments_limit_count", "recurrent", "slug", "sms_sent", "starts_at", "status", "success_url", "type", "url"]
56+
__properties: ClassVar[List[str]] = ["allowed_payment_methods", "plan_ids", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "paid_payments_count", "payments_limit_count", "recurrent", "slug", "sms_sent", "starts_at", "status", "success_url", "type", "url"]
5657

5758
model_config = ConfigDict(
5859
populate_by_name=True,
@@ -111,6 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
111112

112113
_obj = cls.model_validate({
113114
"allowed_payment_methods": obj.get("allowed_payment_methods"),
115+
"plan_ids": obj.get("plan_ids"),
114116
"can_not_expire": obj.get("can_not_expire"),
115117
"emails_sent": obj.get("emails_sent"),
116118
"exclude_card_networks": obj.get("exclude_card_networks"),

config-python.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"licenseName": "MIT License",
88
"licenseUrl": "https://www.opensource.org/licenses/mit-license.php",
99
"generateSourceCodeOnly": "false",
10-
"packageVersion": "7.0.0",
10+
"packageVersion": "7.0.1",
1111
"packageUrl": "https://github.com/conekta/conekta-python",
1212
"projectName": "conekta",
1313
"templateDir": "/local/templates/python",
1414
"hasBearerMethods" : true,
1515
"useOneOfDiscriminatorLookup" : true,
1616
"nonCompliantUseDiscriminatorIfCompositionFails" : false,
17-
"httpUserAgent": "Conekta/v2 PythonBindings/7.0.0",
17+
"httpUserAgent": "Conekta/v2 PythonBindings/7.0.1",
1818
"files": {
1919
"/local/AUTHORS.md" : {},
2020
"/local/CODE_OF_CONDUCT.md": {},

docs/CheckoutOrderTemplate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**currency** | **str** | It is the currency in which the order will be created. It must be a valid ISO 4217 currency code. |
1010
**customer_info** | [**CheckoutOrderTemplateCustomerInfo**](CheckoutOrderTemplateCustomerInfo.md) | | [optional]
1111
**line_items** | [**List[Product]**](Product.md) | They are the products to buy. Each contains the \"unit price\" and \"quantity\" parameters that are used to calculate the total amount of the order. |
12+
**plan_ids** | **List[str]** | It is a list of plan IDs that will be associated with the order. | [optional]
1213
**metadata** | **Dict[str, object]** | It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format. | [optional]
1314

1415
## Example

docs/CheckoutRequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**allowed_payment_methods** | **List[str]** | Are the payment methods available for this link |
9+
**allowed_payment_methods** | **List[str]** | Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments. |
10+
**plan_ids** | **List[str]** | List of plan IDs that will be available for subscription. This field is required for subscription payments but optional for other types of payments. |
1011
**expires_at** | **int** | Unix timestamp of checkout expiration | [optional]
1112
**failure_url** | **str** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional]
1213
**monthly_installments_enabled** | **bool** | | [optional]

docs/CheckoutResponse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ checkout response
77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**allowed_payment_methods** | **List[str]** | Are the payment methods available for this link | [optional]
10+
**plan_ids** | **List[str]** | List of plan IDs that are available for subscription | [optional]
1011
**can_not_expire** | **bool** | | [optional]
1112
**emails_sent** | **int** | | [optional]
1213
**exclude_card_networks** | **List[object]** | | [optional]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "conekta"
3-
version = "7.0.0"
3+
version = "7.0.1"
44
description = "Conekta API"
55
authors = ["Engineering Conekta <[email protected]>"]
66
license = "MIT-LICENSE"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# prerequisite: setuptools
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "conekta"
25-
VERSION = "7.0.0"
25+
VERSION = "7.0.1"
2626
PYTHON_REQUIRES = ">= 3.8"
2727
REQUIRES = [
2828
"urllib3 >= 1.25.3, < 3.0.0",

0 commit comments

Comments
 (0)