Skip to content

Commit

Permalink
v5.0.1 (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski authored Nov 5, 2024
1 parent d34662e commit d34f1be
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 14 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ Remember that this SDK is auto generated (except of the tests) so changes made h

## 📅 Changelog

- **2024-11-04** - `5.0.1`
- Added support for returning `campaign_id` and `campaign_name` in stackable validation endpoint, when `redeemable` option is expanded
- **2024-10-28** - `5.0.0`
- Added missing `enums` in few filters models
- !!! BREAKING CHANGES !!!
Expand Down
2 changes: 2 additions & 0 deletions docs/ClientValidationsValidateResponseBodyRedeemablesItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Name | Type | Description | Notes
**result** | [**ClientValidationsValidateResponseBodyRedeemablesItemResult**](ClientValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
**campaign_name** | **str** | Campaign name | [optional]
**campaign_id** | **str** | Unique campaign ID assigned by Voucherify. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 2 additions & 0 deletions docs/ValidationsRedeemableInapplicable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Name | Type | Description | Notes
**result** | [**ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
**campaign_name** | **str** | Campaign name | [optional]
**campaign_id** | **str** | Unique campaign ID assigned by Voucherify. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 2 additions & 0 deletions docs/ValidationsRedeemableSkipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Name | Type | Description | Notes
**result** | [**ValidationsRedeemableSkippedResult**](ValidationsRedeemableSkippedResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
**campaign_name** | **str** | Campaign name | [optional]
**campaign_id** | **str** | Unique campaign ID assigned by Voucherify. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 2 additions & 0 deletions docs/ValidationsValidateResponseBodyRedeemablesItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Name | Type | Description | Notes
**result** | [**ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**List[CategoryWithStackingRulesType]**](CategoryWithStackingRulesType.md) | | [optional]
**campaign_name** | **str** | Campaign name | [optional]
**campaign_id** | **str** | Unique campaign ID assigned by Voucherify. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

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 = "voucherify"
version = "5.0.0"
version = "5.0.1"
description = "Voucherify API"
authors = ["Voucherify Team <[email protected]>"]
license = "MIT"
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 = "voucherify"
VERSION = "5.0.0"
VERSION = "5.0.1"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion voucherify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "5.0.0"
__version__ = "5.0.1"

# import apis into sdk package
from voucherify.api.async_actions_api import AsyncActionsApi
Expand Down
4 changes: 2 additions & 2 deletions voucherify/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def __init__(
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {
"X-Voucherify-Channel": "Python-SDK",
"User-Agent": "OpenAPI-Python-SDK/5.0.0"
"User-Agent": "OpenAPI-Python-SDK/5.0.1"
}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Python-SDK/5.0.0'
self.user_agent = 'OpenAPI-Python-SDK/5.0.1'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion voucherify/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2018-08-01\n"\
"SDK Package Version: 5.0.0".\
"SDK Package Version: 5.0.1".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class ClientValidationsValidateResponseBodyRedeemablesItem(BaseModel):
result: Optional[ClientValidationsValidateResponseBodyRedeemablesItemResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories"]
campaign_name: Optional[StrictStr] = Field(default=None, description="Campaign name")
campaign_id: Optional[StrictStr] = Field(default=None, description="Unique campaign ID assigned by Voucherify.")
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories", "campaign_name", "campaign_id"]

@field_validator('status')
def status_validate_enum(cls, value):
Expand Down Expand Up @@ -141,6 +143,16 @@ def to_dict(self) -> Dict[str, Any]:
if self.categories is None and "categories" in self.model_fields_set:
_dict['categories'] = None

# set to None if campaign_name (nullable) is None
# and model_fields_set contains the field
if self.campaign_name is None and "campaign_name" in self.model_fields_set:
_dict['campaign_name'] = None

# set to None if campaign_id (nullable) is None
# and model_fields_set contains the field
if self.campaign_id is None and "campaign_id" in self.model_fields_set:
_dict['campaign_id'] = None

return _dict

@classmethod
Expand All @@ -161,7 +173,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"result": ClientValidationsValidateResponseBodyRedeemablesItemResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"campaign_name": obj.get("campaign_name"),
"campaign_id": obj.get("campaign_id")
})
return _obj

Expand Down
18 changes: 16 additions & 2 deletions voucherify/models/validations_redeemable_inapplicable.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class ValidationsRedeemableInapplicable(BaseModel):
result: Optional[ValidationsRedeemableInapplicableResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories"]
campaign_name: Optional[StrictStr] = Field(default=None, description="Campaign name")
campaign_id: Optional[StrictStr] = Field(default=None, description="Unique campaign ID assigned by Voucherify.")
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories", "campaign_name", "campaign_id"]

@field_validator('status')
def status_validate_enum(cls, value):
Expand Down Expand Up @@ -136,6 +138,16 @@ def to_dict(self) -> Dict[str, Any]:
if self.categories is None and "categories" in self.model_fields_set:
_dict['categories'] = None

# set to None if campaign_name (nullable) is None
# and model_fields_set contains the field
if self.campaign_name is None and "campaign_name" in self.model_fields_set:
_dict['campaign_name'] = None

# set to None if campaign_id (nullable) is None
# and model_fields_set contains the field
if self.campaign_id is None and "campaign_id" in self.model_fields_set:
_dict['campaign_id'] = None

return _dict

@classmethod
Expand All @@ -153,7 +165,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object"),
"result": ValidationsRedeemableInapplicableResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"campaign_name": obj.get("campaign_name"),
"campaign_id": obj.get("campaign_id")
})
return _obj

Expand Down
18 changes: 16 additions & 2 deletions voucherify/models/validations_redeemable_skipped.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class ValidationsRedeemableSkipped(BaseModel):
result: Optional[ValidationsRedeemableSkippedResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories"]
campaign_name: Optional[StrictStr] = Field(default=None, description="Campaign name")
campaign_id: Optional[StrictStr] = Field(default=None, description="Unique campaign ID assigned by Voucherify.")
__properties: ClassVar[List[str]] = ["status", "id", "object", "result", "metadata", "categories", "campaign_name", "campaign_id"]

@field_validator('status')
def status_validate_enum(cls, value):
Expand Down Expand Up @@ -136,6 +138,16 @@ def to_dict(self) -> Dict[str, Any]:
if self.categories is None and "categories" in self.model_fields_set:
_dict['categories'] = None

# set to None if campaign_name (nullable) is None
# and model_fields_set contains the field
if self.campaign_name is None and "campaign_name" in self.model_fields_set:
_dict['campaign_name'] = None

# set to None if campaign_id (nullable) is None
# and model_fields_set contains the field
if self.campaign_id is None and "campaign_id" in self.model_fields_set:
_dict['campaign_id'] = None

return _dict

@classmethod
Expand All @@ -153,7 +165,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object"),
"result": ValidationsRedeemableSkippedResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"campaign_name": obj.get("campaign_name"),
"campaign_id": obj.get("campaign_id")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class ValidationsValidateResponseBodyRedeemablesItem(BaseModel):
result: Optional[ValidationsValidateResponseBodyRedeemablesItemResult] = None
metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.")
categories: Optional[List[CategoryWithStackingRulesType]] = None
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories"]
campaign_name: Optional[StrictStr] = Field(default=None, description="Campaign name")
campaign_id: Optional[StrictStr] = Field(default=None, description="Unique campaign ID assigned by Voucherify.")
__properties: ClassVar[List[str]] = ["status", "id", "object", "order", "applicable_to", "inapplicable_to", "result", "metadata", "categories", "campaign_name", "campaign_id"]

@field_validator('status')
def status_validate_enum(cls, value):
Expand Down Expand Up @@ -141,6 +143,16 @@ def to_dict(self) -> Dict[str, Any]:
if self.categories is None and "categories" in self.model_fields_set:
_dict['categories'] = None

# set to None if campaign_name (nullable) is None
# and model_fields_set contains the field
if self.campaign_name is None and "campaign_name" in self.model_fields_set:
_dict['campaign_name'] = None

# set to None if campaign_id (nullable) is None
# and model_fields_set contains the field
if self.campaign_id is None and "campaign_id" in self.model_fields_set:
_dict['campaign_id'] = None

return _dict

@classmethod
Expand All @@ -161,7 +173,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"inapplicable_to": InapplicableToResultList.from_dict(obj["inapplicable_to"]) if obj.get("inapplicable_to") is not None else None,
"result": ValidationsValidateResponseBodyRedeemablesItemResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
"metadata": obj.get("metadata"),
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
"categories": [CategoryWithStackingRulesType.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None,
"campaign_name": obj.get("campaign_name"),
"campaign_id": obj.get("campaign_id")
})
return _obj

Expand Down

0 comments on commit d34f1be

Please sign in to comment.