diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d8a7003..4be100e 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -275,6 +275,7 @@ docs/Export.md docs/ExtendLoyaltyPointsExpiryDateEffectProps.md docs/ExtendedCoupon.md docs/FeatureFlag.md +docs/FeatureFlagUpdate.md docs/FeaturesFeed.md docs/FuncArgDef.md docs/FunctionDef.md @@ -345,6 +346,7 @@ docs/IncreaseAchievementProgressEffectProps.md docs/InfluencingCampaignDetails.md docs/IntegrationApi.md docs/IntegrationCampaign.md +docs/IntegrationCampaignBase.md docs/IntegrationCoupon.md docs/IntegrationCustomerProfileAudienceRequest.md docs/IntegrationCustomerProfileAudienceRequestItem.md @@ -507,6 +509,7 @@ docs/NewReferralsForMultipleAdvocates.md docs/NewReturn.md docs/NewRevisionVersion.md docs/NewReward.md +docs/NewRiskNotification.md docs/NewRole.md docs/NewRoleV2.md docs/NewRuleset.md @@ -575,6 +578,7 @@ docs/RevisionActivation.md docs/RevisionActivationRequest.md docs/RevisionVersion.md docs/Reward.md +docs/RiskNotification.md docs/Role.md docs/RoleAssign.md docs/RoleMembership.md @@ -597,6 +601,7 @@ docs/RuleEligibility.md docs/RuleEligibilityFailureDetails.md docs/RuleFailureReason.md docs/RuleMetadata.md +docs/RuleMetadataEligibility.md docs/Ruleset.md docs/SSOConfig.md docs/SamlConnection.md @@ -995,6 +1000,7 @@ talon_one/models/export.py talon_one/models/extend_loyalty_points_expiry_date_effect_props.py talon_one/models/extended_coupon.py talon_one/models/feature_flag.py +talon_one/models/feature_flag_update.py talon_one/models/features_feed.py talon_one/models/func_arg_def.py talon_one/models/function_def.py @@ -1064,6 +1070,7 @@ talon_one/models/import_entity.py talon_one/models/increase_achievement_progress_effect_props.py talon_one/models/influencing_campaign_details.py talon_one/models/integration_campaign.py +talon_one/models/integration_campaign_base.py talon_one/models/integration_coupon.py talon_one/models/integration_customer_profile_audience_request.py talon_one/models/integration_customer_profile_audience_request_item.py @@ -1225,6 +1232,7 @@ talon_one/models/new_referrals_for_multiple_advocates.py talon_one/models/new_return.py talon_one/models/new_revision_version.py talon_one/models/new_reward.py +talon_one/models/new_risk_notification.py talon_one/models/new_role.py talon_one/models/new_role_v2.py talon_one/models/new_ruleset.py @@ -1293,6 +1301,7 @@ talon_one/models/revision_activation.py talon_one/models/revision_activation_request.py talon_one/models/revision_version.py talon_one/models/reward.py +talon_one/models/risk_notification.py talon_one/models/role.py talon_one/models/role_assign.py talon_one/models/role_membership.py @@ -1315,6 +1324,7 @@ talon_one/models/rule_eligibility.py talon_one/models/rule_eligibility_failure_details.py talon_one/models/rule_failure_reason.py talon_one/models/rule_metadata.py +talon_one/models/rule_metadata_eligibility.py talon_one/models/ruleset.py talon_one/models/saml_connection.py talon_one/models/saml_connection_internal.py @@ -1702,6 +1712,7 @@ test/test_export.py test/test_extend_loyalty_points_expiry_date_effect_props.py test/test_extended_coupon.py test/test_feature_flag.py +test/test_feature_flag_update.py test/test_features_feed.py test/test_func_arg_def.py test/test_function_def.py @@ -1772,6 +1783,7 @@ test/test_increase_achievement_progress_effect_props.py test/test_influencing_campaign_details.py test/test_integration_api.py test/test_integration_campaign.py +test/test_integration_campaign_base.py test/test_integration_coupon.py test/test_integration_customer_profile_audience_request.py test/test_integration_customer_profile_audience_request_item.py @@ -1934,6 +1946,7 @@ test/test_new_referrals_for_multiple_advocates.py test/test_new_return.py test/test_new_revision_version.py test/test_new_reward.py +test/test_new_risk_notification.py test/test_new_role.py test/test_new_role_v2.py test/test_new_ruleset.py @@ -2002,6 +2015,7 @@ test/test_revision_activation.py test/test_revision_activation_request.py test/test_revision_version.py test/test_reward.py +test/test_risk_notification.py test/test_role.py test/test_role_assign.py test/test_role_membership.py @@ -2024,6 +2038,7 @@ test/test_rule_eligibility.py test/test_rule_eligibility_failure_details.py test/test_rule_failure_reason.py test/test_rule_metadata.py +test/test_rule_metadata_eligibility.py test/test_ruleset.py test/test_saml_connection.py test/test_saml_connection_internal.py diff --git a/README.md b/README.md index 6369a39..1b58312 100644 --- a/README.md +++ b/README.md @@ -298,12 +298,12 @@ Class | Method | HTTP request | Description *ManagementApi* | [**get_experiment**](docs/ManagementApi.md#get_experiment) | **GET** /v1/applications/{applicationId}/experiments/{experimentId} | Get experiment in Application *ManagementApi* | [**get_exports**](docs/ManagementApi.md#get_exports) | **GET** /v1/exports | Get exports *ManagementApi* | [**get_loyalty_card**](docs/ManagementApi.md#get_loyalty_card) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card -*ManagementApi* | [**get_loyalty_card_transaction_logs**](docs/ManagementApi.md#get_loyalty_card_transaction_logs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions +*ManagementApi* | [**get_loyalty_card_transaction_logs**](docs/ManagementApi.md#get_loyalty_card_transaction_logs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions (Management API) *ManagementApi* | [**get_loyalty_cards**](docs/ManagementApi.md#get_loyalty_cards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards | List loyalty cards -*ManagementApi* | [**get_loyalty_ledger_balances**](docs/ManagementApi.md#get_loyalty_ledger_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_balances | Get customer's loyalty balances +*ManagementApi* | [**get_loyalty_ledger_balances**](docs/ManagementApi.md#get_loyalty_ledger_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_balances | Get customer's loyalty balances (Management API) *ManagementApi* | [**get_loyalty_points**](docs/ManagementApi.md#get_loyalty_points) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get customer's full loyalty ledger *ManagementApi* | [**get_loyalty_program**](docs/ManagementApi.md#get_loyalty_program) | **GET** /v1/loyalty_programs/{loyaltyProgramId} | Get loyalty program -*ManagementApi* | [**get_loyalty_program_profile_ledger_transactions**](docs/ManagementApi.md#get_loyalty_program_profile_ledger_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_transactions | List customer's loyalty transactions +*ManagementApi* | [**get_loyalty_program_profile_ledger_transactions**](docs/ManagementApi.md#get_loyalty_program_profile_ledger_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_transactions | List customer's loyalty transactions (Management API) *ManagementApi* | [**get_loyalty_program_transactions**](docs/ManagementApi.md#get_loyalty_program_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/transactions | List loyalty program transactions *ManagementApi* | [**get_loyalty_programs**](docs/ManagementApi.md#get_loyalty_programs) | **GET** /v1/loyalty_programs | List loyalty programs *ManagementApi* | [**get_loyalty_statistics**](docs/ManagementApi.md#get_loyalty_statistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics @@ -644,6 +644,7 @@ Class | Method | HTTP request | Description - [ExtendLoyaltyPointsExpiryDateEffectProps](docs/ExtendLoyaltyPointsExpiryDateEffectProps.md) - [ExtendedCoupon](docs/ExtendedCoupon.md) - [FeatureFlag](docs/FeatureFlag.md) +- [FeatureFlagUpdate](docs/FeatureFlagUpdate.md) - [FeaturesFeed](docs/FeaturesFeed.md) - [FuncArgDef](docs/FuncArgDef.md) - [FunctionDef](docs/FunctionDef.md) @@ -713,6 +714,7 @@ Class | Method | HTTP request | Description - [IncreaseAchievementProgressEffectProps](docs/IncreaseAchievementProgressEffectProps.md) - [InfluencingCampaignDetails](docs/InfluencingCampaignDetails.md) - [IntegrationCampaign](docs/IntegrationCampaign.md) +- [IntegrationCampaignBase](docs/IntegrationCampaignBase.md) - [IntegrationCoupon](docs/IntegrationCoupon.md) - [IntegrationCustomerProfileAudienceRequest](docs/IntegrationCustomerProfileAudienceRequest.md) - [IntegrationCustomerProfileAudienceRequestItem](docs/IntegrationCustomerProfileAudienceRequestItem.md) @@ -874,6 +876,7 @@ Class | Method | HTTP request | Description - [NewReturn](docs/NewReturn.md) - [NewRevisionVersion](docs/NewRevisionVersion.md) - [NewReward](docs/NewReward.md) +- [NewRiskNotification](docs/NewRiskNotification.md) - [NewRole](docs/NewRole.md) - [NewRoleV2](docs/NewRoleV2.md) - [NewRuleset](docs/NewRuleset.md) @@ -942,6 +945,7 @@ Class | Method | HTTP request | Description - [RevisionActivationRequest](docs/RevisionActivationRequest.md) - [RevisionVersion](docs/RevisionVersion.md) - [Reward](docs/Reward.md) +- [RiskNotification](docs/RiskNotification.md) - [Role](docs/Role.md) - [RoleAssign](docs/RoleAssign.md) - [RoleMembership](docs/RoleMembership.md) @@ -964,6 +968,7 @@ Class | Method | HTTP request | Description - [RuleEligibilityFailureDetails](docs/RuleEligibilityFailureDetails.md) - [RuleFailureReason](docs/RuleFailureReason.md) - [RuleMetadata](docs/RuleMetadata.md) +- [RuleMetadataEligibility](docs/RuleMetadataEligibility.md) - [Ruleset](docs/Ruleset.md) - [SSOConfig](docs/SSOConfig.md) - [SamlConnection](docs/SamlConnection.md) diff --git a/docs/CampaignEligibility.md b/docs/CampaignEligibility.md index 5e121eb..60d1ca9 100644 --- a/docs/CampaignEligibility.md +++ b/docs/CampaignEligibility.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID of Campaign. | **application_id** | **int** | The ID of the Application that owns this entity. | +**id** | **int** | Unique ID of Campaign. | **name** | **str** | The name of the campaign. | **description** | **str** | A detailed description of the campaign. | [optional] **start_time** | **datetime** | Timestamp when the campaign will become active. | [optional] @@ -15,8 +15,8 @@ Name | Type | Description | Notes **state** | **str** | The state of the campaign. | [default to 'enabled'] **tags** | **List[str]** | A list of tags for the campaign. | **features** | **List[str]** | The features enabled in this campaign. | -**rules** | [**List[RuleMetadata]**](RuleMetadata.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | [optional] **eligibility** | [**List[CampaignEligibilityDetails]**](CampaignEligibilityDetails.md) | The customer's eligibility for each campaign in the current customer session. | +**rules** | [**List[RuleMetadataEligibility]**](RuleMetadataEligibility.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | ## Example diff --git a/docs/Experiment.md b/docs/Experiment.md index 3b6e01b..0b6660a 100644 --- a/docs/Experiment.md +++ b/docs/Experiment.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **activated** | **datetime** | The date and time the experiment was activated. | [optional] **state** | **str** | A disabled experiment is not evaluated for rules or coupons. | [default to 'disabled'] **variants** | [**List[ExperimentVariant]**](ExperimentVariant.md) | | [optional] +**goal_type** | **str** | The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. | +**goal_description** | **str** | A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. | [optional] **deletedat** | **datetime** | The date and time the experiment was deleted. | [optional] ## Example diff --git a/docs/FeatureFlagUpdate.md b/docs/FeatureFlagUpdate.md new file mode 100644 index 0000000..c6bb48f --- /dev/null +++ b/docs/FeatureFlagUpdate.md @@ -0,0 +1,30 @@ +# FeatureFlagUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the feature flag. | +**value** | **str** | The value of the feature flag. | + +## Example + +```python +from talon_one.models.feature_flag_update import FeatureFlagUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of FeatureFlagUpdate from a JSON string +feature_flag_update_instance = FeatureFlagUpdate.from_json(json) +# print the JSON string representation of the object +print(FeatureFlagUpdate.to_json()) + +# convert the object into a dict +feature_flag_update_dict = feature_flag_update_instance.to_dict() +# create an instance of FeatureFlagUpdate from a dict +feature_flag_update_from_dict = FeatureFlagUpdate.from_dict(feature_flag_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationCampaign.md b/docs/IntegrationCampaign.md index 2bc04fa..763f5f0 100644 --- a/docs/IntegrationCampaign.md +++ b/docs/IntegrationCampaign.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **state** | **str** | The state of the campaign. | [default to 'enabled'] **tags** | **List[str]** | A list of tags for the campaign. | **features** | **List[str]** | The features enabled in this campaign. | -**rules** | [**List[RuleMetadata]**](RuleMetadata.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | [optional] +**rules** | [**List[RuleMetadata]**](RuleMetadata.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | ## Example diff --git a/docs/IntegrationCampaignBase.md b/docs/IntegrationCampaignBase.md new file mode 100644 index 0000000..02ece92 --- /dev/null +++ b/docs/IntegrationCampaignBase.md @@ -0,0 +1,38 @@ +# IntegrationCampaignBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **int** | The ID of the Application that owns this entity. | +**id** | **int** | Unique ID of Campaign. | +**name** | **str** | The name of the campaign. | +**description** | **str** | A detailed description of the campaign. | [optional] +**start_time** | **datetime** | Timestamp when the campaign will become active. | [optional] +**end_time** | **datetime** | Timestamp when the campaign will become inactive. | [optional] +**attributes** | **object** | Arbitrary properties associated with this campaign. | [optional] +**state** | **str** | The state of the campaign. | [default to 'enabled'] +**tags** | **List[str]** | A list of tags for the campaign. | +**features** | **List[str]** | The features enabled in this campaign. | + +## Example + +```python +from talon_one.models.integration_campaign_base import IntegrationCampaignBase + +# TODO update the JSON string below +json = "{}" +# create an instance of IntegrationCampaignBase from a JSON string +integration_campaign_base_instance = IntegrationCampaignBase.from_json(json) +# print the JSON string representation of the object +print(IntegrationCampaignBase.to_json()) + +# convert the object into a dict +integration_campaign_base_dict = integration_campaign_base_instance.to_dict() +# create an instance of IntegrationCampaignBase from a dict +integration_campaign_base_from_dict = IntegrationCampaignBase.from_dict(integration_campaign_base_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index de2e798..b073db3 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -110,12 +110,12 @@ Method | HTTP request | Description [**get_experiment**](ManagementApi.md#get_experiment) | **GET** /v1/applications/{applicationId}/experiments/{experimentId} | Get experiment in Application [**get_exports**](ManagementApi.md#get_exports) | **GET** /v1/exports | Get exports [**get_loyalty_card**](ManagementApi.md#get_loyalty_card) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card -[**get_loyalty_card_transaction_logs**](ManagementApi.md#get_loyalty_card_transaction_logs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions +[**get_loyalty_card_transaction_logs**](ManagementApi.md#get_loyalty_card_transaction_logs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions (Management API) [**get_loyalty_cards**](ManagementApi.md#get_loyalty_cards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards | List loyalty cards -[**get_loyalty_ledger_balances**](ManagementApi.md#get_loyalty_ledger_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_balances | Get customer's loyalty balances +[**get_loyalty_ledger_balances**](ManagementApi.md#get_loyalty_ledger_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_balances | Get customer's loyalty balances (Management API) [**get_loyalty_points**](ManagementApi.md#get_loyalty_points) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get customer's full loyalty ledger [**get_loyalty_program**](ManagementApi.md#get_loyalty_program) | **GET** /v1/loyalty_programs/{loyaltyProgramId} | Get loyalty program -[**get_loyalty_program_profile_ledger_transactions**](ManagementApi.md#get_loyalty_program_profile_ledger_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_transactions | List customer's loyalty transactions +[**get_loyalty_program_profile_ledger_transactions**](ManagementApi.md#get_loyalty_program_profile_ledger_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_transactions | List customer's loyalty transactions (Management API) [**get_loyalty_program_transactions**](ManagementApi.md#get_loyalty_program_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/transactions | List loyalty program transactions [**get_loyalty_programs**](ManagementApi.md#get_loyalty_programs) | **GET** /v1/loyalty_programs | List loyalty programs [**get_loyalty_statistics**](ManagementApi.md#get_loyalty_statistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics @@ -9639,11 +9639,17 @@ Name | Type | Description | Notes # **get_loyalty_card_transaction_logs** > GetLoyaltyCardTransactionLogs200Response get_loyalty_card_transaction_logs(loyalty_program_id, loyalty_card_id, start_date=start_date, end_date=end_date, page_size=page_size, skip=skip, subledger_id=subledger_id, customer_session_ids=customer_session_ids, transaction_uuids=transaction_uuids) -List card's transactions +List card's transactions (Management API) Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) -within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. -If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. +within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) +with filtering options applied. + +> [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: +> [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). + +If no filtering options are applied, the last 50 loyalty transactions for +the given loyalty card are returned. ### Example @@ -9688,7 +9694,7 @@ with talon_one.ApiClient(configuration) as api_client: transaction_uuids = ['transaction_uuids_example'] # List[str] | Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, `?transactionUUIDs=uuid1&transactionUUIDs=uuid2`. The response contains only data associated with the specified transactions. (optional) try: - # List card's transactions + # List card's transactions (Management API) api_response = api_instance.get_loyalty_card_transaction_logs(loyalty_program_id, loyalty_card_id, start_date=start_date, end_date=end_date, page_size=page_size, skip=skip, subledger_id=subledger_id, customer_session_ids=customer_session_ids, transaction_uuids=transaction_uuids) print("The response of ManagementApi->get_loyalty_card_transaction_logs:\n") pprint(api_response) @@ -9833,7 +9839,7 @@ Name | Type | Description | Notes # **get_loyalty_ledger_balances** > LoyaltyBalancesWithTiers get_loyalty_ledger_balances(loyalty_program_id, integration_id, end_date=end_date, subledger_id=subledger_id, include_tiers=include_tiers, include_projected_tier=include_projected_tier) -Get customer's loyalty balances +Get customer's loyalty balances (Management API) Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. @@ -9841,8 +9847,10 @@ specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. -> [!note] If no filtering options are applied, you retrieve all loyalty -> balances on the current date for the given integration ID. +> [!note] **Note** +> - For most use cases, especially real-time integrations, use the Integration API endpoint: + [Get customer's loyalty balances](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). +> - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances @@ -9896,7 +9904,7 @@ with talon_one.ApiClient(configuration) as api_client: include_projected_tier = False # bool | Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer's active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. (optional) (default to False) try: - # Get customer's loyalty balances + # Get customer's loyalty balances (Management API) api_response = api_instance.get_loyalty_ledger_balances(loyalty_program_id, integration_id, end_date=end_date, subledger_id=subledger_id, include_tiers=include_tiers, include_projected_tier=include_projected_tier) print("The response of ManagementApi->get_loyalty_ledger_balances:\n") pprint(api_response) @@ -10120,7 +10128,7 @@ Name | Type | Description | Notes # **get_loyalty_program_profile_ledger_transactions** > GetLoyaltyProgramProfileTransactions200Response get_loyalty_program_profile_ledger_transactions(loyalty_program_id, integration_id, customer_session_ids=customer_session_ids, transaction_uuids=transaction_uuids, subledger_id=subledger_id, loyalty_transaction_type=loyalty_transaction_type, start_date=start_date, end_date=end_date, page_size=page_size, skip=skip, awaits_activation=awaits_activation) -List customer's loyalty transactions +List customer's loyalty transactions (Management API) Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. @@ -10128,9 +10136,11 @@ Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. -> [!note] To retrieve all loyalty program transaction logs in a given -> loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) -> endpoint. +> [!note] **Note** +> - For most use cases, especially real-time integrations, use the Integration API endpoint: +> [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). +> - To retrieve all loyalty program transaction logs in a given loyalty program, use the +> [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint. ### Example @@ -10177,7 +10187,7 @@ with talon_one.ApiClient(configuration) as api_client: awaits_activation = True # bool | If `true`: Filters results to include only point transactions that have action-based activation and have not expired. If `false`: Returns a `400` response. (optional) try: - # List customer's loyalty transactions + # List customer's loyalty transactions (Management API) api_response = api_instance.get_loyalty_program_profile_ledger_transactions(loyalty_program_id, integration_id, customer_session_ids=customer_session_ids, transaction_uuids=transaction_uuids, subledger_id=subledger_id, loyalty_transaction_type=loyalty_transaction_type, start_date=start_date, end_date=end_date, page_size=page_size, skip=skip, awaits_activation=awaits_activation) print("The response of ManagementApi->get_loyalty_program_profile_ledger_transactions:\n") pprint(api_response) @@ -11437,7 +11447,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) collection_id = 56 # int | The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import data into existing account-level collection @@ -11456,7 +11466,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **int**| The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -11543,7 +11553,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) attribute_id = 56 # int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import allowed values for attribute @@ -11562,7 +11572,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **attribute_id** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -11646,7 +11656,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) audience_id = 56 # int | The ID of the audience. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import audience members @@ -11665,7 +11675,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **audience_id** | **int**| The ID of the audience. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -11742,7 +11752,7 @@ with talon_one.ApiClient(configuration) as api_client: campaign_id = 56 # int | The ID of the campaign. It is displayed in your Talon.One deployment URL. action = 'action_example' # str | The action that this budget is limiting. (optional) period = 'period_example' # str | The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. (optional) - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import campaign store budgets @@ -11764,7 +11774,7 @@ Name | Type | Description | Notes **campaign_id** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **action** | **str**| The action that this budget is limiting. | [optional] **period** | **str**| The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. | [optional] - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -11836,7 +11846,7 @@ with talon_one.ApiClient(configuration) as api_client: api_instance = talon_one.ManagementApi(api_client) application_id = 56 # int | The ID of the Application. It is displayed in your Talon.One deployment URL. campaign_id = 56 # int | The ID of the campaign. It is displayed in your Talon.One deployment URL. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import stores @@ -11856,7 +11866,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaign_id** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -11947,7 +11957,7 @@ with talon_one.ApiClient(configuration) as api_client: application_id = 56 # int | The ID of the Application. It is displayed in your Talon.One deployment URL. campaign_id = 56 # int | The ID of the campaign. It is displayed in your Talon.One deployment URL. collection_id = 56 # int | The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import data into existing campaign-level collection @@ -11968,7 +11978,7 @@ Name | Type | Description | Notes **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaign_id** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **collection_id** | **int**| The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12065,7 +12075,7 @@ with talon_one.ApiClient(configuration) as api_client: application_id = 56 # int | The ID of the Application. It is displayed in your Talon.One deployment URL. campaign_id = 56 # int | The ID of the campaign. It is displayed in your Talon.One deployment URL. skip_duplicates = True # bool | An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. (optional) - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import coupons @@ -12086,7 +12096,7 @@ Name | Type | Description | Notes **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaign_id** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **skip_duplicates** | **bool**| An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. | [optional] - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12171,7 +12181,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) loyalty_program_id = 56 # int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import loyalty cards @@ -12190,7 +12200,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyalty_program_id** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12299,7 +12309,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) loyalty_program_id = 56 # int | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import customers into loyalty tiers @@ -12318,7 +12328,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyalty_program_id** | **int**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12458,7 +12468,7 @@ with talon_one.ApiClient(configuration) as api_client: api_instance = talon_one.ManagementApi(api_client) loyalty_program_id = 56 # int | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. notifications_enabled = True # bool | Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. (optional) - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import loyalty points @@ -12478,7 +12488,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyalty_program_id** | **int**| Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **notifications_enabled** | **bool**| Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. | [optional] - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12573,7 +12583,7 @@ with talon_one.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = talon_one.ManagementApi(api_client) pool_id = 56 # int | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import giveaway codes into a giveaway pool @@ -12592,7 +12602,7 @@ with talon_one.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pool_id** | **int**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type @@ -12690,7 +12700,7 @@ with talon_one.ApiClient(configuration) as api_client: api_instance = talon_one.ManagementApi(api_client) application_id = 56 # int | The ID of the Application. It is displayed in your Talon.One deployment URL. campaign_id = 56 # int | The ID of the campaign. It is displayed in your Talon.One deployment URL. - up_file = 'up_file_example' # str | The file containing the data that is being imported. (optional) + up_file = None # bytes | The CSV file containing the data that is being imported. (optional) try: # Import referrals @@ -12710,7 +12720,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaign_id** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **up_file** | **str**| The file containing the data that is being imported. | [optional] + **up_file** | **bytes**| The CSV file containing the data that is being imported. | [optional] ### Return type diff --git a/docs/NewExperiment.md b/docs/NewExperiment.md index 8ef9cb1..ea5e2bc 100644 --- a/docs/NewExperiment.md +++ b/docs/NewExperiment.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **is_variant_assignment_external** | **bool** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | **campaign** | [**NewCampaign**](NewCampaign.md) | | +**goal_type** | **str** | The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. | +**goal_description** | **str** | A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. | [optional] ## Example diff --git a/docs/NewReward.md b/docs/NewReward.md index 1d1fce8..cd811f9 100644 --- a/docs/NewReward.md +++ b/docs/NewReward.md @@ -10,8 +10,6 @@ Name | Type | Description | Notes **description** | **str** | A description of the reward. | [optional] **application_ids** | **List[int]** | The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. | **sandbox** | **bool** | Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type. | -**rule** | [**List[Rule]**](Rule.md) | Rule to apply. | [optional] -**bindings** | [**List[Binding]**](Binding.md) | A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules. | [optional] ## Example diff --git a/docs/NewRiskNotification.md b/docs/NewRiskNotification.md new file mode 100644 index 0000000..35f711c --- /dev/null +++ b/docs/NewRiskNotification.md @@ -0,0 +1,32 @@ +# NewRiskNotification + +Data for creating a new risk notification. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity** | **str** | The entity type to analyze within the given time frame. | +**activity** | **str** | The activity metric to analyze within the given entity. | +**time_frame** | **str** | The rolling time window for risk evaluation. | + +## Example + +```python +from talon_one.models.new_risk_notification import NewRiskNotification + +# TODO update the JSON string below +json = "{}" +# create an instance of NewRiskNotification from a JSON string +new_risk_notification_instance = NewRiskNotification.from_json(json) +# print the JSON string representation of the object +print(NewRiskNotification.to_json()) + +# convert the object into a dict +new_risk_notification_dict = new_risk_notification_instance.to_dict() +# create an instance of NewRiskNotification from a dict +new_risk_notification_from_dict = NewRiskNotification.from_dict(new_risk_notification_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Reward.md b/docs/Reward.md index 478f66d..309c920 100644 --- a/docs/Reward.md +++ b/docs/Reward.md @@ -13,8 +13,10 @@ Name | Type | Description | Notes **description** | **str** | A description of the reward. | [optional] **application_ids** | **List[int]** | The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. | **sandbox** | **bool** | Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type. | -**rule** | [**List[Rule]**](Rule.md) | Rule to apply. | [optional] +**visibility_conditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] +**rule** | [**Rule**](Rule.md) | Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. | [optional] **bindings** | [**List[Binding]**](Binding.md) | A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules. | [optional] +**modified** | **datetime** | The timestamp when the reward was last updated in RFC3339 format. | [optional] **status** | **str** | The status of the reward. | ## Example diff --git a/docs/RiskNotification.md b/docs/RiskNotification.md new file mode 100644 index 0000000..78b5c01 --- /dev/null +++ b/docs/RiskNotification.md @@ -0,0 +1,36 @@ +# RiskNotification + +A risk notification configuration rule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The internal ID of this entity. | +**created** | **datetime** | The time this entity was created. | +**entity** | **str** | The entity type to analyze within the given time frame. | +**activity** | **str** | The activity metric to analyze within the given entity. | +**time_frame** | **str** | The rolling time window for risk evaluation. | +**active** | **bool** | Indicates whether this risk notification is active. | +**modified** | **datetime** | Timestamp of the most recent update. | + +## Example + +```python +from talon_one.models.risk_notification import RiskNotification + +# TODO update the JSON string below +json = "{}" +# create an instance of RiskNotification from a JSON string +risk_notification_instance = RiskNotification.from_json(json) +# print the JSON string representation of the object +print(RiskNotification.to_json()) + +# convert the object into a dict +risk_notification_dict = risk_notification_instance.to_dict() +# create an instance of RiskNotification from a dict +risk_notification_from_dict = RiskNotification.from_dict(risk_notification_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RuleMetadata.md b/docs/RuleMetadata.md index 665e3bc..d7487d7 100644 --- a/docs/RuleMetadata.md +++ b/docs/RuleMetadata.md @@ -9,7 +9,6 @@ Name | Type | Description | Notes **display_name** | **str** | A customer-facing name for the rule. | [optional] **display_description** | **str** | A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. | [optional] **related_data** | **str** | Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. | [optional] -**eligibility** | [**List[RuleEligibility]**](RuleEligibility.md) | | [optional] ## Example diff --git a/docs/RuleMetadataEligibility.md b/docs/RuleMetadataEligibility.md new file mode 100644 index 0000000..aa05dae --- /dev/null +++ b/docs/RuleMetadataEligibility.md @@ -0,0 +1,33 @@ +# RuleMetadataEligibility + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | A short description of the rule. | +**display_name** | **str** | A customer-facing name for the rule. | [optional] +**display_description** | **str** | A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. | [optional] +**related_data** | **str** | Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. | [optional] +**eligibility** | [**List[RuleEligibility]**](RuleEligibility.md) | | + +## Example + +```python +from talon_one.models.rule_metadata_eligibility import RuleMetadataEligibility + +# TODO update the JSON string below +json = "{}" +# create an instance of RuleMetadataEligibility from a JSON string +rule_metadata_eligibility_instance = RuleMetadataEligibility.from_json(json) +# print the JSON string representation of the object +print(RuleMetadataEligibility.to_json()) + +# convert the object into a dict +rule_metadata_eligibility_dict = rule_metadata_eligibility_instance.to_dict() +# create an instance of RuleMetadataEligibility from a dict +rule_metadata_eligibility_from_dict = RuleMetadataEligibility.from_dict(rule_metadata_eligibility_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StrikethroughLabelingNotification.md b/docs/StrikethroughLabelingNotification.md index b78760b..a1b04e1 100644 --- a/docs/StrikethroughLabelingNotification.md +++ b/docs/StrikethroughLabelingNotification.md @@ -6,7 +6,7 @@ The strikethrough labels notification for an application. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**version** | **str** | The version of the strikethrough pricing notification. | [optional] +**version** | **str** | The version of the strikethrough pricing notification. Set for **scheduled** strikethrough pricing updates only. | [optional] **valid_from** | **datetime** | Timestamp at which the strikethrough pricing update becomes valid. Set for **scheduled** strikethrough pricing updates (version: v2) only. | [optional] **application_id** | **int** | The ID of the Application to which the catalog items labels belongs. | **current_batch** | **int** | The batch number of the notification. Notifications might be sent in different batches. | diff --git a/docs/StrikethroughSetDiscountPerItemEffectProps.md b/docs/StrikethroughSetDiscountPerItemEffectProps.md index 21c556c..966d8f0 100644 --- a/docs/StrikethroughSetDiscountPerItemEffectProps.md +++ b/docs/StrikethroughSetDiscountPerItemEffectProps.md @@ -6,9 +6,9 @@ setDiscountPerItem effect in strikethrough pricing payload. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | effect name. | +**name** | **str** | The effect name. | **value** | **object** | | -**excluded_from_price_history** | **bool** | | [optional] +**excluded_from_price_history** | **bool** | When set to `true`, the applied discount is excluded from the item's price history. | [optional] ## Example diff --git a/docs/StrikethroughSetDiscountPerItemMemberEffectProps.md b/docs/StrikethroughSetDiscountPerItemMemberEffectProps.md index 2bbc89b..0ad4bf9 100644 --- a/docs/StrikethroughSetDiscountPerItemMemberEffectProps.md +++ b/docs/StrikethroughSetDiscountPerItemMemberEffectProps.md @@ -6,7 +6,7 @@ setDiscountPerItem member effect in strikethrough pricing payload. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | effect name. | +**name** | **str** | The effect name. | **value** | **object** | | ## Example diff --git a/docs/UpdateExperiment.md b/docs/UpdateExperiment.md index 0be89e3..07495ca 100644 --- a/docs/UpdateExperiment.md +++ b/docs/UpdateExperiment.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **is_variant_assignment_external** | **bool** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | **campaign** | [**UpdateCampaign**](UpdateCampaign.md) | | +**goal_type** | **str** | The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. | [optional] +**goal_description** | **str** | A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. | [optional] ## Example diff --git a/docs/UpdateReward.md b/docs/UpdateReward.md index 9f454ef..d1987d7 100644 --- a/docs/UpdateReward.md +++ b/docs/UpdateReward.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes **name** | **str** | The name of the reward. | **description** | **str** | A description of the reward. | [optional] **status** | **str** | The status of the reward. | -**rule** | [**List[Rule]**](Rule.md) | Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. | [optional] +**visibility_conditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] +**rule** | [**Rule**](Rule.md) | Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. | [optional] **bindings** | [**List[Binding]**](Binding.md) | A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules. | [optional] ## Example diff --git a/pyproject.toml b/pyproject.toml index 1ab7ea2..283b03b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "talon-one-sdk" -version = "26.09.0" +version = "26.10.0" description = "Talon.One API" authors = [ {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, diff --git a/setup.py b/setup.py index 261cbc3..8607535 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # http://pypi.python.org/pypi/setuptools NAME = "talon-one-sdk" -VERSION = "26.09.0" +VERSION = "26.10.0" # 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 9edc444..46d49f4 100644 --- a/talon_one/__init__.py +++ b/talon_one/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "26.09.0" +__version__ = "26.10.0" # Define package exports __all__ = [ @@ -294,6 +294,7 @@ "ExtendLoyaltyPointsExpiryDateEffectProps", "ExtendedCoupon", "FeatureFlag", + "FeatureFlagUpdate", "FeaturesFeed", "FuncArgDef", "FunctionDef", @@ -363,6 +364,7 @@ "IncreaseAchievementProgressEffectProps", "InfluencingCampaignDetails", "IntegrationCampaign", + "IntegrationCampaignBase", "IntegrationCoupon", "IntegrationCustomerProfileAudienceRequest", "IntegrationCustomerProfileAudienceRequestItem", @@ -524,6 +526,7 @@ "NewReturn", "NewRevisionVersion", "NewReward", + "NewRiskNotification", "NewRole", "NewRoleV2", "NewRuleset", @@ -592,6 +595,7 @@ "RevisionActivationRequest", "RevisionVersion", "Reward", + "RiskNotification", "Role", "RoleAssign", "RoleMembership", @@ -614,6 +618,7 @@ "RuleEligibilityFailureDetails", "RuleFailureReason", "RuleMetadata", + "RuleMetadataEligibility", "Ruleset", "SSOConfig", "SamlConnection", @@ -1015,6 +1020,7 @@ from talon_one.models.extend_loyalty_points_expiry_date_effect_props import ExtendLoyaltyPointsExpiryDateEffectProps as ExtendLoyaltyPointsExpiryDateEffectProps from talon_one.models.extended_coupon import ExtendedCoupon as ExtendedCoupon from talon_one.models.feature_flag import FeatureFlag as FeatureFlag +from talon_one.models.feature_flag_update import FeatureFlagUpdate as FeatureFlagUpdate from talon_one.models.features_feed import FeaturesFeed as FeaturesFeed from talon_one.models.func_arg_def import FuncArgDef as FuncArgDef from talon_one.models.function_def import FunctionDef as FunctionDef @@ -1084,6 +1090,7 @@ from talon_one.models.increase_achievement_progress_effect_props import IncreaseAchievementProgressEffectProps as IncreaseAchievementProgressEffectProps from talon_one.models.influencing_campaign_details import InfluencingCampaignDetails as InfluencingCampaignDetails from talon_one.models.integration_campaign import IntegrationCampaign as IntegrationCampaign +from talon_one.models.integration_campaign_base import IntegrationCampaignBase as IntegrationCampaignBase from talon_one.models.integration_coupon import IntegrationCoupon as IntegrationCoupon from talon_one.models.integration_customer_profile_audience_request import IntegrationCustomerProfileAudienceRequest as IntegrationCustomerProfileAudienceRequest from talon_one.models.integration_customer_profile_audience_request_item import IntegrationCustomerProfileAudienceRequestItem as IntegrationCustomerProfileAudienceRequestItem @@ -1245,6 +1252,7 @@ from talon_one.models.new_return import NewReturn as NewReturn from talon_one.models.new_revision_version import NewRevisionVersion as NewRevisionVersion from talon_one.models.new_reward import NewReward as NewReward +from talon_one.models.new_risk_notification import NewRiskNotification as NewRiskNotification from talon_one.models.new_role import NewRole as NewRole from talon_one.models.new_role_v2 import NewRoleV2 as NewRoleV2 from talon_one.models.new_ruleset import NewRuleset as NewRuleset @@ -1313,6 +1321,7 @@ from talon_one.models.revision_activation_request import RevisionActivationRequest as RevisionActivationRequest from talon_one.models.revision_version import RevisionVersion as RevisionVersion from talon_one.models.reward import Reward as Reward +from talon_one.models.risk_notification import RiskNotification as RiskNotification from talon_one.models.role import Role as Role from talon_one.models.role_assign import RoleAssign as RoleAssign from talon_one.models.role_membership import RoleMembership as RoleMembership @@ -1335,6 +1344,7 @@ from talon_one.models.rule_eligibility_failure_details import RuleEligibilityFailureDetails as RuleEligibilityFailureDetails from talon_one.models.rule_failure_reason import RuleFailureReason as RuleFailureReason from talon_one.models.rule_metadata import RuleMetadata as RuleMetadata +from talon_one.models.rule_metadata_eligibility import RuleMetadataEligibility as RuleMetadataEligibility from talon_one.models.ruleset import Ruleset as Ruleset from talon_one.models.sso_config import SSOConfig as SSOConfig from talon_one.models.saml_connection import SamlConnection as SamlConnection diff --git a/talon_one/api/management_api.py b/talon_one/api/management_api.py index a95fe19..865716a 100644 --- a/talon_one/api/management_api.py +++ b/talon_one/api/management_api.py @@ -17,7 +17,7 @@ from datetime import datetime from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from talon_one.models.account import Account from talon_one.models.account_additional_cost import AccountAdditionalCost @@ -33981,9 +33981,9 @@ def get_loyalty_card_transaction_logs( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetLoyaltyCardTransactionLogs200Response: - """List card's transactions + """List card's transactions (Management API) - Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. + Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. > [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: > [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -34082,9 +34082,9 @@ def get_loyalty_card_transaction_logs_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetLoyaltyCardTransactionLogs200Response]: - """List card's transactions + """List card's transactions (Management API) - Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. + Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. > [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: > [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -34183,9 +34183,9 @@ def get_loyalty_card_transaction_logs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List card's transactions + """List card's transactions (Management API) - Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. + Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. > [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: > [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -34768,9 +34768,9 @@ def get_loyalty_ledger_balances( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LoyaltyBalancesWithTiers: - """Get customer's loyalty balances + """Get customer's loyalty balances (Management API) - Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] If no filtering options are applied, you retrieve all loyalty > balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: [Get customer's loyalty balances](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). > - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -34858,9 +34858,9 @@ def get_loyalty_ledger_balances_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LoyaltyBalancesWithTiers]: - """Get customer's loyalty balances + """Get customer's loyalty balances (Management API) - Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] If no filtering options are applied, you retrieve all loyalty > balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: [Get customer's loyalty balances](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). > - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -34948,9 +34948,9 @@ def get_loyalty_ledger_balances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get customer's loyalty balances + """Get customer's loyalty balances (Management API) - Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] If no filtering options are applied, you retrieve all loyalty > balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: [Get customer's loyalty balances](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). > - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -35675,9 +35675,9 @@ def get_loyalty_program_profile_ledger_transactions( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetLoyaltyProgramProfileTransactions200Response: - """List customer's loyalty transactions + """List customer's loyalty transactions (Management API) - Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] To retrieve all loyalty program transaction logs in a given > loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) > endpoint. + Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: > [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). > - To retrieve all loyalty program transaction logs in a given loyalty program, use the > [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint. :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -35785,9 +35785,9 @@ def get_loyalty_program_profile_ledger_transactions_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetLoyaltyProgramProfileTransactions200Response]: - """List customer's loyalty transactions + """List customer's loyalty transactions (Management API) - Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] To retrieve all loyalty program transaction logs in a given > loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) > endpoint. + Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: > [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). > - To retrieve all loyalty program transaction logs in a given loyalty program, use the > [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint. :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -35895,9 +35895,9 @@ def get_loyalty_program_profile_ledger_transactions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List customer's loyalty transactions + """List customer's loyalty transactions (Management API) - Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] To retrieve all loyalty program transaction logs in a given > loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) > endpoint. + Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] **Note** > - For most use cases, especially real-time integrations, use the Integration API endpoint: > [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). > - To retrieve all loyalty program transaction logs in a given loyalty program, use the > [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint. :param loyalty_program_id: Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int @@ -40371,7 +40371,7 @@ def _get_webhooks_serialize( def import_account_collection( self, collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40391,8 +40391,8 @@ def import_account_collection( :param collection_id: The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40444,7 +40444,7 @@ def import_account_collection( def import_account_collection_with_http_info( self, collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40464,8 +40464,8 @@ def import_account_collection_with_http_info( :param collection_id: The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40517,7 +40517,7 @@ def import_account_collection_with_http_info( def import_account_collection_without_preload_content( self, collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40537,8 +40537,8 @@ def import_account_collection_without_preload_content( :param collection_id: The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40613,7 +40613,7 @@ def _import_account_collection_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -40666,7 +40666,7 @@ def _import_account_collection_serialize( def import_allowed_list( self, attribute_id: Annotated[StrictInt, Field(description="The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40686,8 +40686,8 @@ def import_allowed_list( :param attribute_id: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) :type attribute_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40740,7 +40740,7 @@ def import_allowed_list( def import_allowed_list_with_http_info( self, attribute_id: Annotated[StrictInt, Field(description="The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40760,8 +40760,8 @@ def import_allowed_list_with_http_info( :param attribute_id: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) :type attribute_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40814,7 +40814,7 @@ def import_allowed_list_with_http_info( def import_allowed_list_without_preload_content( self, attribute_id: Annotated[StrictInt, Field(description="The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40834,8 +40834,8 @@ def import_allowed_list_without_preload_content( :param attribute_id: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) :type attribute_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -40911,7 +40911,7 @@ def _import_allowed_list_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -40964,7 +40964,7 @@ def _import_allowed_list_serialize( def import_audiences_memberships( self, audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -40984,8 +40984,8 @@ def import_audiences_memberships( :param audience_id: The ID of the audience. (required) :type audience_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41038,7 +41038,7 @@ def import_audiences_memberships( def import_audiences_memberships_with_http_info( self, audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41058,8 +41058,8 @@ def import_audiences_memberships_with_http_info( :param audience_id: The ID of the audience. (required) :type audience_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41112,7 +41112,7 @@ def import_audiences_memberships_with_http_info( def import_audiences_memberships_without_preload_content( self, audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41132,8 +41132,8 @@ def import_audiences_memberships_without_preload_content( :param audience_id: The ID of the audience. (required) :type audience_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41209,7 +41209,7 @@ def _import_audiences_memberships_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -41265,7 +41265,7 @@ def import_campaign_store_budget( campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], action: Annotated[Optional[StrictStr], Field(description="The action that this budget is limiting.")] = None, period: Annotated[Optional[StrictStr], Field(description="The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41291,8 +41291,8 @@ def import_campaign_store_budget( :type action: str :param period: The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. :type period: str - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41349,7 +41349,7 @@ def import_campaign_store_budget_with_http_info( campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], action: Annotated[Optional[StrictStr], Field(description="The action that this budget is limiting.")] = None, period: Annotated[Optional[StrictStr], Field(description="The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41375,8 +41375,8 @@ def import_campaign_store_budget_with_http_info( :type action: str :param period: The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. :type period: str - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41433,7 +41433,7 @@ def import_campaign_store_budget_without_preload_content( campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], action: Annotated[Optional[StrictStr], Field(description="The action that this budget is limiting.")] = None, period: Annotated[Optional[StrictStr], Field(description="The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41459,8 +41459,8 @@ def import_campaign_store_budget_without_preload_content( :type action: str :param period: The period to which the limit applies. **Note**: For budgets with no period, set this to `overall`. :type period: str - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41550,7 +41550,7 @@ def _import_campaign_store_budget_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -41604,7 +41604,7 @@ def import_campaign_stores( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41626,8 +41626,8 @@ def import_campaign_stores( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41682,7 +41682,7 @@ def import_campaign_stores_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41704,8 +41704,8 @@ def import_campaign_stores_with_http_info( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41760,7 +41760,7 @@ def import_campaign_stores_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41782,8 +41782,8 @@ def import_campaign_stores_without_preload_content( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41863,7 +41863,7 @@ def _import_campaign_stores_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -41918,7 +41918,7 @@ def import_collection( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -41942,8 +41942,8 @@ def import_collection( :type campaign_id: int :param collection_id: The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -41998,7 +41998,7 @@ def import_collection_with_http_info( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42022,8 +42022,8 @@ def import_collection_with_http_info( :type campaign_id: int :param collection_id: The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42078,7 +42078,7 @@ def import_collection_without_preload_content( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], collection_id: Annotated[StrictInt, Field(description="The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42102,8 +42102,8 @@ def import_collection_without_preload_content( :type campaign_id: int :param collection_id: The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint. (required) :type collection_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42185,7 +42185,7 @@ def _import_collection_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -42240,7 +42240,7 @@ def import_coupons( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], skip_duplicates: Annotated[Optional[StrictBool], Field(description="An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42264,8 +42264,8 @@ def import_coupons( :type campaign_id: int :param skip_duplicates: An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. :type skip_duplicates: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42319,7 +42319,7 @@ def import_coupons_with_http_info( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], skip_duplicates: Annotated[Optional[StrictBool], Field(description="An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42343,8 +42343,8 @@ def import_coupons_with_http_info( :type campaign_id: int :param skip_duplicates: An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. :type skip_duplicates: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42398,7 +42398,7 @@ def import_coupons_without_preload_content( application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], skip_duplicates: Annotated[Optional[StrictBool], Field(description="An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42422,8 +42422,8 @@ def import_coupons_without_preload_content( :type campaign_id: int :param skip_duplicates: An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. :type skip_duplicates: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42506,7 +42506,7 @@ def _import_coupons_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -42559,7 +42559,7 @@ def _import_coupons_serialize( def import_loyalty_cards( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42579,8 +42579,8 @@ def import_loyalty_cards( :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42632,7 +42632,7 @@ def import_loyalty_cards( def import_loyalty_cards_with_http_info( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42652,8 +42652,8 @@ def import_loyalty_cards_with_http_info( :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42705,7 +42705,7 @@ def import_loyalty_cards_with_http_info( def import_loyalty_cards_without_preload_content( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42725,8 +42725,8 @@ def import_loyalty_cards_without_preload_content( :param loyalty_program_id: Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42801,7 +42801,7 @@ def _import_loyalty_cards_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -42854,7 +42854,7 @@ def _import_loyalty_cards_serialize( def import_loyalty_customers_tiers( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42874,8 +42874,8 @@ def import_loyalty_customers_tiers( :param loyalty_program_id: Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -42928,7 +42928,7 @@ def import_loyalty_customers_tiers( def import_loyalty_customers_tiers_with_http_info( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -42948,8 +42948,8 @@ def import_loyalty_customers_tiers_with_http_info( :param loyalty_program_id: Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43002,7 +43002,7 @@ def import_loyalty_customers_tiers_with_http_info( def import_loyalty_customers_tiers_without_preload_content( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43022,8 +43022,8 @@ def import_loyalty_customers_tiers_without_preload_content( :param loyalty_program_id: Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) :type loyalty_program_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43099,7 +43099,7 @@ def _import_loyalty_customers_tiers_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -43153,7 +43153,7 @@ def import_loyalty_points( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], notifications_enabled: Annotated[Optional[StrictBool], Field(description="Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43175,8 +43175,8 @@ def import_loyalty_points( :type loyalty_program_id: int :param notifications_enabled: Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. :type notifications_enabled: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43228,7 +43228,7 @@ def import_loyalty_points_with_http_info( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], notifications_enabled: Annotated[Optional[StrictBool], Field(description="Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43250,8 +43250,8 @@ def import_loyalty_points_with_http_info( :type loyalty_program_id: int :param notifications_enabled: Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. :type notifications_enabled: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43303,7 +43303,7 @@ def import_loyalty_points_without_preload_content( self, loyalty_program_id: Annotated[StrictInt, Field(description="Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. ")], notifications_enabled: Annotated[Optional[StrictBool], Field(description="Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. ")] = None, - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43325,8 +43325,8 @@ def import_loyalty_points_without_preload_content( :type loyalty_program_id: int :param notifications_enabled: Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer's tier or offsets their negative points balance. This parameter is optional and defaults to `true`. :type notifications_enabled: bool - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43405,7 +43405,7 @@ def _import_loyalty_points_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -43458,7 +43458,7 @@ def _import_loyalty_points_serialize( def import_pool_giveaways( self, pool_id: Annotated[StrictInt, Field(description="The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43478,8 +43478,8 @@ def import_pool_giveaways( :param pool_id: The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) :type pool_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43529,7 +43529,7 @@ def import_pool_giveaways( def import_pool_giveaways_with_http_info( self, pool_id: Annotated[StrictInt, Field(description="The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43549,8 +43549,8 @@ def import_pool_giveaways_with_http_info( :param pool_id: The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) :type pool_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43600,7 +43600,7 @@ def import_pool_giveaways_with_http_info( def import_pool_giveaways_without_preload_content( self, pool_id: Annotated[StrictInt, Field(description="The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43620,8 +43620,8 @@ def import_pool_giveaways_without_preload_content( :param pool_id: The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) :type pool_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43694,7 +43694,7 @@ def _import_pool_giveaways_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter @@ -43748,7 +43748,7 @@ def import_referrals( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43770,8 +43770,8 @@ def import_referrals( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43823,7 +43823,7 @@ def import_referrals_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43845,8 +43845,8 @@ def import_referrals_with_http_info( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43898,7 +43898,7 @@ def import_referrals_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], campaign_id: Annotated[StrictInt, Field(description="The ID of the campaign. It is displayed in your Talon.One deployment URL.")], - up_file: Annotated[Optional[StrictStr], Field(description="The file containing the data that is being imported.")] = None, + up_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The CSV file containing the data that is being imported.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43920,8 +43920,8 @@ def import_referrals_without_preload_content( :type application_id: int :param campaign_id: The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) :type campaign_id: int - :param up_file: The file containing the data that is being imported. - :type up_file: str + :param up_file: The CSV file containing the data that is being imported. + :type up_file: bytes :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -43998,7 +43998,7 @@ def _import_referrals_serialize( # process the header parameters # process the form parameters if up_file is not None: - _form_params.append(('upFile', up_file)) + _files['upFile'] = up_file # process the body parameter diff --git a/talon_one/api_client.py b/talon_one/api_client.py index 42a61b1..fe67c92 100644 --- a/talon_one/api_client.py +++ b/talon_one/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/26.09.0/python' + self.user_agent = 'OpenAPI-Generator/26.10.0/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 fbc83c5..0a39eb3 100644 --- a/talon_one/configuration.py +++ b/talon_one/configuration.py @@ -554,7 +554,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: \n"\ - "SDK Package Version: 26.09.0".\ + "SDK Package Version: 26.10.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/talon_one/models/__init__.py b/talon_one/models/__init__.py index 965612a..d5ca8ec 100644 --- a/talon_one/models/__init__.py +++ b/talon_one/models/__init__.py @@ -278,6 +278,7 @@ from talon_one.models.extend_loyalty_points_expiry_date_effect_props import ExtendLoyaltyPointsExpiryDateEffectProps from talon_one.models.extended_coupon import ExtendedCoupon from talon_one.models.feature_flag import FeatureFlag +from talon_one.models.feature_flag_update import FeatureFlagUpdate from talon_one.models.features_feed import FeaturesFeed from talon_one.models.func_arg_def import FuncArgDef from talon_one.models.function_def import FunctionDef @@ -347,6 +348,7 @@ from talon_one.models.increase_achievement_progress_effect_props import IncreaseAchievementProgressEffectProps from talon_one.models.influencing_campaign_details import InfluencingCampaignDetails from talon_one.models.integration_campaign import IntegrationCampaign +from talon_one.models.integration_campaign_base import IntegrationCampaignBase from talon_one.models.integration_coupon import IntegrationCoupon from talon_one.models.integration_customer_profile_audience_request import IntegrationCustomerProfileAudienceRequest from talon_one.models.integration_customer_profile_audience_request_item import IntegrationCustomerProfileAudienceRequestItem @@ -508,6 +510,7 @@ from talon_one.models.new_return import NewReturn from talon_one.models.new_revision_version import NewRevisionVersion from talon_one.models.new_reward import NewReward +from talon_one.models.new_risk_notification import NewRiskNotification from talon_one.models.new_role import NewRole from talon_one.models.new_role_v2 import NewRoleV2 from talon_one.models.new_ruleset import NewRuleset @@ -576,6 +579,7 @@ from talon_one.models.revision_activation_request import RevisionActivationRequest from talon_one.models.revision_version import RevisionVersion from talon_one.models.reward import Reward +from talon_one.models.risk_notification import RiskNotification from talon_one.models.role import Role from talon_one.models.role_assign import RoleAssign from talon_one.models.role_membership import RoleMembership @@ -598,6 +602,7 @@ from talon_one.models.rule_eligibility_failure_details import RuleEligibilityFailureDetails from talon_one.models.rule_failure_reason import RuleFailureReason from talon_one.models.rule_metadata import RuleMetadata +from talon_one.models.rule_metadata_eligibility import RuleMetadataEligibility from talon_one.models.ruleset import Ruleset from talon_one.models.sso_config import SSOConfig from talon_one.models.saml_connection import SamlConnection diff --git a/talon_one/models/campaign_eligibility.py b/talon_one/models/campaign_eligibility.py index 11ba01c..ebe412d 100644 --- a/talon_one/models/campaign_eligibility.py +++ b/talon_one/models/campaign_eligibility.py @@ -22,7 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from talon_one.models.campaign_eligibility_details import CampaignEligibilityDetails -from talon_one.models.rule_metadata import RuleMetadata +from talon_one.models.rule_metadata_eligibility import RuleMetadataEligibility from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,8 +31,8 @@ class CampaignEligibility(BaseModel): """ CampaignEligibility """ # noqa: E501 - id: StrictInt = Field(description="Unique ID of Campaign.") application_id: StrictInt = Field(description="The ID of the Application that owns this entity.", alias="applicationId") + id: StrictInt = Field(description="Unique ID of Campaign.") name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the campaign.") description: Optional[StrictStr] = Field(default=None, description="A detailed description of the campaign.") start_time: Optional[datetime] = Field(default=None, description="Timestamp when the campaign will become active.", alias="startTime") @@ -41,9 +41,9 @@ class CampaignEligibility(BaseModel): state: StrictStr = Field(description="The state of the campaign. ") tags: Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=50)]], Field(max_length=50)] = Field(description="A list of tags for the campaign.") features: List[StrictStr] = Field(description="The features enabled in this campaign.") - rules: Optional[List[RuleMetadata]] = Field(default=None, description="A list of rules containing customer-facing details of the rewards defined in the campaign.") eligibility: List[CampaignEligibilityDetails] = Field(description="The customer's eligibility for each campaign in the current customer session.") - __properties: ClassVar[List[str]] = ["id", "applicationId", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features", "rules", "eligibility"] + rules: List[RuleMetadataEligibility] = Field(description="A list of rules containing customer-facing details of the rewards defined in the campaign.") + __properties: ClassVar[List[str]] = ["applicationId", "id", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features", "eligibility", "rules"] @field_validator('state') def state_validate_enum(cls, value): @@ -99,13 +99,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in rules (list) - _items = [] - if self.rules: - for _item_rules in self.rules: - if _item_rules: - _items.append(_item_rules.to_dict()) - _dict['rules'] = _items # override the default output from pydantic by calling `to_dict()` of each item in eligibility (list) _items = [] if self.eligibility: @@ -113,6 +106,13 @@ def to_dict(self) -> Dict[str, Any]: if _item_eligibility: _items.append(_item_eligibility.to_dict()) _dict['eligibility'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in rules (list) + _items = [] + if self.rules: + for _item_rules in self.rules: + if _item_rules: + _items.append(_item_rules.to_dict()) + _dict['rules'] = _items return _dict @classmethod @@ -125,8 +125,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), "applicationId": obj.get("applicationId"), + "id": obj.get("id"), "name": obj.get("name"), "description": obj.get("description"), "startTime": obj.get("startTime"), @@ -135,8 +135,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state") if obj.get("state") is not None else 'enabled', "tags": obj.get("tags"), "features": obj.get("features"), - "rules": [RuleMetadata.from_dict(_item) for _item in obj["rules"]] if obj.get("rules") is not None else None, - "eligibility": [CampaignEligibilityDetails.from_dict(_item) for _item in obj["eligibility"]] if obj.get("eligibility") is not None else None + "eligibility": [CampaignEligibilityDetails.from_dict(_item) for _item in obj["eligibility"]] if obj.get("eligibility") is not None else None, + "rules": [RuleMetadataEligibility.from_dict(_item) for _item in obj["rules"]] if obj.get("rules") is not None else None }) return _obj diff --git a/talon_one/models/experiment.py b/talon_one/models/experiment.py index e71ea4a..bf61a92 100644 --- a/talon_one/models/experiment.py +++ b/talon_one/models/experiment.py @@ -38,8 +38,10 @@ class Experiment(BaseModel): activated: Optional[datetime] = Field(default=None, description="The date and time the experiment was activated. ") state: StrictStr = Field(description="A disabled experiment is not evaluated for rules or coupons. ") variants: Optional[List[ExperimentVariant]] = None + goal_type: StrictStr = Field(description="The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. ", alias="goalType") + goal_description: Optional[StrictStr] = Field(default=None, description="A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. ", alias="goalDescription") deletedat: Optional[datetime] = Field(default=None, description="The date and time the experiment was deleted. ") - __properties: ClassVar[List[str]] = ["id", "created", "applicationId", "isVariantAssignmentExternal", "campaign", "activated", "state", "variants", "deletedat"] + __properties: ClassVar[List[str]] = ["id", "created", "applicationId", "isVariantAssignmentExternal", "campaign", "activated", "state", "variants", "goalType", "goalDescription", "deletedat"] @field_validator('state') def state_validate_enum(cls, value): @@ -48,6 +50,13 @@ def state_validate_enum(cls, value): raise ValueError("must be one of enum values ('enabled', 'disabled', 'archived')") return value + @field_validator('goal_type') + def goal_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold']): + raise ValueError("must be one of enum values ('other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, @@ -117,6 +126,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "activated": obj.get("activated"), "state": obj.get("state") if obj.get("state") is not None else 'disabled', "variants": [ExperimentVariant.from_dict(_item) for _item in obj["variants"]] if obj.get("variants") is not None else None, + "goalType": obj.get("goalType"), + "goalDescription": obj.get("goalDescription"), "deletedat": obj.get("deletedat") }) return _obj diff --git a/talon_one/models/feature_flag_update.py b/talon_one/models/feature_flag_update.py new file mode 100644 index 0000000..7c48602 --- /dev/null +++ b/talon_one/models/feature_flag_update.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FeatureFlagUpdate(BaseModel): + """ + FeatureFlagUpdate + """ # noqa: E501 + name: StrictStr = Field(description="The name of the feature flag.") + value: StrictStr = Field(description="The value of the feature flag.") + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureFlagUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureFlagUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/talon_one/models/integration_campaign.py b/talon_one/models/integration_campaign.py index 229580a..68894fe 100644 --- a/talon_one/models/integration_campaign.py +++ b/talon_one/models/integration_campaign.py @@ -40,7 +40,7 @@ class IntegrationCampaign(BaseModel): state: StrictStr = Field(description="The state of the campaign. ") tags: Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=50)]], Field(max_length=50)] = Field(description="A list of tags for the campaign.") features: List[StrictStr] = Field(description="The features enabled in this campaign.") - rules: Optional[List[RuleMetadata]] = Field(default=None, description="A list of rules containing customer-facing details of the rewards defined in the campaign.") + rules: List[RuleMetadata] = Field(description="A list of rules containing customer-facing details of the rewards defined in the campaign.") __properties: ClassVar[List[str]] = ["applicationId", "id", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features", "rules"] @field_validator('state') diff --git a/talon_one/models/integration_campaign_base.py b/talon_one/models/integration_campaign_base.py new file mode 100644 index 0000000..9d74d84 --- /dev/null +++ b/talon_one/models/integration_campaign_base.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IntegrationCampaignBase(BaseModel): + """ + IntegrationCampaignBase + """ # noqa: E501 + application_id: StrictInt = Field(description="The ID of the Application that owns this entity.", alias="applicationId") + id: StrictInt = Field(description="Unique ID of Campaign.") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the campaign.") + description: Optional[StrictStr] = Field(default=None, description="A detailed description of the campaign.") + start_time: Optional[datetime] = Field(default=None, description="Timestamp when the campaign will become active.", alias="startTime") + end_time: Optional[datetime] = Field(default=None, description="Timestamp when the campaign will become inactive.", alias="endTime") + attributes: Optional[Dict[str, Any]] = Field(default=None, description="Arbitrary properties associated with this campaign.") + state: StrictStr = Field(description="The state of the campaign. ") + tags: Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=50)]], Field(max_length=50)] = Field(description="A list of tags for the campaign.") + features: List[StrictStr] = Field(description="The features enabled in this campaign.") + __properties: ClassVar[List[str]] = ["applicationId", "id", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['enabled']): + raise ValueError("must be one of enum values ('enabled')") + return value + + @field_validator('features') + def features_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['coupons', 'referrals', 'loyalty', 'giveaways', 'strikethrough', 'achievements']): + raise ValueError("each list item must be one of ('coupons', 'referrals', 'loyalty', 'giveaways', 'strikethrough', 'achievements')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntegrationCampaignBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntegrationCampaignBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applicationId": obj.get("applicationId"), + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "attributes": obj.get("attributes"), + "state": obj.get("state") if obj.get("state") is not None else 'enabled', + "tags": obj.get("tags"), + "features": obj.get("features") + }) + return _obj + + diff --git a/talon_one/models/new_experiment.py b/talon_one/models/new_experiment.py index 6292543..ec0102a 100644 --- a/talon_one/models/new_experiment.py +++ b/talon_one/models/new_experiment.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from talon_one.models.new_campaign import NewCampaign from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,16 @@ class NewExperiment(BaseModel): """ # noqa: E501 is_variant_assignment_external: StrictBool = Field(description="The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. ", alias="isVariantAssignmentExternal") campaign: NewCampaign - __properties: ClassVar[List[str]] = ["isVariantAssignmentExternal", "campaign"] + goal_type: StrictStr = Field(description="The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. ", alias="goalType") + goal_description: Optional[StrictStr] = Field(default=None, description="A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. ", alias="goalDescription") + __properties: ClassVar[List[str]] = ["isVariantAssignmentExternal", "campaign", "goalType", "goalDescription"] + + @field_validator('goal_type') + def goal_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold']): + raise ValueError("must be one of enum values ('other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold')") + return value model_config = ConfigDict( validate_by_name=True, @@ -87,7 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "isVariantAssignmentExternal": obj.get("isVariantAssignmentExternal"), - "campaign": NewCampaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None + "campaign": NewCampaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None, + "goalType": obj.get("goalType"), + "goalDescription": obj.get("goalDescription") }) return _obj diff --git a/talon_one/models/new_reward.py b/talon_one/models/new_reward.py index 99cfe74..5f8597e 100644 --- a/talon_one/models/new_reward.py +++ b/talon_one/models/new_reward.py @@ -20,8 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from talon_one.models.binding import Binding -from talon_one.models.rule import Rule from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -35,9 +33,7 @@ class NewReward(BaseModel): description: Optional[StrictStr] = Field(default=None, description="A description of the reward.") application_ids: List[StrictInt] = Field(description="The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. ", alias="applicationIds") sandbox: StrictBool = Field(description="Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type.") - rule: Optional[List[Rule]] = Field(default=None, description="Rule to apply.") - bindings: Optional[List[Binding]] = Field(default=None, description="A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules.") - __properties: ClassVar[List[str]] = ["name", "apiName", "description", "applicationIds", "sandbox", "rule", "bindings"] + __properties: ClassVar[List[str]] = ["name", "apiName", "description", "applicationIds", "sandbox"] model_config = ConfigDict( validate_by_name=True, @@ -78,20 +74,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in rule (list) - _items = [] - if self.rule: - for _item_rule in self.rule: - if _item_rule: - _items.append(_item_rule.to_dict()) - _dict['rule'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in bindings (list) - _items = [] - if self.bindings: - for _item_bindings in self.bindings: - if _item_bindings: - _items.append(_item_bindings.to_dict()) - _dict['bindings'] = _items return _dict @classmethod @@ -108,9 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "apiName": obj.get("apiName"), "description": obj.get("description"), "applicationIds": obj.get("applicationIds"), - "sandbox": obj.get("sandbox"), - "rule": [Rule.from_dict(_item) for _item in obj["rule"]] if obj.get("rule") is not None else None, - "bindings": [Binding.from_dict(_item) for _item in obj["bindings"]] if obj.get("bindings") is not None else None + "sandbox": obj.get("sandbox") }) return _obj diff --git a/talon_one/models/new_risk_notification.py b/talon_one/models/new_risk_notification.py new file mode 100644 index 0000000..fd10a29 --- /dev/null +++ b/talon_one/models/new_risk_notification.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NewRiskNotification(BaseModel): + """ + Data for creating a new risk notification. + """ # noqa: E501 + entity: StrictStr = Field(description="The entity type to analyze within the given time frame.") + activity: StrictStr = Field(description="The activity metric to analyze within the given entity.") + time_frame: StrictStr = Field(description="The rolling time window for risk evaluation.", alias="timeFrame") + __properties: ClassVar[List[str]] = ["entity", "activity", "timeFrame"] + + @field_validator('entity') + def entity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customer_profile', 'customer_session']): + raise ValueError("must be one of enum values ('customer_profile', 'customer_session')") + return value + + @field_validator('activity') + def activity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['loyalty_points_earned', 'discounted_amount', 'completed_orders', 'coupon_attempts']): + raise ValueError("must be one of enum values ('loyalty_points_earned', 'discounted_amount', 'completed_orders', 'coupon_attempts')") + return value + + @field_validator('time_frame') + def time_frame_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1_day', '1_week', '1_month']): + raise ValueError("must be one of enum values ('1_day', '1_week', '1_month')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NewRiskNotification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NewRiskNotification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entity": obj.get("entity"), + "activity": obj.get("activity"), + "timeFrame": obj.get("timeFrame") + }) + return _obj + + diff --git a/talon_one/models/reward.py b/talon_one/models/reward.py index 2c25a62..bcef714 100644 --- a/talon_one/models/reward.py +++ b/talon_one/models/reward.py @@ -39,10 +39,12 @@ class Reward(BaseModel): description: Optional[StrictStr] = Field(default=None, description="A description of the reward.") application_ids: List[StrictInt] = Field(description="The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. ", alias="applicationIds") sandbox: StrictBool = Field(description="Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type.") - rule: Optional[List[Rule]] = Field(default=None, description="Rule to apply.") + visibility_conditions: Optional[Rule] = Field(default=None, description="An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. ", alias="visibilityConditions") + rule: Optional[Rule] = Field(default=None, description="Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. ") bindings: Optional[List[Binding]] = Field(default=None, description="A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules.") + modified: Optional[datetime] = Field(default=None, description="The timestamp when the reward was last updated in RFC3339 format.") status: StrictStr = Field(description="The status of the reward.") - __properties: ClassVar[List[str]] = ["id", "created", "accountId", "name", "apiName", "description", "applicationIds", "sandbox", "rule", "bindings", "status"] + __properties: ClassVar[List[str]] = ["id", "created", "accountId", "name", "apiName", "description", "applicationIds", "sandbox", "visibilityConditions", "rule", "bindings", "modified", "status"] @field_validator('status') def status_validate_enum(cls, value): @@ -90,13 +92,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in rule (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of visibility_conditions + if self.visibility_conditions: + _dict['visibilityConditions'] = self.visibility_conditions.to_dict() + # override the default output from pydantic by calling `to_dict()` of rule if self.rule: - for _item_rule in self.rule: - if _item_rule: - _items.append(_item_rule.to_dict()) - _dict['rule'] = _items + _dict['rule'] = self.rule.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in bindings (list) _items = [] if self.bindings: @@ -124,8 +125,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "applicationIds": obj.get("applicationIds"), "sandbox": obj.get("sandbox"), - "rule": [Rule.from_dict(_item) for _item in obj["rule"]] if obj.get("rule") is not None else None, + "visibilityConditions": Rule.from_dict(obj["visibilityConditions"]) if obj.get("visibilityConditions") is not None else None, + "rule": Rule.from_dict(obj["rule"]) if obj.get("rule") is not None else None, "bindings": [Binding.from_dict(_item) for _item in obj["bindings"]] if obj.get("bindings") is not None else None, + "modified": obj.get("modified"), "status": obj.get("status") }) return _obj diff --git a/talon_one/models/risk_notification.py b/talon_one/models/risk_notification.py new file mode 100644 index 0000000..a170f23 --- /dev/null +++ b/talon_one/models/risk_notification.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class RiskNotification(BaseModel): + """ + A risk notification configuration rule. + """ # noqa: E501 + id: StrictInt = Field(description="The internal ID of this entity.") + created: datetime = Field(description="The time this entity was created.") + entity: StrictStr = Field(description="The entity type to analyze within the given time frame.") + activity: StrictStr = Field(description="The activity metric to analyze within the given entity.") + time_frame: StrictStr = Field(description="The rolling time window for risk evaluation.", alias="timeFrame") + active: StrictBool = Field(description="Indicates whether this risk notification is active.") + modified: datetime = Field(description="Timestamp of the most recent update.") + __properties: ClassVar[List[str]] = ["id", "created", "entity", "activity", "timeFrame", "active", "modified"] + + @field_validator('entity') + def entity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customer_profile', 'customer_session']): + raise ValueError("must be one of enum values ('customer_profile', 'customer_session')") + return value + + @field_validator('activity') + def activity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['loyalty_points_earned', 'discounted_amount', 'completed_orders', 'coupon_attempts']): + raise ValueError("must be one of enum values ('loyalty_points_earned', 'discounted_amount', 'completed_orders', 'coupon_attempts')") + return value + + @field_validator('time_frame') + def time_frame_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1_day', '1_week', '1_month']): + raise ValueError("must be one of enum values ('1_day', '1_week', '1_month')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RiskNotification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RiskNotification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "created": obj.get("created"), + "entity": obj.get("entity"), + "activity": obj.get("activity"), + "timeFrame": obj.get("timeFrame"), + "active": obj.get("active"), + "modified": obj.get("modified") + }) + return _obj + + diff --git a/talon_one/models/rule_metadata.py b/talon_one/models/rule_metadata.py index a37764b..eced4fe 100644 --- a/talon_one/models/rule_metadata.py +++ b/talon_one/models/rule_metadata.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from talon_one.models.rule_eligibility import RuleEligibility from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -32,8 +31,7 @@ class RuleMetadata(BaseModel): display_name: Optional[StrictStr] = Field(default=None, description="A customer-facing name for the rule.", alias="displayName") display_description: Optional[StrictStr] = Field(default=None, description="A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. ", alias="displayDescription") related_data: Optional[StrictStr] = Field(default=None, description="Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. ", alias="relatedData") - eligibility: Optional[List[RuleEligibility]] = None - __properties: ClassVar[List[str]] = ["title", "displayName", "displayDescription", "relatedData", "eligibility"] + __properties: ClassVar[List[str]] = ["title", "displayName", "displayDescription", "relatedData"] model_config = ConfigDict( validate_by_name=True, @@ -74,13 +72,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in eligibility (list) - _items = [] - if self.eligibility: - for _item_eligibility in self.eligibility: - if _item_eligibility: - _items.append(_item_eligibility.to_dict()) - _dict['eligibility'] = _items return _dict @classmethod @@ -96,8 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "title": obj.get("title"), "displayName": obj.get("displayName"), "displayDescription": obj.get("displayDescription"), - "relatedData": obj.get("relatedData"), - "eligibility": [RuleEligibility.from_dict(_item) for _item in obj["eligibility"]] if obj.get("eligibility") is not None else None + "relatedData": obj.get("relatedData") }) return _obj diff --git a/talon_one/models/rule_metadata_eligibility.py b/talon_one/models/rule_metadata_eligibility.py new file mode 100644 index 0000000..310b558 --- /dev/null +++ b/talon_one/models/rule_metadata_eligibility.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from talon_one.models.rule_eligibility import RuleEligibility +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class RuleMetadataEligibility(BaseModel): + """ + RuleMetadataEligibility + """ # noqa: E501 + title: StrictStr = Field(description="A short description of the rule.") + display_name: Optional[StrictStr] = Field(default=None, description="A customer-facing name for the rule.", alias="displayName") + display_description: Optional[StrictStr] = Field(default=None, description="A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. ", alias="displayDescription") + related_data: Optional[StrictStr] = Field(default=None, description="Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. ", alias="relatedData") + eligibility: List[RuleEligibility] + __properties: ClassVar[List[str]] = ["title", "displayName", "displayDescription", "relatedData", "eligibility"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuleMetadataEligibility from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in eligibility (list) + _items = [] + if self.eligibility: + for _item_eligibility in self.eligibility: + if _item_eligibility: + _items.append(_item_eligibility.to_dict()) + _dict['eligibility'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuleMetadataEligibility from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "displayName": obj.get("displayName"), + "displayDescription": obj.get("displayDescription"), + "relatedData": obj.get("relatedData"), + "eligibility": [RuleEligibility.from_dict(_item) for _item in obj["eligibility"]] if obj.get("eligibility") is not None else None + }) + return _obj + + diff --git a/talon_one/models/strikethrough_labeling_notification.py b/talon_one/models/strikethrough_labeling_notification.py index 8640962..defa4ee 100644 --- a/talon_one/models/strikethrough_labeling_notification.py +++ b/talon_one/models/strikethrough_labeling_notification.py @@ -30,7 +30,7 @@ class StrikethroughLabelingNotification(BaseModel): """ The strikethrough labels notification for an application. """ # noqa: E501 - version: Optional[StrictStr] = Field(default=None, description="The version of the strikethrough pricing notification.") + version: Optional[StrictStr] = Field(default=None, description="The version of the strikethrough pricing notification. Set for **scheduled** strikethrough pricing updates only. ") valid_from: Optional[datetime] = Field(default=None, description="Timestamp at which the strikethrough pricing update becomes valid. Set for **scheduled** strikethrough pricing updates (version: v2) only. ", alias="validFrom") application_id: StrictInt = Field(description="The ID of the Application to which the catalog items labels belongs.", alias="applicationId") current_batch: StrictInt = Field(description="The batch number of the notification. Notifications might be sent in different batches.", alias="currentBatch") diff --git a/talon_one/models/strikethrough_set_discount_per_item_effect_props.py b/talon_one/models/strikethrough_set_discount_per_item_effect_props.py index 36b697e..d0deb68 100644 --- a/talon_one/models/strikethrough_set_discount_per_item_effect_props.py +++ b/talon_one/models/strikethrough_set_discount_per_item_effect_props.py @@ -27,9 +27,9 @@ class StrikethroughSetDiscountPerItemEffectProps(BaseModel): """ setDiscountPerItem effect in strikethrough pricing payload. """ # noqa: E501 - name: StrictStr = Field(description="effect name.") + name: StrictStr = Field(description="The effect name.") value: Optional[Any] - excluded_from_price_history: Optional[StrictBool] = Field(default=None, alias="excludedFromPriceHistory") + excluded_from_price_history: Optional[StrictBool] = Field(default=None, description="When set to `true`, the applied discount is excluded from the item's price history.", alias="excludedFromPriceHistory") __properties: ClassVar[List[str]] = ["name", "value", "excludedFromPriceHistory"] model_config = ConfigDict( diff --git a/talon_one/models/strikethrough_set_discount_per_item_member_effect_props.py b/talon_one/models/strikethrough_set_discount_per_item_member_effect_props.py index d9db432..d36c6eb 100644 --- a/talon_one/models/strikethrough_set_discount_per_item_member_effect_props.py +++ b/talon_one/models/strikethrough_set_discount_per_item_member_effect_props.py @@ -27,7 +27,7 @@ class StrikethroughSetDiscountPerItemMemberEffectProps(BaseModel): """ setDiscountPerItem member effect in strikethrough pricing payload. """ # noqa: E501 - name: StrictStr = Field(description="effect name.") + name: StrictStr = Field(description="The effect name.") value: Optional[Any] __properties: ClassVar[List[str]] = ["name", "value"] diff --git a/talon_one/models/update_experiment.py b/talon_one/models/update_experiment.py index 115d298..b66da2d 100644 --- a/talon_one/models/update_experiment.py +++ b/talon_one/models/update_experiment.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from talon_one.models.update_campaign import UpdateCampaign from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,19 @@ class UpdateExperiment(BaseModel): """ # noqa: E501 is_variant_assignment_external: StrictBool = Field(description="The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. ", alias="isVariantAssignmentExternal") campaign: UpdateCampaign - __properties: ClassVar[List[str]] = ["isVariantAssignmentExternal", "campaign"] + goal_type: Optional[StrictStr] = Field(default=None, description="The goal of the experiment. Determines which single metric is used to decide the winning variant. When set to `other`, multiple metrics are used. ", alias="goalType") + goal_description: Optional[StrictStr] = Field(default=None, description="A description of the experiment goal. Provides context for the AI summary and helps it interpret the outcome of the experiment against the stated goal. ", alias="goalDescription") + __properties: ClassVar[List[str]] = ["isVariantAssignmentExternal", "campaign", "goalType", "goalDescription"] + + @field_validator('goal_type') + def goal_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold']): + raise ValueError("must be one of enum values ('other', 'maximize_revenue', 'optimize_discount_efficiency', 'maximize_items_sold')") + return value model_config = ConfigDict( validate_by_name=True, @@ -87,7 +99,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "isVariantAssignmentExternal": obj.get("isVariantAssignmentExternal"), - "campaign": UpdateCampaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None + "campaign": UpdateCampaign.from_dict(obj["campaign"]) if obj.get("campaign") is not None else None, + "goalType": obj.get("goalType"), + "goalDescription": obj.get("goalDescription") }) return _obj diff --git a/talon_one/models/update_reward.py b/talon_one/models/update_reward.py index e2952b0..f985148 100644 --- a/talon_one/models/update_reward.py +++ b/talon_one/models/update_reward.py @@ -33,9 +33,10 @@ class UpdateReward(BaseModel): name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the reward.") description: Optional[StrictStr] = Field(default=None, description="A description of the reward.") status: StrictStr = Field(description="The status of the reward.") - rule: Optional[List[Rule]] = Field(default=None, description="Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. ") + visibility_conditions: Optional[Rule] = Field(default=None, description="An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. ", alias="visibilityConditions") + rule: Optional[Rule] = Field(default=None, description="Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. ") bindings: Optional[List[Binding]] = Field(default=None, description="A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules.") - __properties: ClassVar[List[str]] = ["name", "description", "status", "rule", "bindings"] + __properties: ClassVar[List[str]] = ["name", "description", "status", "visibilityConditions", "rule", "bindings"] @field_validator('status') def status_validate_enum(cls, value): @@ -83,13 +84,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in rule (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of visibility_conditions + if self.visibility_conditions: + _dict['visibilityConditions'] = self.visibility_conditions.to_dict() + # override the default output from pydantic by calling `to_dict()` of rule if self.rule: - for _item_rule in self.rule: - if _item_rule: - _items.append(_item_rule.to_dict()) - _dict['rule'] = _items + _dict['rule'] = self.rule.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in bindings (list) _items = [] if self.bindings: @@ -112,7 +112,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "status": obj.get("status"), - "rule": [Rule.from_dict(_item) for _item in obj["rule"]] if obj.get("rule") is not None else None, + "visibilityConditions": Rule.from_dict(obj["visibilityConditions"]) if obj.get("visibilityConditions") is not None else None, + "rule": Rule.from_dict(obj["rule"]) if obj.get("rule") is not None else None, "bindings": [Binding.from_dict(_item) for _item in obj["bindings"]] if obj.get("bindings") is not None else None }) return _obj diff --git a/test/test_campaign_eligibility.py b/test/test_campaign_eligibility.py index 4e2ed03..d95c338 100644 --- a/test/test_campaign_eligibility.py +++ b/test/test_campaign_eligibility.py @@ -35,8 +35,8 @@ def make_instance(self, include_optional) -> CampaignEligibility: model = CampaignEligibility() if include_optional: return CampaignEligibility( - id = 4, application_id = 322, + id = 4, name = 'Summer promotions', description = 'Campaign for all summer 2021 promotions', start_time = '2021-07-20T22:00:00Z', @@ -45,30 +45,20 @@ def make_instance(self, include_optional) -> CampaignEligibility: state = 'enabled', tags = [summer], features = [coupons, referrals], - rules = [ - talon_one.models.rule_metadata.RuleMetadata( - title = 'Give discount via coupon', - display_name = '20% off all shoes!', - display_description = 'Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only.', - related_data = 'https://example.com/discounts/20-off-shoes.png', - eligibility = [ - talon_one.models.rule_eligibility.RuleEligibility( - passed = True, - coupon_code = '', - details = null, ) - ], ) - ], eligibility = [ talon_one.models.campaign_eligibility_details.CampaignEligibilityDetails( passed = True, coupon_code = '', details = null, ) + ], + rules = [ + null ] ) else: return CampaignEligibility( - id = 4, application_id = 322, + id = 4, name = 'Summer promotions', state = 'enabled', tags = [summer], @@ -79,6 +69,9 @@ def make_instance(self, include_optional) -> CampaignEligibility: coupon_code = '', details = null, ) ], + rules = [ + null + ], ) """ diff --git a/test/test_experiment.py b/test/test_experiment.py index 8bd316f..c655871 100644 --- a/test/test_experiment.py +++ b/test/test_experiment.py @@ -45,6 +45,8 @@ def make_instance(self, include_optional) -> Experiment: variants = [ null ], + goal_type = 'other', + goal_description = 'Offering free shipping will increase average order revenue more than a 10% discount', deletedat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: @@ -53,6 +55,7 @@ def make_instance(self, include_optional) -> Experiment: created = '2020-06-10T09:05:27.993483Z', application_id = 322, state = 'disabled', + goal_type = 'other', ) """ diff --git a/test/test_feature_flag_update.py b/test/test_feature_flag_update.py new file mode 100644 index 0000000..de2c822 --- /dev/null +++ b/test/test_feature_flag_update.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from talon_one.models.feature_flag_update import FeatureFlagUpdate + +class TestFeatureFlagUpdate(unittest.TestCase): + """FeatureFlagUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FeatureFlagUpdate: + """Test FeatureFlagUpdate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FeatureFlagUpdate` + """ + model = FeatureFlagUpdate() + if include_optional: + return FeatureFlagUpdate( + name = 'canCreateCampaignFromTemplate', + value = 'true' + ) + else: + return FeatureFlagUpdate( + name = 'canCreateCampaignFromTemplate', + value = 'true', + ) + """ + + def testFeatureFlagUpdate(self): + """Test FeatureFlagUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_integration_campaign.py b/test/test_integration_campaign.py index e4338df..3b8be16 100644 --- a/test/test_integration_campaign.py +++ b/test/test_integration_campaign.py @@ -50,13 +50,7 @@ def make_instance(self, include_optional) -> IntegrationCampaign: title = 'Give discount via coupon', display_name = '20% off all shoes!', display_description = 'Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only.', - related_data = 'https://example.com/discounts/20-off-shoes.png', - eligibility = [ - talon_one.models.rule_eligibility.RuleEligibility( - passed = True, - coupon_code = '', - details = null, ) - ], ) + related_data = 'https://example.com/discounts/20-off-shoes.png', ) ] ) else: @@ -67,6 +61,13 @@ def make_instance(self, include_optional) -> IntegrationCampaign: state = 'enabled', tags = [summer], features = [coupons, referrals], + rules = [ + talon_one.models.rule_metadata.RuleMetadata( + title = 'Give discount via coupon', + display_name = '20% off all shoes!', + display_description = 'Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only.', + related_data = 'https://example.com/discounts/20-off-shoes.png', ) + ], ) """ diff --git a/test/test_integration_campaign_base.py b/test/test_integration_campaign_base.py new file mode 100644 index 0000000..f6efd8f --- /dev/null +++ b/test/test_integration_campaign_base.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from talon_one.models.integration_campaign_base import IntegrationCampaignBase + +class TestIntegrationCampaignBase(unittest.TestCase): + """IntegrationCampaignBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IntegrationCampaignBase: + """Test IntegrationCampaignBase + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IntegrationCampaignBase` + """ + model = IntegrationCampaignBase() + if include_optional: + return IntegrationCampaignBase( + application_id = 322, + id = 4, + name = 'Summer promotions', + description = 'Campaign for all summer 2021 promotions', + start_time = '2021-07-20T22:00:00Z', + end_time = '2021-09-22T22:00:00Z', + attributes = None, + state = 'enabled', + tags = [summer], + features = [coupons, referrals] + ) + else: + return IntegrationCampaignBase( + application_id = 322, + id = 4, + name = 'Summer promotions', + state = 'enabled', + tags = [summer], + features = [coupons, referrals], + ) + """ + + def testIntegrationCampaignBase(self): + """Test IntegrationCampaignBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_management_api.py b/test/test_management_api.py index 099e0e5..5dfb96b 100644 --- a/test/test_management_api.py +++ b/test/test_management_api.py @@ -771,7 +771,7 @@ def test_get_loyalty_card(self) -> None: def test_get_loyalty_card_transaction_logs(self) -> None: """Test case for get_loyalty_card_transaction_logs - List card's transactions + List card's transactions (Management API) """ pass @@ -785,7 +785,7 @@ def test_get_loyalty_cards(self) -> None: def test_get_loyalty_ledger_balances(self) -> None: """Test case for get_loyalty_ledger_balances - Get customer's loyalty balances + Get customer's loyalty balances (Management API) """ pass @@ -806,7 +806,7 @@ def test_get_loyalty_program(self) -> None: def test_get_loyalty_program_profile_ledger_transactions(self) -> None: """Test case for get_loyalty_program_profile_ledger_transactions - List customer's loyalty transactions + List customer's loyalty transactions (Management API) """ pass diff --git a/test/test_new_experiment.py b/test/test_new_experiment.py index a8c4a74..6a92b68 100644 --- a/test/test_new_experiment.py +++ b/test/test_new_experiment.py @@ -36,12 +36,15 @@ def make_instance(self, include_optional) -> NewExperiment: if include_optional: return NewExperiment( is_variant_assignment_external = True, - campaign = None + campaign = None, + goal_type = 'other', + goal_description = 'Offering free shipping will increase average order revenue more than a 10% discount' ) else: return NewExperiment( is_variant_assignment_external = True, campaign = None, + goal_type = 'other', ) """ diff --git a/test/test_new_reward.py b/test/test_new_reward.py index f9a26c3..c42ea74 100644 --- a/test/test_new_reward.py +++ b/test/test_new_reward.py @@ -39,28 +39,7 @@ def make_instance(self, include_optional) -> NewReward: api_name = 'free-coffee', description = 'This reward gets you one free coffee.', application_ids = [1, 2, 3], - sandbox = True, - rule = [ - talon_one.models.rule.Rule( - id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - title = 'Give discount via coupon', - description = 'Creates a discount when a coupon is valid', - bindings = [ - talon_one.models.binding.Binding( - name = 'my property', - type = 'templateParameter', - expression = [string1, string2], - value_type = 'string', - min_value = 0, - max_value = 19.9, - attribute_id = 100, - description = 'This is a template parameter of type `number`.', ) - ], - condition = [and, [couponValid]], - effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ) - ], - bindings = [] + sandbox = True ) else: return NewReward( diff --git a/test/test_new_risk_notification.py b/test/test_new_risk_notification.py new file mode 100644 index 0000000..073ecb4 --- /dev/null +++ b/test/test_new_risk_notification.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from talon_one.models.new_risk_notification import NewRiskNotification + +class TestNewRiskNotification(unittest.TestCase): + """NewRiskNotification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NewRiskNotification: + """Test NewRiskNotification + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NewRiskNotification` + """ + model = NewRiskNotification() + if include_optional: + return NewRiskNotification( + entity = 'customer_profile', + activity = 'loyalty_points_earned', + time_frame = '1_week' + ) + else: + return NewRiskNotification( + entity = 'customer_profile', + activity = 'loyalty_points_earned', + time_frame = '1_week', + ) + """ + + def testNewRiskNotification(self): + """Test NewRiskNotification""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reward.py b/test/test_reward.py index 20bf296..340e5b5 100644 --- a/test/test_reward.py +++ b/test/test_reward.py @@ -43,27 +43,44 @@ def make_instance(self, include_optional) -> Reward: description = 'This reward gets you one free coffee.', application_ids = [1, 2, 3], sandbox = True, - rule = [ - talon_one.models.rule.Rule( - id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - title = 'Give discount via coupon', - description = 'Creates a discount when a coupon is valid', - bindings = [ - talon_one.models.binding.Binding( - name = 'my property', - type = 'templateParameter', - expression = [string1, string2], - value_type = 'string', - min_value = 0, - max_value = 19.9, - attribute_id = 100, - description = 'This is a template parameter of type `number`.', ) - ], - condition = [and, [couponValid]], - effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ) - ], + visibility_conditions = talon_one.models.rule.Rule( + id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + title = 'Give discount via coupon', + description = 'Creates a discount when a coupon is valid', + bindings = [ + talon_one.models.binding.Binding( + name = 'my property', + type = 'templateParameter', + expression = [string1, string2], + value_type = 'string', + min_value = 0, + max_value = 19.9, + attribute_id = 100, + description = 'This is a template parameter of type `number`.', ) + ], + condition = [and, [couponValid]], + effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ), + rule = talon_one.models.rule.Rule( + id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + title = 'Give discount via coupon', + description = 'Creates a discount when a coupon is valid', + bindings = [ + talon_one.models.binding.Binding( + name = 'my property', + type = 'templateParameter', + expression = [string1, string2], + value_type = 'string', + min_value = 0, + max_value = 19.9, + attribute_id = 100, + description = 'This is a template parameter of type `number`.', ) + ], + condition = [and, [couponValid]], + effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ), bindings = [], + modified = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), status = 'active' ) else: diff --git a/test/test_risk_notification.py b/test/test_risk_notification.py new file mode 100644 index 0000000..0a362d5 --- /dev/null +++ b/test/test_risk_notification.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from talon_one.models.risk_notification import RiskNotification + +class TestRiskNotification(unittest.TestCase): + """RiskNotification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RiskNotification: + """Test RiskNotification + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RiskNotification` + """ + model = RiskNotification() + if include_optional: + return RiskNotification( + id = 6, + created = '2020-06-10T09:05:27.993483Z', + entity = 'customer_profile', + activity = 'loyalty_points_earned', + time_frame = '1_week', + active = True, + modified = '2026-04-16T09:05:27.993483Z' + ) + else: + return RiskNotification( + id = 6, + created = '2020-06-10T09:05:27.993483Z', + entity = 'customer_profile', + activity = 'loyalty_points_earned', + time_frame = '1_week', + active = True, + modified = '2026-04-16T09:05:27.993483Z', + ) + """ + + def testRiskNotification(self): + """Test RiskNotification""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rule_metadata.py b/test/test_rule_metadata.py index 59f120e..79ce751 100644 --- a/test/test_rule_metadata.py +++ b/test/test_rule_metadata.py @@ -38,13 +38,7 @@ def make_instance(self, include_optional) -> RuleMetadata: title = 'Give discount via coupon', display_name = '20% off all shoes!', display_description = 'Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only.', - related_data = 'https://example.com/discounts/20-off-shoes.png', - eligibility = [ - talon_one.models.rule_eligibility.RuleEligibility( - passed = True, - coupon_code = '', - details = null, ) - ] + related_data = 'https://example.com/discounts/20-off-shoes.png' ) else: return RuleMetadata( diff --git a/test/test_rule_metadata_eligibility.py b/test/test_rule_metadata_eligibility.py new file mode 100644 index 0000000..309076d --- /dev/null +++ b/test/test_rule_metadata_eligibility.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Talon.One API + + Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from talon_one.models.rule_metadata_eligibility import RuleMetadataEligibility + +class TestRuleMetadataEligibility(unittest.TestCase): + """RuleMetadataEligibility unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuleMetadataEligibility: + """Test RuleMetadataEligibility + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuleMetadataEligibility` + """ + model = RuleMetadataEligibility() + if include_optional: + return RuleMetadataEligibility( + title = 'Give discount via coupon', + display_name = '20% off all shoes!', + display_description = 'Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only.', + related_data = 'https://example.com/discounts/20-off-shoes.png', + eligibility = [ + talon_one.models.rule_eligibility.RuleEligibility( + passed = True, + coupon_code = '', + details = null, ) + ] + ) + else: + return RuleMetadataEligibility( + title = 'Give discount via coupon', + eligibility = [ + talon_one.models.rule_eligibility.RuleEligibility( + passed = True, + coupon_code = '', + details = null, ) + ], + ) + """ + + def testRuleMetadataEligibility(self): + """Test RuleMetadataEligibility""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_experiment.py b/test/test_update_experiment.py index 02e87c7..999e089 100644 --- a/test/test_update_experiment.py +++ b/test/test_update_experiment.py @@ -64,7 +64,9 @@ def make_instance(self, include_optional) -> UpdateExperiment: evaluation_group_id = 2, type = 'advanced', linked_store_ids = [1, 2, 3], - coupon_attributes = talon_one.models.coupon_attributes.couponAttributes(), ) + coupon_attributes = talon_one.models.coupon_attributes.couponAttributes(), ), + goal_type = 'other', + goal_description = 'Offering free shipping will increase average order revenue more than a 10% discount' ) else: return UpdateExperiment( diff --git a/test/test_update_reward.py b/test/test_update_reward.py index c0aea14..1c321ab 100644 --- a/test/test_update_reward.py +++ b/test/test_update_reward.py @@ -38,26 +38,42 @@ def make_instance(self, include_optional) -> UpdateReward: name = 'Free Coffee', description = 'This reward gets you one free coffee.', status = 'active', - rule = [ - talon_one.models.rule.Rule( - id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', - title = 'Give discount via coupon', - description = 'Creates a discount when a coupon is valid', - bindings = [ - talon_one.models.binding.Binding( - name = 'my property', - type = 'templateParameter', - expression = [string1, string2], - value_type = 'string', - min_value = 0, - max_value = 19.9, - attribute_id = 100, - description = 'This is a template parameter of type `number`.', ) - ], - condition = [and, [couponValid]], - effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ) - ], + visibility_conditions = talon_one.models.rule.Rule( + id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + title = 'Give discount via coupon', + description = 'Creates a discount when a coupon is valid', + bindings = [ + talon_one.models.binding.Binding( + name = 'my property', + type = 'templateParameter', + expression = [string1, string2], + value_type = 'string', + min_value = 0, + max_value = 19.9, + attribute_id = 100, + description = 'This is a template parameter of type `number`.', ) + ], + condition = [and, [couponValid]], + effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ), + rule = talon_one.models.rule.Rule( + id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + parent_id = '7fa800a8-ac8d-4792-85dc-c4650dcc8f23', + title = 'Give discount via coupon', + description = 'Creates a discount when a coupon is valid', + bindings = [ + talon_one.models.binding.Binding( + name = 'my property', + type = 'templateParameter', + expression = [string1, string2], + value_type = 'string', + min_value = 0, + max_value = 19.9, + attribute_id = 100, + description = 'This is a template parameter of type `number`.', ) + ], + condition = [and, [couponValid]], + effects = [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], ), bindings = [] ) else: