diff --git a/docs/AdditionalCampaignProperties.md b/docs/AdditionalCampaignProperties.md index 85fd17e..cf8c890 100644 --- a/docs/AdditionalCampaignProperties.md +++ b/docs/AdditionalCampaignProperties.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**budgets** | [**list[CampaignBudget]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**budgets** | [**list[CampaignBudget]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | [optional] **coupon_redemption_count** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] **referral_redemption_count** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] **discount_count** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] diff --git a/docs/Campaign.md b/docs/Campaign.md index 19b500d..b6c93f2 100644 --- a/docs/Campaign.md +++ b/docs/Campaign.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **campaign_groups** | **list[int]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] **type** | **str** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] **linked_store_ids** | **list[int]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] -**budgets** | [**list[CampaignBudget]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**budgets** | [**list[CampaignBudget]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | [optional] **coupon_redemption_count** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] **referral_redemption_count** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] **discount_count** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] diff --git a/setup.py b/setup.py index a5539d4..3926535 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # http://pypi.python.org/pypi/setuptools NAME = "talon-one-python-sdk" -VERSION = "7.0.0" +VERSION = "7.0.1" # Get the long description from the README.md file here = pathlib.Path(__file__).parent.resolve() diff --git a/talon_one/__init__.py b/talon_one/__init__.py index bd58973..cd07fc7 100644 --- a/talon_one/__init__.py +++ b/talon_one/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "7.0.0" +__version__ = "7.0.1" # import apis into sdk package from talon_one.api.integration_api import IntegrationApi diff --git a/talon_one/api_client.py b/talon_one/api_client.py index fc6614d..e58f9e9 100644 --- a/talon_one/api_client.py +++ b/talon_one/api_client.py @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/7.0.0/python' + self.user_agent = 'OpenAPI-Generator/7.0.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/talon_one/configuration.py b/talon_one/configuration.py index 6da32de..ca40218 100644 --- a/talon_one/configuration.py +++ b/talon_one/configuration.py @@ -366,7 +366,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: \n"\ - "SDK Package Version: 7.0.0".\ + "SDK Package Version: 7.0.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/talon_one/models/additional_campaign_properties.py b/talon_one/models/additional_campaign_properties.py index 69b8183..aa8c894 100644 --- a/talon_one/models/additional_campaign_properties.py +++ b/talon_one/models/additional_campaign_properties.py @@ -115,7 +115,8 @@ def __init__(self, budgets=None, coupon_redemption_count=None, referral_redempti self._stores_imported = None self.discriminator = None - self.budgets = budgets + if budgets is not None: + self.budgets = budgets if coupon_redemption_count is not None: self.coupon_redemption_count = coupon_redemption_count if referral_redemption_count is not None: @@ -179,8 +180,6 @@ def budgets(self, budgets): :param budgets: The budgets of this AdditionalCampaignProperties. # noqa: E501 :type: list[CampaignBudget] """ - if self.local_vars_configuration.client_side_validation and budgets is None: # noqa: E501 - raise ValueError("Invalid value for `budgets`, must not be `None`") # noqa: E501 self._budgets = budgets diff --git a/talon_one/models/campaign.py b/talon_one/models/campaign.py index c477eab..06a16fa 100644 --- a/talon_one/models/campaign.py +++ b/talon_one/models/campaign.py @@ -220,7 +220,8 @@ def __init__(self, id=None, created=None, application_id=None, user_id=None, nam self.type = type if linked_store_ids is not None: self.linked_store_ids = linked_store_ids - self.budgets = budgets + if budgets is not None: + self.budgets = budgets if coupon_redemption_count is not None: self.coupon_redemption_count = coupon_redemption_count if referral_redemption_count is not None: @@ -776,8 +777,6 @@ def budgets(self, budgets): :param budgets: The budgets of this Campaign. # noqa: E501 :type: list[CampaignBudget] """ - if self.local_vars_configuration.client_side_validation and budgets is None: # noqa: E501 - raise ValueError("Invalid value for `budgets`, must not be `None`") # noqa: E501 self._budgets = budgets diff --git a/test/test_additional_campaign_properties.py b/test/test_additional_campaign_properties.py index 957f2cb..98ced2b 100644 --- a/test/test_additional_campaign_properties.py +++ b/test/test_additional_campaign_properties.py @@ -67,12 +67,6 @@ def make_instance(self, include_optional): ) else : return AdditionalCampaignProperties( - budgets = [ - talon_one.models.campaign_budget.CampaignBudget( - action = 'createCoupon', - limit = 1000.0, - counter = 42.0, ) - ], frontend_state = 'running', stores_imported = True, ) diff --git a/test/test_campaign.py b/test/test_campaign.py index d4b6385..30ab106 100644 --- a/test/test_campaign.py +++ b/test/test_campaign.py @@ -120,12 +120,6 @@ def make_instance(self, include_optional): entities = [Coupon], ) ], type = 'advanced', - budgets = [ - talon_one.models.campaign_budget.CampaignBudget( - action = 'createCoupon', - limit = 1000.0, - counter = 42.0, ) - ], frontend_state = 'running', stores_imported = True, )