From 394d158104962b94dd45ea0724e42c9b4f731023 Mon Sep 17 00:00:00 2001 From: Talon-One SDK Generator Date: Thu, 16 Apr 2026 08:02:11 +0000 Subject: [PATCH] update to 26.08.0 --- .openapi-generator/FILES | 39 + README.md | 19 +- docs/AchievementV2.md | 18 +- docs/BestPriorPriceRequest.md | 3 +- docs/CreateAchievementV2.md | 2 +- docs/CreateMCPKey.md | 30 + docs/ExperimentSegmentInsight.md | 33 + docs/ExperimentSegmentInsightMetric.md | 30 + docs/ExperimentSegmentInsightVariant.md | 32 + docs/ExperimentSegmentInsights.md | 32 + docs/ExperimentVerdict.md | 33 + docs/ExperimentVerdictResponse.md | 30 + docs/IntegrationApi.md | 104 +- docs/IntegrationGetAllCampaigns200Response.md | 30 + docs/LedgerInfo.md | 1 + ...stApplicationCartItemFilters200Response.md | 30 + docs/LoyaltyBalanceWithTier.md | 2 +- docs/MCPKey.md | 36 + docs/ManagementApi.md | 323 +- docs/NewMCPKey.md | 37 + docs/NewReward.md | 33 + docs/Reward.md | 37 + docs/RuleMetadata.md | 6 +- docs/SetDiscountPerItemEffectProps.md | 1 + ...ikethroughSetDiscountPerItemEffectProps.md | 2 +- pyproject.toml | 2 +- setup.py | 2 +- talon_one/__init__.py | 28 +- talon_one/api/integration_api.py | 429 +++ talon_one/api/management_api.py | 3022 +++++++++++------ talon_one/api_client.py | 2 +- talon_one/configuration.py | 2 +- talon_one/models/__init__.py | 13 + talon_one/models/achievement_v2.py | 27 +- talon_one/models/best_prior_price_request.py | 11 +- talon_one/models/create_achievement_v2.py | 2 +- talon_one/models/create_mcp_key.py | 91 + .../models/experiment_segment_insight.py | 119 + .../experiment_segment_insight_metric.py | 105 + .../experiment_segment_insight_variant.py | 94 + .../models/experiment_segment_insights.py | 102 + talon_one/models/experiment_verdict.py | 96 + .../models/experiment_verdict_response.py | 95 + ...tegration_get_all_campaigns200_response.py | 98 + talon_one/models/ledger_info.py | 8 +- ...plication_cart_item_filters200_response.py | 98 + talon_one/models/loyalty_balance_with_tier.py | 2 +- talon_one/models/mcp_key.py | 103 + talon_one/models/new_mcp_key.py | 105 + talon_one/models/new_reward.py | 97 + talon_one/models/reward.py | 113 + talon_one/models/rule_metadata.py | 6 +- .../set_discount_per_item_effect_props.py | 8 +- ...ough_set_discount_per_item_effect_props.py | 6 +- test/test_achievement_v2.py | 9 + test/test_best_prior_price_request.py | 3 +- test/test_create_achievement_v2.py | 1 - test/test_create_mcp_key.py | 54 + test/test_experiment_segment_insight.py | 72 + .../test_experiment_segment_insight_metric.py | 80 + ...test_experiment_segment_insight_variant.py | 58 + test/test_experiment_segment_insights.py | 92 + test/test_experiment_verdict.py | 64 + test/test_experiment_verdict_response.py | 68 + test/test_integration_api.py | 7 + ...tegration_get_all_campaigns200_response.py | 58 + test/test_ledger_info.py | 3 +- ...plication_cart_item_filters200_response.py | 57 + test/test_loyalty_balance_with_tier.py | 2 +- test/test_management_api.py | 25 +- test/test_mcp_key.py | 64 + test/test_new_mcp_key.py | 66 + test/test_new_reward.py | 59 + test/test_reward.py | 67 + ...test_set_discount_per_item_effect_props.py | 3 +- ...ough_set_discount_per_item_effect_props.py | 2 +- 76 files changed, 5583 insertions(+), 1160 deletions(-) create mode 100644 docs/CreateMCPKey.md create mode 100644 docs/ExperimentSegmentInsight.md create mode 100644 docs/ExperimentSegmentInsightMetric.md create mode 100644 docs/ExperimentSegmentInsightVariant.md create mode 100644 docs/ExperimentSegmentInsights.md create mode 100644 docs/ExperimentVerdict.md create mode 100644 docs/ExperimentVerdictResponse.md create mode 100644 docs/IntegrationGetAllCampaigns200Response.md create mode 100644 docs/ListApplicationCartItemFilters200Response.md create mode 100644 docs/MCPKey.md create mode 100644 docs/NewMCPKey.md create mode 100644 docs/NewReward.md create mode 100644 docs/Reward.md create mode 100644 talon_one/models/create_mcp_key.py create mode 100644 talon_one/models/experiment_segment_insight.py create mode 100644 talon_one/models/experiment_segment_insight_metric.py create mode 100644 talon_one/models/experiment_segment_insight_variant.py create mode 100644 talon_one/models/experiment_segment_insights.py create mode 100644 talon_one/models/experiment_verdict.py create mode 100644 talon_one/models/experiment_verdict_response.py create mode 100644 talon_one/models/integration_get_all_campaigns200_response.py create mode 100644 talon_one/models/list_application_cart_item_filters200_response.py create mode 100644 talon_one/models/mcp_key.py create mode 100644 talon_one/models/new_mcp_key.py create mode 100644 talon_one/models/new_reward.py create mode 100644 talon_one/models/reward.py create mode 100644 test/test_create_mcp_key.py create mode 100644 test/test_experiment_segment_insight.py create mode 100644 test/test_experiment_segment_insight_metric.py create mode 100644 test/test_experiment_segment_insight_variant.py create mode 100644 test/test_experiment_segment_insights.py create mode 100644 test/test_experiment_verdict.py create mode 100644 test/test_experiment_verdict_response.py create mode 100644 test/test_integration_get_all_campaigns200_response.py create mode 100644 test/test_list_application_cart_item_filters200_response.py create mode 100644 test/test_mcp_key.py create mode 100644 test/test_new_mcp_key.py create mode 100644 test/test_new_reward.py create mode 100644 test/test_reward.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b57bbc8..69acaf1 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -192,6 +192,7 @@ docs/CreateAchievementV2.md docs/CreateApplicationAPIKey.md docs/CreateCouponData.md docs/CreateCoupons200Response.md +docs/CreateMCPKey.md docs/CreateManagementKey.md docs/CreateReferralsForMultipleAdvocates201Response.md docs/CreateTemplateCampaign.md @@ -245,10 +246,16 @@ docs/ExperimentListResults.md docs/ExperimentListResultsRequest.md docs/ExperimentResult.md docs/ExperimentResults.md +docs/ExperimentSegmentInsight.md +docs/ExperimentSegmentInsightMetric.md +docs/ExperimentSegmentInsightVariant.md +docs/ExperimentSegmentInsights.md docs/ExperimentVariant.md docs/ExperimentVariantAllocation.md docs/ExperimentVariantResult.md docs/ExperimentVariantResultConfidence.md +docs/ExperimentVerdict.md +docs/ExperimentVerdictResponse.md docs/ExpiringCardPointsData.md docs/ExpiringCardPointsNotification.md docs/ExpiringCouponsData.md @@ -343,6 +350,7 @@ docs/IntegrationEventV2Request.md docs/IntegrationEventV2Response.md docs/IntegrationEventV3Request.md docs/IntegrationEventV3Response.md +docs/IntegrationGetAllCampaigns200Response.md docs/IntegrationHubConfig.md docs/IntegrationHubEventPayloadCouponBasedNotifications.md docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md @@ -380,6 +388,7 @@ docs/LimitCounter.md docs/ListAccountCollections200Response.md docs/ListAchievements200Response.md docs/ListAllRolesV2200Response.md +docs/ListApplicationCartItemFilters200Response.md docs/ListCampaignStoreBudgetLimits200Response.md docs/ListCampaignStoreBudgets.md docs/ListCampaignStoreBudgetsStore.md @@ -413,6 +422,7 @@ docs/LoyaltyProgramLedgers.md docs/LoyaltyProgramTransaction.md docs/LoyaltySubLedger.md docs/LoyaltyTier.md +docs/MCPKey.md docs/ManagementApi.md docs/ManagementKey.md docs/ManagerConfig.md @@ -476,6 +486,7 @@ docs/NewInvitation.md docs/NewInviteEmail.md docs/NewLoyaltyProgram.md docs/NewLoyaltyTier.md +docs/NewMCPKey.md docs/NewManagementKey.md docs/NewMessageTest.md docs/NewMultipleAudiencesItem.md @@ -490,6 +501,7 @@ docs/NewReferral.md docs/NewReferralsForMultipleAdvocates.md docs/NewReturn.md docs/NewRevisionVersion.md +docs/NewReward.md docs/NewRole.md docs/NewRoleV2.md docs/NewRuleset.md @@ -557,6 +569,7 @@ docs/Revision.md docs/RevisionActivation.md docs/RevisionActivationRequest.md docs/RevisionVersion.md +docs/Reward.md docs/Role.md docs/RoleAssign.md docs/RoleMembership.md @@ -894,6 +907,7 @@ talon_one/models/create_application_api_key.py talon_one/models/create_coupon_data.py talon_one/models/create_coupons200_response.py talon_one/models/create_management_key.py +talon_one/models/create_mcp_key.py talon_one/models/create_referrals_for_multiple_advocates201_response.py talon_one/models/create_template_campaign.py talon_one/models/create_template_campaign_response.py @@ -946,10 +960,16 @@ talon_one/models/experiment_list_results.py talon_one/models/experiment_list_results_request.py talon_one/models/experiment_result.py talon_one/models/experiment_results.py +talon_one/models/experiment_segment_insight.py +talon_one/models/experiment_segment_insight_metric.py +talon_one/models/experiment_segment_insight_variant.py +talon_one/models/experiment_segment_insights.py talon_one/models/experiment_variant.py talon_one/models/experiment_variant_allocation.py talon_one/models/experiment_variant_result.py talon_one/models/experiment_variant_result_confidence.py +talon_one/models/experiment_verdict.py +talon_one/models/experiment_verdict_response.py talon_one/models/expiring_card_points_data.py talon_one/models/expiring_card_points_notification.py talon_one/models/expiring_coupons_data.py @@ -1043,6 +1063,7 @@ talon_one/models/integration_event_v2_request.py talon_one/models/integration_event_v2_response.py talon_one/models/integration_event_v3_request.py talon_one/models/integration_event_v3_response.py +talon_one/models/integration_get_all_campaigns200_response.py talon_one/models/integration_hub_config.py talon_one/models/integration_hub_event_payload_coupon_based_notifications.py talon_one/models/integration_hub_event_payload_coupon_based_notifications_limits.py @@ -1080,6 +1101,7 @@ talon_one/models/limit_counter.py talon_one/models/list_account_collections200_response.py talon_one/models/list_achievements200_response.py talon_one/models/list_all_roles_v2200_response.py +talon_one/models/list_application_cart_item_filters200_response.py talon_one/models/list_campaign_store_budget_limits200_response.py talon_one/models/list_campaign_store_budgets.py talon_one/models/list_campaign_store_budgets_store.py @@ -1115,6 +1137,7 @@ talon_one/models/loyalty_sub_ledger.py talon_one/models/loyalty_tier.py talon_one/models/management_key.py talon_one/models/manager_config.py +talon_one/models/mcp_key.py talon_one/models/message_log_entries.py talon_one/models/message_log_entry.py talon_one/models/message_log_request.py @@ -1176,6 +1199,7 @@ talon_one/models/new_invite_email.py talon_one/models/new_loyalty_program.py talon_one/models/new_loyalty_tier.py talon_one/models/new_management_key.py +talon_one/models/new_mcp_key.py talon_one/models/new_message_test.py talon_one/models/new_multiple_audiences_item.py talon_one/models/new_notification_webhook.py @@ -1189,6 +1213,7 @@ talon_one/models/new_referral.py 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_role.py talon_one/models/new_role_v2.py talon_one/models/new_ruleset.py @@ -1256,6 +1281,7 @@ talon_one/models/revision.py 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/role.py talon_one/models/role_assign.py talon_one/models/role_membership.py @@ -1582,6 +1608,7 @@ test/test_create_application_api_key.py test/test_create_coupon_data.py test/test_create_coupons200_response.py test/test_create_management_key.py +test/test_create_mcp_key.py test/test_create_referrals_for_multiple_advocates201_response.py test/test_create_template_campaign.py test/test_create_template_campaign_response.py @@ -1634,10 +1661,16 @@ test/test_experiment_list_results.py test/test_experiment_list_results_request.py test/test_experiment_result.py test/test_experiment_results.py +test/test_experiment_segment_insight.py +test/test_experiment_segment_insight_metric.py +test/test_experiment_segment_insight_variant.py +test/test_experiment_segment_insights.py test/test_experiment_variant.py test/test_experiment_variant_allocation.py test/test_experiment_variant_result.py test/test_experiment_variant_result_confidence.py +test/test_experiment_verdict.py +test/test_experiment_verdict_response.py test/test_expiring_card_points_data.py test/test_expiring_card_points_notification.py test/test_expiring_coupons_data.py @@ -1732,6 +1765,7 @@ test/test_integration_event_v2_request.py test/test_integration_event_v2_response.py test/test_integration_event_v3_request.py test/test_integration_event_v3_response.py +test/test_integration_get_all_campaigns200_response.py test/test_integration_hub_config.py test/test_integration_hub_event_payload_coupon_based_notifications.py test/test_integration_hub_event_payload_coupon_based_notifications_limits.py @@ -1769,6 +1803,7 @@ test/test_limit_counter.py test/test_list_account_collections200_response.py test/test_list_achievements200_response.py test/test_list_all_roles_v2200_response.py +test/test_list_application_cart_item_filters200_response.py test/test_list_campaign_store_budget_limits200_response.py test/test_list_campaign_store_budgets.py test/test_list_campaign_store_budgets_store.py @@ -1805,6 +1840,7 @@ test/test_loyalty_tier.py test/test_management_api.py test/test_management_key.py test/test_manager_config.py +test/test_mcp_key.py test/test_message_log_entries.py test/test_message_log_entry.py test/test_message_log_request.py @@ -1866,6 +1902,7 @@ test/test_new_invite_email.py test/test_new_loyalty_program.py test/test_new_loyalty_tier.py test/test_new_management_key.py +test/test_new_mcp_key.py test/test_new_message_test.py test/test_new_multiple_audiences_item.py test/test_new_notification_webhook.py @@ -1879,6 +1916,7 @@ test/test_new_referral.py 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_role.py test/test_new_role_v2.py test/test_new_ruleset.py @@ -1946,6 +1984,7 @@ test/test_revision.py test/test_revision_activation.py test/test_revision_activation_request.py test/test_revision_version.py +test/test_reward.py test/test_role.py test/test_role_assign.py test/test_role_membership.py diff --git a/README.md b/README.md index 2a4c740..12de9b0 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**get_loyalty_program_profile_points**](docs/IntegrationApi.md#get_loyalty_program_profile_points) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points | List customer's unused loyalty points *IntegrationApi* | [**get_loyalty_program_profile_transactions**](docs/IntegrationApi.md#get_loyalty_program_profile_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions *IntegrationApi* | [**get_reserved_customers**](docs/IntegrationApi.md#get_reserved_customers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved +*IntegrationApi* | [**integration_get_all_campaigns**](docs/IntegrationApi.md#integration_get_all_campaigns) | **GET** /v1/integration/campaigns | List all running campaigns *IntegrationApi* | [**link_loyalty_card_to_profile**](docs/IntegrationApi.md#link_loyalty_card_to_profile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card *IntegrationApi* | [**reopen_customer_session**](docs/IntegrationApi.md#reopen_customer_session) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session *IntegrationApi* | [**return_cart_items**](docs/IntegrationApi.md#return_cart_items) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items @@ -204,7 +205,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**create_campaign_store_budget**](docs/ManagementApi.md#create_campaign_store_budget) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | Create campaign store budget *ManagementApi* | [**create_collection**](docs/ManagementApi.md#create_collection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection *ManagementApi* | [**create_coupons**](docs/ManagementApi.md#create_coupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons -*ManagementApi* | [**create_coupons_async**](docs/ManagementApi.md#create_coupons_async) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously +*ManagementApi* | [**create_coupons_asynchronously**](docs/ManagementApi.md#create_coupons_asynchronously) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously *ManagementApi* | [**create_coupons_deletion_job**](docs/ManagementApi.md#create_coupons_deletion_job) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job *ManagementApi* | [**create_coupons_for_multiple_recipients**](docs/ManagementApi.md#create_coupons_for_multiple_recipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients *ManagementApi* | [**create_invite_email**](docs/ManagementApi.md#create_invite_email) | **POST** /v1/invite_emails | Resend invitation email @@ -234,6 +235,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**export_audiences_memberships**](docs/ManagementApi.md#export_audiences_memberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members *ManagementApi* | [**export_campaign_store_budgets**](docs/ManagementApi.md#export_campaign_store_budgets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/export | Export campaign store budgets *ManagementApi* | [**export_campaign_stores**](docs/ManagementApi.md#export_campaign_stores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores +*ManagementApi* | [**export_campaign_value_map**](docs/ManagementApi.md#export_campaign_value_map) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export | Export campaign value map *ManagementApi* | [**export_collection_items**](docs/ManagementApi.md#export_collection_items) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items *ManagementApi* | [**export_coupons**](docs/ManagementApi.md#export_coupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons *ManagementApi* | [**export_customer_sessions**](docs/ManagementApi.md#export_customer_sessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -258,6 +260,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**get_additional_costs**](docs/ManagementApi.md#get_additional_costs) | **GET** /v1/additional_costs | List additional costs *ManagementApi* | [**get_application**](docs/ManagementApi.md#get_application) | **GET** /v1/applications/{applicationId} | Get Application *ManagementApi* | [**get_application_api_health**](docs/ManagementApi.md#get_application_api_health) | **GET** /v1/applications/{applicationId}/health_report | Get Application health +*ManagementApi* | [**get_application_cart_item_filter_expression**](docs/ManagementApi.md#get_application_cart_item_filter_expression) | **GET** /v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId} | Get Application cart item filter expression *ManagementApi* | [**get_application_customer**](docs/ManagementApi.md#get_application_customer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer *ManagementApi* | [**get_application_customer_friends**](docs/ManagementApi.md#get_application_customer_friends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile *ManagementApi* | [**get_application_customers**](docs/ManagementApi.md#get_application_customers) | **GET** /v1/applications/{applicationId}/customers | List application's customers @@ -330,6 +333,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**list_account_collections**](docs/ManagementApi.md#list_account_collections) | **GET** /v1/collections | List collections in account *ManagementApi* | [**list_achievements**](docs/ManagementApi.md#list_achievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements *ManagementApi* | [**list_all_roles_v2**](docs/ManagementApi.md#list_all_roles_v2) | **GET** /v2/roles | List roles +*ManagementApi* | [**list_application_cart_item_filters**](docs/ManagementApi.md#list_application_cart_item_filters) | **GET** /v1/applications/{applicationId}/cart_item_filters | List Application cart item filters *ManagementApi* | [**list_campaign_store_budget_limits**](docs/ManagementApi.md#list_campaign_store_budget_limits) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | List campaign store budget limits *ManagementApi* | [**list_catalog_items**](docs/ManagementApi.md#list_catalog_items) | **GET** /v1/catalogs/{catalogId}/items | List items in a catalog *ManagementApi* | [**list_collections**](docs/ManagementApi.md#list_collections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign @@ -559,6 +563,7 @@ Class | Method | HTTP request | Description - [CreateApplicationAPIKey](docs/CreateApplicationAPIKey.md) - [CreateCouponData](docs/CreateCouponData.md) - [CreateCoupons200Response](docs/CreateCoupons200Response.md) +- [CreateMCPKey](docs/CreateMCPKey.md) - [CreateManagementKey](docs/CreateManagementKey.md) - [CreateReferralsForMultipleAdvocates201Response](docs/CreateReferralsForMultipleAdvocates201Response.md) - [CreateTemplateCampaign](docs/CreateTemplateCampaign.md) @@ -612,10 +617,16 @@ Class | Method | HTTP request | Description - [ExperimentListResultsRequest](docs/ExperimentListResultsRequest.md) - [ExperimentResult](docs/ExperimentResult.md) - [ExperimentResults](docs/ExperimentResults.md) +- [ExperimentSegmentInsight](docs/ExperimentSegmentInsight.md) +- [ExperimentSegmentInsightMetric](docs/ExperimentSegmentInsightMetric.md) +- [ExperimentSegmentInsightVariant](docs/ExperimentSegmentInsightVariant.md) +- [ExperimentSegmentInsights](docs/ExperimentSegmentInsights.md) - [ExperimentVariant](docs/ExperimentVariant.md) - [ExperimentVariantAllocation](docs/ExperimentVariantAllocation.md) - [ExperimentVariantResult](docs/ExperimentVariantResult.md) - [ExperimentVariantResultConfidence](docs/ExperimentVariantResultConfidence.md) +- [ExperimentVerdict](docs/ExperimentVerdict.md) +- [ExperimentVerdictResponse](docs/ExperimentVerdictResponse.md) - [ExpiringCardPointsData](docs/ExpiringCardPointsData.md) - [ExpiringCardPointsNotification](docs/ExpiringCardPointsNotification.md) - [ExpiringCouponsData](docs/ExpiringCouponsData.md) @@ -709,6 +720,7 @@ Class | Method | HTTP request | Description - [IntegrationEventV2Response](docs/IntegrationEventV2Response.md) - [IntegrationEventV3Request](docs/IntegrationEventV3Request.md) - [IntegrationEventV3Response](docs/IntegrationEventV3Response.md) +- [IntegrationGetAllCampaigns200Response](docs/IntegrationGetAllCampaigns200Response.md) - [IntegrationHubConfig](docs/IntegrationHubConfig.md) - [IntegrationHubEventPayloadCouponBasedNotifications](docs/IntegrationHubEventPayloadCouponBasedNotifications.md) - [IntegrationHubEventPayloadCouponBasedNotificationsLimits](docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md) @@ -746,6 +758,7 @@ Class | Method | HTTP request | Description - [ListAccountCollections200Response](docs/ListAccountCollections200Response.md) - [ListAchievements200Response](docs/ListAchievements200Response.md) - [ListAllRolesV2200Response](docs/ListAllRolesV2200Response.md) +- [ListApplicationCartItemFilters200Response](docs/ListApplicationCartItemFilters200Response.md) - [ListCampaignStoreBudgetLimits200Response](docs/ListCampaignStoreBudgetLimits200Response.md) - [ListCampaignStoreBudgets](docs/ListCampaignStoreBudgets.md) - [ListCampaignStoreBudgetsStore](docs/ListCampaignStoreBudgetsStore.md) @@ -779,6 +792,7 @@ Class | Method | HTTP request | Description - [LoyaltyProgramTransaction](docs/LoyaltyProgramTransaction.md) - [LoyaltySubLedger](docs/LoyaltySubLedger.md) - [LoyaltyTier](docs/LoyaltyTier.md) +- [MCPKey](docs/MCPKey.md) - [ManagementKey](docs/ManagementKey.md) - [ManagerConfig](docs/ManagerConfig.md) - [MessageLogEntries](docs/MessageLogEntries.md) @@ -841,6 +855,7 @@ Class | Method | HTTP request | Description - [NewInviteEmail](docs/NewInviteEmail.md) - [NewLoyaltyProgram](docs/NewLoyaltyProgram.md) - [NewLoyaltyTier](docs/NewLoyaltyTier.md) +- [NewMCPKey](docs/NewMCPKey.md) - [NewManagementKey](docs/NewManagementKey.md) - [NewMessageTest](docs/NewMessageTest.md) - [NewMultipleAudiencesItem](docs/NewMultipleAudiencesItem.md) @@ -855,6 +870,7 @@ Class | Method | HTTP request | Description - [NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md) - [NewReturn](docs/NewReturn.md) - [NewRevisionVersion](docs/NewRevisionVersion.md) +- [NewReward](docs/NewReward.md) - [NewRole](docs/NewRole.md) - [NewRoleV2](docs/NewRoleV2.md) - [NewRuleset](docs/NewRuleset.md) @@ -922,6 +938,7 @@ Class | Method | HTTP request | Description - [RevisionActivation](docs/RevisionActivation.md) - [RevisionActivationRequest](docs/RevisionActivationRequest.md) - [RevisionVersion](docs/RevisionVersion.md) +- [Reward](docs/Reward.md) - [Role](docs/Role.md) - [RoleAssign](docs/RoleAssign.md) - [RoleMembership](docs/RoleMembership.md) diff --git a/docs/AchievementV2.md b/docs/AchievementV2.md index 154898c..51f7abe 100644 --- a/docs/AchievementV2.md +++ b/docs/AchievementV2.md @@ -7,19 +7,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | The internal ID of this entity. | **created** | **datetime** | The time this entity was created. | -**name** | **str** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | [optional] -**title** | **str** | The display name for the achievement in the Campaign Manager. | [optional] -**description** | **str** | A description of the achievement. | [optional] -**target** | **float** | The required number of actions or the transactional milestone to complete the achievement. | [optional] +**name** | **str** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | +**title** | **str** | The display name for the achievement in the Campaign Manager. | +**description** | **str** | A description of the achievement. | +**target** | **float** | The required number of actions or the transactional milestone to complete the achievement. | **period** | **str** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. | [optional] -**recurrence_policy** | **str** | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again. | [optional] -**activation_policy** | **str** | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | [optional] +**recurrence_policy** | **str** | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again. | +**activation_policy** | **str** | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | **fixed_start_date** | **datetime** | The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string. | [optional] **end_date** | **datetime** | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional] **allow_rollback_after_completion** | **bool** | When `true`, customer progress can be rolled back in completed achievements. | [optional] -**sandbox** | **bool** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | [optional] -**subscribed_applications** | **List[int]** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | [optional] -**timezone** | **str** | A string containing an IANA timezone descriptor. | [optional] +**sandbox** | **bool** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | +**subscribed_applications** | **List[int]** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | +**timezone** | **str** | A string containing an IANA timezone descriptor. | **user_id** | **int** | The ID of the user that created this achievement. | **created_by** | **str** | Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. | [optional] **has_progress** | **bool** | Indicates if a customer has made progress in the achievement. | [optional] diff --git a/docs/BestPriorPriceRequest.md b/docs/BestPriorPriceRequest.md index 0d5bb05..c111e16 100644 --- a/docs/BestPriorPriceRequest.md +++ b/docs/BestPriorPriceRequest.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **skus** | **List[str]** | List of product SKUs to check when determining the best prior price. | **timeframe_end_date** | **datetime** | The end date and time that defines the latest time for retrieving historical SKU prices. | **timeframe** | **str** | The number of days prior to the timeframeEndDate. Only prices within this look back period are considered for the best prior price evaluation. | -**strict_end_date** | **bool** | This property is **deprecated**. Use `timeframeEndDateType` instead. Indicates whether the timeframe includes the start of the current sale. - When `false`, the timeframe includes the start date of the current sale. - When `true`, the timeframe strictly uses the number of days specified in `timeframe`. | -**timeframe_end_date_type** | **str** | Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. | [optional] +**timeframe_end_date_type** | **str** | Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. | **target** | [**BestPriorTarget**](BestPriorTarget.md) | | [optional] ## Example diff --git a/docs/CreateAchievementV2.md b/docs/CreateAchievementV2.md index 08f99d6..91c8ab3 100644 --- a/docs/CreateAchievementV2.md +++ b/docs/CreateAchievementV2.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **end_date** | **datetime** | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional] **allow_rollback_after_completion** | **bool** | When `true`, customer progress can be rolled back in completed achievements. | [optional] **sandbox** | **bool** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | -**subscribed_applications** | **List[int]** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | +**subscribed_applications** | **List[int]** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | [optional] **timezone** | **str** | A string containing an IANA timezone descriptor. | ## Example diff --git a/docs/CreateMCPKey.md b/docs/CreateMCPKey.md new file mode 100644 index 0000000..4ca8efa --- /dev/null +++ b/docs/CreateMCPKey.md @@ -0,0 +1,30 @@ +# CreateMCPKey + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name for the MCP key. | +**expiry_date** | **datetime** | The date the MCP key expires. | + +## Example + +```python +from talon_one.models.create_mcp_key import CreateMCPKey + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateMCPKey from a JSON string +create_mcp_key_instance = CreateMCPKey.from_json(json) +# print the JSON string representation of the object +print(CreateMCPKey.to_json()) + +# convert the object into a dict +create_mcp_key_dict = create_mcp_key_instance.to_dict() +# create an instance of CreateMCPKey from a dict +create_mcp_key_from_dict = CreateMCPKey.from_dict(create_mcp_key_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/ExperimentSegmentInsight.md b/docs/ExperimentSegmentInsight.md new file mode 100644 index 0000000..3e85d3b --- /dev/null +++ b/docs/ExperimentSegmentInsight.md @@ -0,0 +1,33 @@ +# ExperimentSegmentInsight + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimension** | **str** | The segmentation dimension used to group customers or purchases for analysis. | +**bucket** | **str** | The specific group within the segmentation dimension. | +**confidence** | **float** | The raw (unadjusted) confidence score expressed as a percentage. Only segments with a confidence score greater than or equal to 95% are returned. | +**winner_variant_id** | **int** | The ID of the variant that performed better in this segment. | +**variants** | [**List[ExperimentSegmentInsightVariant]**](ExperimentSegmentInsightVariant.md) | Per-variant metric values for this segment. | + +## Example + +```python +from talon_one.models.experiment_segment_insight import ExperimentSegmentInsight + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentSegmentInsight from a JSON string +experiment_segment_insight_instance = ExperimentSegmentInsight.from_json(json) +# print the JSON string representation of the object +print(ExperimentSegmentInsight.to_json()) + +# convert the object into a dict +experiment_segment_insight_dict = experiment_segment_insight_instance.to_dict() +# create an instance of ExperimentSegmentInsight from a dict +experiment_segment_insight_from_dict = ExperimentSegmentInsight.from_dict(experiment_segment_insight_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/ExperimentSegmentInsightMetric.md b/docs/ExperimentSegmentInsightMetric.md new file mode 100644 index 0000000..d89a4dc --- /dev/null +++ b/docs/ExperimentSegmentInsightMetric.md @@ -0,0 +1,30 @@ +# ExperimentSegmentInsightMetric + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **str** | The metric being measured. | +**segments** | [**List[ExperimentSegmentInsight]**](ExperimentSegmentInsight.md) | Segments with statistically significant results for this metric. An empty array means no significant segments were found. Segments are sorted by confidence score from highest to lowest. | + +## Example + +```python +from talon_one.models.experiment_segment_insight_metric import ExperimentSegmentInsightMetric + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentSegmentInsightMetric from a JSON string +experiment_segment_insight_metric_instance = ExperimentSegmentInsightMetric.from_json(json) +# print the JSON string representation of the object +print(ExperimentSegmentInsightMetric.to_json()) + +# convert the object into a dict +experiment_segment_insight_metric_dict = experiment_segment_insight_metric_instance.to_dict() +# create an instance of ExperimentSegmentInsightMetric from a dict +experiment_segment_insight_metric_from_dict = ExperimentSegmentInsightMetric.from_dict(experiment_segment_insight_metric_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/ExperimentSegmentInsightVariant.md b/docs/ExperimentSegmentInsightVariant.md new file mode 100644 index 0000000..78661af --- /dev/null +++ b/docs/ExperimentSegmentInsightVariant.md @@ -0,0 +1,32 @@ +# ExperimentSegmentInsightVariant + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**variant_id** | **int** | The ID of the experiment variant. | +**variant_name** | **str** | The name of the experiment variant. | +**sessions_count** | **int** | The number of sessions in this segment for this variant. | +**value** | **float** | The metric value for this variant in the segment. | + +## Example + +```python +from talon_one.models.experiment_segment_insight_variant import ExperimentSegmentInsightVariant + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentSegmentInsightVariant from a JSON string +experiment_segment_insight_variant_instance = ExperimentSegmentInsightVariant.from_json(json) +# print the JSON string representation of the object +print(ExperimentSegmentInsightVariant.to_json()) + +# convert the object into a dict +experiment_segment_insight_variant_dict = experiment_segment_insight_variant_instance.to_dict() +# create an instance of ExperimentSegmentInsightVariant from a dict +experiment_segment_insight_variant_from_dict = ExperimentSegmentInsightVariant.from_dict(experiment_segment_insight_variant_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/ExperimentSegmentInsights.md b/docs/ExperimentSegmentInsights.md new file mode 100644 index 0000000..dac84ee --- /dev/null +++ b/docs/ExperimentSegmentInsights.md @@ -0,0 +1,32 @@ +# ExperimentSegmentInsights + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metrics** | [**List[ExperimentSegmentInsightMetric]**](ExperimentSegmentInsightMetric.md) | Segment insights grouped by metric. This array always contains exactly three metric objects. Each metric includes a segments array, which is empty if no significant results were found. The metrics array itself is empty if the `reason` property is populated. | +**total_segments_tested** | **int** | Total number of segment-metric combinations that were tested for statistical significance. | +**dimensions_tested** | **int** | Number of segmentation dimensions that had sufficient data variance to test. Dimensions where all sessions fall into a single bucket are excluded. | +**reason** | **str** | Empty string when segment insights are available. Contains a reason code when insights could not be computed (e.g., \"insufficient_data\" when the experiment has fewer than 100 sessions per variant). | + +## Example + +```python +from talon_one.models.experiment_segment_insights import ExperimentSegmentInsights + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentSegmentInsights from a JSON string +experiment_segment_insights_instance = ExperimentSegmentInsights.from_json(json) +# print the JSON string representation of the object +print(ExperimentSegmentInsights.to_json()) + +# convert the object into a dict +experiment_segment_insights_dict = experiment_segment_insights_instance.to_dict() +# create an instance of ExperimentSegmentInsights from a dict +experiment_segment_insights_from_dict = ExperimentSegmentInsights.from_dict(experiment_segment_insights_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/ExperimentVerdict.md b/docs/ExperimentVerdict.md new file mode 100644 index 0000000..1816bbd --- /dev/null +++ b/docs/ExperimentVerdict.md @@ -0,0 +1,33 @@ +# ExperimentVerdict + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**winner_variant_name** | **str** | The name of the winning variant. If no variant shows a statistically significant advantage on key business metrics, return 'Inconclusive'. | +**verdict_summary** | **str** | A one-sentence summary of the outcome, including the key metric and confidence level that led to the decision. | +**key_findings** | **List[str]** | A bullet point stating the most important finding, including the metric, the percentage change, and the confidence. | +**ai_confidence_level** | **str** | Your confidence in this overall verdict, from 0 to 100. | +**recommendation** | **str** | A short, actionable recommendation based on the findings. If inconclusive, suggest running the test longer. If there is a clear winner, recommend promoting it. | + +## Example + +```python +from talon_one.models.experiment_verdict import ExperimentVerdict + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentVerdict from a JSON string +experiment_verdict_instance = ExperimentVerdict.from_json(json) +# print the JSON string representation of the object +print(ExperimentVerdict.to_json()) + +# convert the object into a dict +experiment_verdict_dict = experiment_verdict_instance.to_dict() +# create an instance of ExperimentVerdict from a dict +experiment_verdict_from_dict = ExperimentVerdict.from_dict(experiment_verdict_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/ExperimentVerdictResponse.md b/docs/ExperimentVerdictResponse.md new file mode 100644 index 0000000..a6ffdad --- /dev/null +++ b/docs/ExperimentVerdictResponse.md @@ -0,0 +1,30 @@ +# ExperimentVerdictResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verdict** | [**ExperimentVerdict**](ExperimentVerdict.md) | | +**generated** | **datetime** | Timestamp of the moment when the verdict was generated. | + +## Example + +```python +from talon_one.models.experiment_verdict_response import ExperimentVerdictResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExperimentVerdictResponse from a JSON string +experiment_verdict_response_instance = ExperimentVerdictResponse.from_json(json) +# print the JSON string representation of the object +print(ExperimentVerdictResponse.to_json()) + +# convert the object into a dict +experiment_verdict_response_dict = experiment_verdict_response_instance.to_dict() +# create an instance of ExperimentVerdictResponse from a dict +experiment_verdict_response_from_dict = ExperimentVerdictResponse.from_dict(experiment_verdict_response_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/IntegrationApi.md b/docs/IntegrationApi.md index ebe8ce4..601ba9e 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -27,6 +27,7 @@ Method | HTTP request | Description [**get_loyalty_program_profile_points**](IntegrationApi.md#get_loyalty_program_profile_points) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points | List customer's unused loyalty points [**get_loyalty_program_profile_transactions**](IntegrationApi.md#get_loyalty_program_profile_transactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions [**get_reserved_customers**](IntegrationApi.md#get_reserved_customers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved +[**integration_get_all_campaigns**](IntegrationApi.md#integration_get_all_campaigns) | **GET** /v1/integration/campaigns | List all running campaigns [**link_loyalty_card_to_profile**](IntegrationApi.md#link_loyalty_card_to_profile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card [**reopen_customer_session**](IntegrationApi.md#reopen_customer_session) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session [**return_cart_items**](IntegrationApi.md#return_cart_items) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items @@ -2222,6 +2223,103 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **integration_get_all_campaigns** +> IntegrationGetAllCampaigns200Response integration_get_all_campaigns(page_size=page_size, skip=skip, campaign_ids=campaign_ids, start_after=start_after, start_before=start_before, end_after=end_after, end_before=end_before) + +List all running campaigns + +Retrieve all running campaigns for the specified Application. You +can filter the results by providing specific campaign IDs or a range of +start and end dates. + + +### Example + +* Api Key Authentication (api_key_v1): + +```python +import talon_one +from talon_one.models.integration_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response +from talon_one.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://yourbaseurl.talon.one +# See configuration.py for a list of all supported configuration parameters. +configuration = talon_one.Configuration( + host = "https://yourbaseurl.talon.one" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key_v1 +configuration.api_key['api_key_v1'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key_v1'] = 'Bearer' + +# Enter a context with an instance of the API client +with talon_one.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = talon_one.IntegrationApi(api_client) + page_size = 50 # int | The number of items in the response. (optional) (default to 50) + skip = 56 # int | The number of items to skip when paging through large result sets. (optional) + campaign_ids = ['campaign_ids_example'] # List[str] | Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. (optional) + start_after = '2013-10-20T19:20:30+01:00' # datetime | Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional) + start_before = '2013-10-20T19:20:30+01:00' # datetime | Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional) + end_after = '2013-10-20T19:20:30+01:00' # datetime | Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional) + end_before = '2013-10-20T19:20:30+01:00' # datetime | Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional) + + try: + # List all running campaigns + api_response = api_instance.integration_get_all_campaigns(page_size=page_size, skip=skip, campaign_ids=campaign_ids, start_after=start_after, start_before=start_before, end_after=end_after, end_before=end_before) + print("The response of IntegrationApi->integration_get_all_campaigns:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IntegrationApi->integration_get_all_campaigns: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_size** | **int**| The number of items in the response. | [optional] [default to 50] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **campaign_ids** | [**List[str]**](str.md)| Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. | [optional] + **start_after** | **datetime**| Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] + **start_before** | **datetime**| Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] + **end_after** | **datetime**| Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] + **end_before** | **datetime**| Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] + +### Return type + +[**IntegrationGetAllCampaigns200Response**](IntegrationGetAllCampaigns200Response.md) + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad request | - | +**401** | Unauthorized | - | +**404** | Not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **link_loyalty_card_to_profile** > LoyaltyCard link_loyalty_card_to_profile(loyalty_program_id, loyalty_card_id, loyalty_card_registration) @@ -2450,7 +2548,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **return_cart_items** -> IntegrationStateV2 return_cart_items(customer_session_id, return_integration_request, dry=dry) +> IntegrationStateV2 return_cart_items(customer_session_id, return_integration_request, dry=dry, run_rule_engine=run_rule_engine) Return cart items @@ -2505,10 +2603,11 @@ with talon_one.ApiClient(configuration) as api_client: customer_session_id = 'customer_session_id_example' # str | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. return_integration_request = talon_one.ReturnIntegrationRequest() # ReturnIntegrationRequest | body dry = True # bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + run_rule_engine = True # bool | When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. (optional) try: # Return cart items - api_response = api_instance.return_cart_items(customer_session_id, return_integration_request, dry=dry) + api_response = api_instance.return_cart_items(customer_session_id, return_integration_request, dry=dry, run_rule_engine=run_rule_engine) print("The response of IntegrationApi->return_cart_items:\n") pprint(api_response) except Exception as e: @@ -2525,6 +2624,7 @@ Name | Type | Description | Notes **customer_session_id** | **str**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. | **return_integration_request** | [**ReturnIntegrationRequest**](ReturnIntegrationRequest.md)| body | **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] + **run_rule_engine** | **bool**| When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. | [optional] ### Return type diff --git a/docs/IntegrationGetAllCampaigns200Response.md b/docs/IntegrationGetAllCampaigns200Response.md new file mode 100644 index 0000000..f9cac1c --- /dev/null +++ b/docs/IntegrationGetAllCampaigns200Response.md @@ -0,0 +1,30 @@ +# IntegrationGetAllCampaigns200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | | +**data** | [**List[IntegrationCampaign]**](IntegrationCampaign.md) | | + +## Example + +```python +from talon_one.models.integration_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of IntegrationGetAllCampaigns200Response from a JSON string +integration_get_all_campaigns200_response_instance = IntegrationGetAllCampaigns200Response.from_json(json) +# print the JSON string representation of the object +print(IntegrationGetAllCampaigns200Response.to_json()) + +# convert the object into a dict +integration_get_all_campaigns200_response_dict = integration_get_all_campaigns200_response_instance.to_dict() +# create an instance of IntegrationGetAllCampaigns200Response from a dict +integration_get_all_campaigns200_response_from_dict = IntegrationGetAllCampaigns200Response.from_dict(integration_get_all_campaigns200_response_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/LedgerInfo.md b/docs/LedgerInfo.md index 0c19677..9fdf2b7 100644 --- a/docs/LedgerInfo.md +++ b/docs/LedgerInfo.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **tentative_negative_balance** | **float** | The tentative negative balance after all additions and deductions from the current customer session are applied to `negativeBalance`. When the session is closed, the tentative effects are applied and `negativeBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. | [optional] **current_tier** | [**Tier**](Tier.md) | Tier for which the ledger is eligible. | [optional] **points_to_next_tier** | **float** | Points required to move up a tier. | [optional] +**next_tier_name** | **str** | The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. | [optional] ## Example diff --git a/docs/ListApplicationCartItemFilters200Response.md b/docs/ListApplicationCartItemFilters200Response.md new file mode 100644 index 0000000..1d06ce4 --- /dev/null +++ b/docs/ListApplicationCartItemFilters200Response.md @@ -0,0 +1,30 @@ +# ListApplicationCartItemFilters200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | | [optional] +**data** | [**List[ApplicationCIF]**](ApplicationCIF.md) | | + +## Example + +```python +from talon_one.models.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListApplicationCartItemFilters200Response from a JSON string +list_application_cart_item_filters200_response_instance = ListApplicationCartItemFilters200Response.from_json(json) +# print the JSON string representation of the object +print(ListApplicationCartItemFilters200Response.to_json()) + +# convert the object into a dict +list_application_cart_item_filters200_response_dict = list_application_cart_item_filters200_response_instance.to_dict() +# create an instance of ListApplicationCartItemFilters200Response from a dict +list_application_cart_item_filters200_response_from_dict = ListApplicationCartItemFilters200Response.from_dict(list_application_cart_item_filters200_response_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/LoyaltyBalanceWithTier.md b/docs/LoyaltyBalanceWithTier.md index 89c85c9..2495e1c 100644 --- a/docs/LoyaltyBalanceWithTier.md +++ b/docs/LoyaltyBalanceWithTier.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **current_tier** | [**Tier**](Tier.md) | Customer's current tier. | [optional] **projected_tier** | [**ProjectedTier**](ProjectedTier.md) | | [optional] **points_to_next_tier** | **float** | The number of points required to move up a tier. | [optional] -**next_tier_name** | **str** | The name of the tier consecutive to the current tier. | [optional] +**next_tier_name** | **str** | The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. | [optional] ## Example diff --git a/docs/MCPKey.md b/docs/MCPKey.md new file mode 100644 index 0000000..15ba0a6 --- /dev/null +++ b/docs/MCPKey.md @@ -0,0 +1,36 @@ +# MCPKey + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name for the MCP key. | +**expiry_date** | **datetime** | The date the MCP key expires. | +**id** | **int** | ID of the MCP key. | +**created_by** | **int** | ID of the user who created it. | +**account_id** | **int** | ID of account the key is used for. | +**created** | **datetime** | The date the MCP key was created. | +**disabled** | **bool** | The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. | [optional] +**last_used** | **datetime** | The last time the MCP key was used. | [optional] + +## Example + +```python +from talon_one.models.mcp_key import MCPKey + +# TODO update the JSON string below +json = "{}" +# create an instance of MCPKey from a JSON string +mcp_key_instance = MCPKey.from_json(json) +# print the JSON string representation of the object +print(MCPKey.to_json()) + +# convert the object into a dict +mcp_key_dict = mcp_key_instance.to_dict() +# create an instance of MCPKey from a dict +mcp_key_from_dict = MCPKey.from_dict(mcp_key_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 ec97836..5d6a99e 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description [**create_campaign_store_budget**](ManagementApi.md#create_campaign_store_budget) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | Create campaign store budget [**create_collection**](ManagementApi.md#create_collection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection [**create_coupons**](ManagementApi.md#create_coupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons -[**create_coupons_async**](ManagementApi.md#create_coupons_async) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously +[**create_coupons_asynchronously**](ManagementApi.md#create_coupons_asynchronously) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously [**create_coupons_deletion_job**](ManagementApi.md#create_coupons_deletion_job) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job [**create_coupons_for_multiple_recipients**](ManagementApi.md#create_coupons_for_multiple_recipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients [**create_invite_email**](ManagementApi.md#create_invite_email) | **POST** /v1/invite_emails | Resend invitation email @@ -47,6 +47,7 @@ Method | HTTP request | Description [**export_audiences_memberships**](ManagementApi.md#export_audiences_memberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members [**export_campaign_store_budgets**](ManagementApi.md#export_campaign_store_budgets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/export | Export campaign store budgets [**export_campaign_stores**](ManagementApi.md#export_campaign_stores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores +[**export_campaign_value_map**](ManagementApi.md#export_campaign_value_map) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export | Export campaign value map [**export_collection_items**](ManagementApi.md#export_collection_items) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items [**export_coupons**](ManagementApi.md#export_coupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons [**export_customer_sessions**](ManagementApi.md#export_customer_sessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -71,6 +72,7 @@ Method | HTTP request | Description [**get_additional_costs**](ManagementApi.md#get_additional_costs) | **GET** /v1/additional_costs | List additional costs [**get_application**](ManagementApi.md#get_application) | **GET** /v1/applications/{applicationId} | Get Application [**get_application_api_health**](ManagementApi.md#get_application_api_health) | **GET** /v1/applications/{applicationId}/health_report | Get Application health +[**get_application_cart_item_filter_expression**](ManagementApi.md#get_application_cart_item_filter_expression) | **GET** /v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId} | Get Application cart item filter expression [**get_application_customer**](ManagementApi.md#get_application_customer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer [**get_application_customer_friends**](ManagementApi.md#get_application_customer_friends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile [**get_application_customers**](ManagementApi.md#get_application_customers) | **GET** /v1/applications/{applicationId}/customers | List application's customers @@ -143,6 +145,7 @@ Method | HTTP request | Description [**list_account_collections**](ManagementApi.md#list_account_collections) | **GET** /v1/collections | List collections in account [**list_achievements**](ManagementApi.md#list_achievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements [**list_all_roles_v2**](ManagementApi.md#list_all_roles_v2) | **GET** /v2/roles | List roles +[**list_application_cart_item_filters**](ManagementApi.md#list_application_cart_item_filters) | **GET** /v1/applications/{applicationId}/cart_item_filters | List Application cart item filters [**list_campaign_store_budget_limits**](ManagementApi.md#list_campaign_store_budget_limits) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | List campaign store budget limits [**list_catalog_items**](ManagementApi.md#list_catalog_items) | **GET** /v1/catalogs/{catalogId}/items | List items in a catalog [**list_collections**](ManagementApi.md#list_collections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign @@ -1303,8 +1306,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **create_coupons_async** -> AsyncCouponCreationResponse create_coupons_async(application_id, campaign_id, new_coupon_creation_job) +# **create_coupons_asynchronously** +> AsyncCouponCreationResponse create_coupons_asynchronously(application_id, campaign_id, new_coupon_creation_job) Create coupons asynchronously @@ -1351,11 +1354,11 @@ with talon_one.ApiClient(configuration) as api_client: try: # Create coupons asynchronously - api_response = api_instance.create_coupons_async(application_id, campaign_id, new_coupon_creation_job) - print("The response of ManagementApi->create_coupons_async:\n") + api_response = api_instance.create_coupons_asynchronously(application_id, campaign_id, new_coupon_creation_job) + print("The response of ManagementApi->create_coupons_asynchronously:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManagementApi->create_coupons_async: %s\n" % e) + print("Exception when calling ManagementApi->create_coupons_asynchronously: %s\n" % e) ``` @@ -3845,6 +3848,102 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **export_campaign_value_map** +> str export_campaign_value_map(application_id, campaign_id, value_map_id) + +Export campaign value map + +Download a CSV file containing all the value map items in a campaign. If +there are multiple versions of the value map, only the items of the current +version are exported. + +> [!tip] If the exported CSV file is too large to view, you can +> [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). + +The generated file can contain the following columns: + +- `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. +- `value`: The value that is associated with the identifier, for example, the item's price. + + +### Example + +* Api Key Authentication (api_key_v1): + +```python +import talon_one +from talon_one.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://yourbaseurl.talon.one +# See configuration.py for a list of all supported configuration parameters. +configuration = talon_one.Configuration( + host = "https://yourbaseurl.talon.one" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key_v1 +configuration.api_key['api_key_v1'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key_v1'] = 'Bearer' + +# Enter a context with an instance of the API client +with talon_one.ApiClient(configuration) as api_client: + # Create an instance of the API class + 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. + value_map_id = 56 # int | The ID of the value map. + + try: + # Export campaign value map + api_response = api_instance.export_campaign_value_map(application_id, campaign_id, value_map_id) + print("The response of ManagementApi->export_campaign_value_map:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManagementApi->export_campaign_value_map: %s\n" % e) +``` + + + +### Parameters + + +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. | + **value_map_id** | **int**| The ID of the value map. | + +### Return type + +**str** + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/csv, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad request | - | +**401** | Unauthorized | - | +**404** | Not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **export_collection_items** > str export_collection_items(application_id, campaign_id, collection_id) @@ -5970,7 +6069,7 @@ Name | Type | Description | Notes Get Application -Get the application specified by the ID. +Get the Application specified by the ID. ### Example @@ -6128,6 +6227,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_application_cart_item_filter_expression** +> ApplicationCIFExpression get_application_cart_item_filter_expression(application_id, cart_item_filter_id, expression_id) + +Get Application cart item filter expression + +Get an Application cart item filter expression for a specific Application. + +### Example + +* Api Key Authentication (api_key_v1): + +```python +import talon_one +from talon_one.models.application_cif_expression import ApplicationCIFExpression +from talon_one.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://yourbaseurl.talon.one +# See configuration.py for a list of all supported configuration parameters. +configuration = talon_one.Configuration( + host = "https://yourbaseurl.talon.one" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key_v1 +configuration.api_key['api_key_v1'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key_v1'] = 'Bearer' + +# Enter a context with an instance of the API client +with talon_one.ApiClient(configuration) as api_client: + # Create an instance of the API class + 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. + cart_item_filter_id = 56 # int | The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. + expression_id = 56 # int | The ID of the Application cart item filter expression. + + try: + # Get Application cart item filter expression + api_response = api_instance.get_application_cart_item_filter_expression(application_id, cart_item_filter_id, expression_id) + print("The response of ManagementApi->get_application_cart_item_filter_expression:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManagementApi->get_application_cart_item_filter_expression: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **cart_item_filter_id** | **int**| The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. | + **expression_id** | **int**| The ID of the Application cart item filter expression. | + +### Return type + +[**ApplicationCIFExpression**](ApplicationCIFExpression.md) + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_application_customer** > ApplicationCustomer get_application_customer(application_id, customer_id) @@ -6254,7 +6436,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) try: # List friends referred by customer profile @@ -6277,7 +6459,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] ### Return type @@ -6342,7 +6524,7 @@ with talon_one.ApiClient(configuration) as api_client: integration_id = 'integration_id_example' # str | Filter results performing an exact matching against the profile integration identifier. (optional) page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) try: # List application's customers @@ -6364,7 +6546,7 @@ Name | Type | Description | Notes **integration_id** | **str**| Filter results performing an exact matching against the profile integration identifier. | [optional] **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] ### Return type @@ -6433,7 +6615,7 @@ with talon_one.ApiClient(configuration) as api_client: customer_profile_search_query = talon_one.CustomerProfileSearchQuery() # CustomerProfileSearchQuery | body page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) try: # List application customers matching the given attributes @@ -6455,7 +6637,7 @@ Name | Type | Description | Notes **customer_profile_search_query** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md)| body | **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] ### Return type @@ -6868,7 +7050,7 @@ Name | Type | Description | Notes List Applications -List all applications in the current account. +List all the Applications in the current account. ### Example @@ -7253,7 +7435,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) try: # List audiences @@ -7274,7 +7456,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] ### Return type @@ -8049,7 +8231,7 @@ with talon_one.ApiClient(configuration) as api_client: user_id = 56 # int | Filter results by user ID. (optional) created_before = '2013-10-20T19:20:30+01:00' # datetime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) created_after = '2013-10-20T19:20:30+01:00' # datetime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) management_key_id = 56 # int | Filter results that match the given management key ID. (optional) include_old = True # bool | When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) @@ -8077,7 +8259,7 @@ Name | Type | Description | Notes **user_id** | **int**| Filter results by user ID. | [optional] **created_before** | **datetime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] **created_after** | **datetime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **management_key_id** | **int**| Filter results that match the given management key ID. | [optional] **include_old** | **bool**| When this flag is set to false, the state without the change will not be returned. The default value is true. | [optional] @@ -12664,7 +12846,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) name = 'name_example' # str | Filter by collection name. (optional) try: @@ -12686,7 +12868,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **name** | **str**| Filter by collection name. | [optional] ### Return type @@ -12875,6 +13057,91 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_application_cart_item_filters** +> ListApplicationCartItemFilters200Response list_application_cart_item_filters(application_id, page_size=page_size, skip=skip, title=title) + +List Application cart item filters + +Return all the Application cart item filters for a specific Application. + +### Example + +* Api Key Authentication (api_key_v1): + +```python +import talon_one +from talon_one.models.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response +from talon_one.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://yourbaseurl.talon.one +# See configuration.py for a list of all supported configuration parameters. +configuration = talon_one.Configuration( + host = "https://yourbaseurl.talon.one" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key_v1 +configuration.api_key['api_key_v1'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key_v1'] = 'Bearer' + +# Enter a context with an instance of the API client +with talon_one.ApiClient(configuration) as api_client: + # Create an instance of the API class + 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. + page_size = 50 # int | The number of items in the response. (optional) (default to 50) + skip = 56 # int | The number of items to skip when paging through large result sets. (optional) + title = 'title_example' # str | Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. (optional) + + try: + # List Application cart item filters + api_response = api_instance.list_application_cart_item_filters(application_id, page_size=page_size, skip=skip, title=title) + print("The response of ManagementApi->list_application_cart_item_filters:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManagementApi->list_application_cart_item_filters: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **page_size** | **int**| The number of items in the response. | [optional] [default to 50] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **title** | **str**| Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. | [optional] + +### Return type + +[**ListApplicationCartItemFilters200Response**](ListApplicationCartItemFilters200Response.md) + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_campaign_store_budget_limits** > ListCampaignStoreBudgetLimits200Response list_campaign_store_budget_limits(application_id, campaign_id, action=action, period=period) @@ -13005,7 +13272,7 @@ with talon_one.ApiClient(configuration) as api_client: catalog_id = 56 # int | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) sku = ['sku_example'] # List[str] | Filter results by one or more SKUs. Must be exact match. (optional) product_names = ['product_names_example'] # List[str] | Filter results by one or more product names. Must be exact match. (optional) @@ -13028,7 +13295,7 @@ Name | Type | Description | Notes **catalog_id** | **int**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. | **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **sku** | [**List[str]**](str.md)| Filter results by one or more SKUs. Must be exact match. | [optional] **product_names** | [**List[str]**](str.md)| Filter results by one or more product names. Must be exact match. | [optional] @@ -13096,7 +13363,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) name = 'name_example' # str | Filter by collection name. (optional) try: @@ -13120,7 +13387,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **name** | **str**| Filter by collection name. | [optional] ### Return type @@ -13187,7 +13454,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) name = 'name_example' # str | Filter by collection name. (optional) try: @@ -13210,7 +13477,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **name** | **str**| Filter by collection name. | [optional] ### Return type @@ -13362,7 +13629,7 @@ with talon_one.ApiClient(configuration) as api_client: page_size = 1000 # int | The number of items in the response. (optional) (default to 1000) skip = 56 # int | The number of items to skip when paging through large result sets. (optional) sort = 'sort_example' # str | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional) - with_total_result_size = True # bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + with_total_result_size = True # bool | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) campaign_id = 3.4 # float | Filter results by campaign ID. (optional) name = 'name_example' # str | The name of the store. (optional) integration_id = 'integration_id_example' # str | The integration ID of the store. (optional) @@ -13388,7 +13655,7 @@ Name | Type | Description | Notes **page_size** | **int**| The number of items in the response. | [optional] [default to 1000] **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **str**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] - **with_total_result_size** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **with_total_result_size** | **bool**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] **campaign_id** | **float**| Filter results by campaign ID. | [optional] **name** | **str**| The name of the store. | [optional] **integration_id** | **str**| The integration ID of the store. | [optional] diff --git a/docs/NewMCPKey.md b/docs/NewMCPKey.md new file mode 100644 index 0000000..b51d314 --- /dev/null +++ b/docs/NewMCPKey.md @@ -0,0 +1,37 @@ +# NewMCPKey + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name for the MCP key. | +**expiry_date** | **datetime** | The date the MCP key expires. | +**id** | **int** | ID of the MCP key. | +**created_by** | **int** | ID of the user who created it. | +**account_id** | **int** | ID of account the key is used for. | +**created** | **datetime** | The date the MCP key was created. | +**disabled** | **bool** | The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. | [optional] +**last_used** | **datetime** | The last time the MCP key was used. | [optional] +**key** | **str** | The generated MCP key. Only returned once on creation. | + +## Example + +```python +from talon_one.models.new_mcp_key import NewMCPKey + +# TODO update the JSON string below +json = "{}" +# create an instance of NewMCPKey from a JSON string +new_mcp_key_instance = NewMCPKey.from_json(json) +# print the JSON string representation of the object +print(NewMCPKey.to_json()) + +# convert the object into a dict +new_mcp_key_dict = new_mcp_key_instance.to_dict() +# create an instance of NewMCPKey from a dict +new_mcp_key_from_dict = NewMCPKey.from_dict(new_mcp_key_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/NewReward.md b/docs/NewReward.md new file mode 100644 index 0000000..cd811f9 --- /dev/null +++ b/docs/NewReward.md @@ -0,0 +1,33 @@ +# NewReward + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the reward. | +**api_name** | **str** | A unique identifier used to reference the reward in API integrations. | +**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. | + +## Example + +```python +from talon_one.models.new_reward import NewReward + +# TODO update the JSON string below +json = "{}" +# create an instance of NewReward from a JSON string +new_reward_instance = NewReward.from_json(json) +# print the JSON string representation of the object +print(NewReward.to_json()) + +# convert the object into a dict +new_reward_dict = new_reward_instance.to_dict() +# create an instance of NewReward from a dict +new_reward_from_dict = NewReward.from_dict(new_reward_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 new file mode 100644 index 0000000..bb12339 --- /dev/null +++ b/docs/Reward.md @@ -0,0 +1,37 @@ +# Reward + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The internal ID of this entity. | +**created** | **datetime** | The time this entity was created. | +**account_id** | **int** | The ID of the account that owns this entity. | +**name** | **str** | The name of the reward. | +**api_name** | **str** | A unique identifier used to reference the reward in API integrations. | +**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. | +**status** | **str** | The status of the reward. | + +## Example + +```python +from talon_one.models.reward import Reward + +# TODO update the JSON string below +json = "{}" +# create an instance of Reward from a JSON string +reward_instance = Reward.from_json(json) +# print the JSON string representation of the object +print(Reward.to_json()) + +# convert the object into a dict +reward_dict = reward_instance.to_dict() +# create an instance of Reward from a dict +reward_from_dict = Reward.from_dict(reward_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 f76f4c7..d7487d7 100644 --- a/docs/RuleMetadata.md +++ b/docs/RuleMetadata.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | A short description of the rule. | -**display_name** | **str** | A customer-facing name used to identify the reward defined within the rule. | [optional] -**display_description** | **str** | A customer-facing description of the reward defined in the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. | [optional] -**related_data** | **str** | Data related to the reward, such as a vendor name, an image URL, or a content management system (CMS) ID. | [optional] +**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] ## Example diff --git a/docs/SetDiscountPerItemEffectProps.md b/docs/SetDiscountPerItemEffectProps.md index 771ba7f..d653adc 100644 --- a/docs/SetDiscountPerItemEffectProps.md +++ b/docs/SetDiscountPerItemEffectProps.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **bundle_name** | **str** | The name of the bundle definition. | [optional] **targeted_item_position** | **float** | The index of the targeted bundle item on which the applied discount is based. | [optional] **targeted_item_sub_position** | **float** | The sub-position of the targeted bundle item on which the applied discount is based. | [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/StrikethroughSetDiscountPerItemEffectProps.md b/docs/StrikethroughSetDiscountPerItemEffectProps.md index 85befa4..21c556c 100644 --- a/docs/StrikethroughSetDiscountPerItemEffectProps.md +++ b/docs/StrikethroughSetDiscountPerItemEffectProps.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | effect name. | **value** | **object** | | -**exclude_from_best_prior_price_history** | **bool** | | [optional] +**excluded_from_price_history** | **bool** | | [optional] ## Example diff --git a/pyproject.toml b/pyproject.toml index 2158347..e89d9ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "talon-one-sdk" -version = "26.07.0" +version = "26.08.0" description = "Talon.One API" authors = [ {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, diff --git a/setup.py b/setup.py index 5100753..ce4c8d8 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # http://pypi.python.org/pypi/setuptools NAME = "talon-one-sdk" -VERSION = "26.07.0" +VERSION = "26.08.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 4284007..813633f 100644 --- a/talon_one/__init__.py +++ b/talon_one/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "26.07.0" +__version__ = "26.08.0" # Define package exports __all__ = [ @@ -213,6 +213,7 @@ "CreateApplicationAPIKey", "CreateCouponData", "CreateCoupons200Response", + "CreateMCPKey", "CreateManagementKey", "CreateReferralsForMultipleAdvocates201Response", "CreateTemplateCampaign", @@ -266,10 +267,16 @@ "ExperimentListResultsRequest", "ExperimentResult", "ExperimentResults", + "ExperimentSegmentInsight", + "ExperimentSegmentInsightMetric", + "ExperimentSegmentInsightVariant", + "ExperimentSegmentInsights", "ExperimentVariant", "ExperimentVariantAllocation", "ExperimentVariantResult", "ExperimentVariantResultConfidence", + "ExperimentVerdict", + "ExperimentVerdictResponse", "ExpiringCardPointsData", "ExpiringCardPointsNotification", "ExpiringCouponsData", @@ -363,6 +370,7 @@ "IntegrationEventV2Response", "IntegrationEventV3Request", "IntegrationEventV3Response", + "IntegrationGetAllCampaigns200Response", "IntegrationHubConfig", "IntegrationHubEventPayloadCouponBasedNotifications", "IntegrationHubEventPayloadCouponBasedNotificationsLimits", @@ -400,6 +408,7 @@ "ListAccountCollections200Response", "ListAchievements200Response", "ListAllRolesV2200Response", + "ListApplicationCartItemFilters200Response", "ListCampaignStoreBudgetLimits200Response", "ListCampaignStoreBudgets", "ListCampaignStoreBudgetsStore", @@ -433,6 +442,7 @@ "LoyaltyProgramTransaction", "LoyaltySubLedger", "LoyaltyTier", + "MCPKey", "ManagementKey", "ManagerConfig", "MessageLogEntries", @@ -495,6 +505,7 @@ "NewInviteEmail", "NewLoyaltyProgram", "NewLoyaltyTier", + "NewMCPKey", "NewManagementKey", "NewMessageTest", "NewMultipleAudiencesItem", @@ -509,6 +520,7 @@ "NewReferralsForMultipleAdvocates", "NewReturn", "NewRevisionVersion", + "NewReward", "NewRole", "NewRoleV2", "NewRuleset", @@ -576,6 +588,7 @@ "RevisionActivation", "RevisionActivationRequest", "RevisionVersion", + "Reward", "Role", "RoleAssign", "RoleMembership", @@ -915,6 +928,7 @@ from talon_one.models.create_application_api_key import CreateApplicationAPIKey as CreateApplicationAPIKey from talon_one.models.create_coupon_data import CreateCouponData as CreateCouponData from talon_one.models.create_coupons200_response import CreateCoupons200Response as CreateCoupons200Response +from talon_one.models.create_mcp_key import CreateMCPKey as CreateMCPKey from talon_one.models.create_management_key import CreateManagementKey as CreateManagementKey from talon_one.models.create_referrals_for_multiple_advocates201_response import CreateReferralsForMultipleAdvocates201Response as CreateReferralsForMultipleAdvocates201Response from talon_one.models.create_template_campaign import CreateTemplateCampaign as CreateTemplateCampaign @@ -968,10 +982,16 @@ from talon_one.models.experiment_list_results_request import ExperimentListResultsRequest as ExperimentListResultsRequest from talon_one.models.experiment_result import ExperimentResult as ExperimentResult from talon_one.models.experiment_results import ExperimentResults as ExperimentResults +from talon_one.models.experiment_segment_insight import ExperimentSegmentInsight as ExperimentSegmentInsight +from talon_one.models.experiment_segment_insight_metric import ExperimentSegmentInsightMetric as ExperimentSegmentInsightMetric +from talon_one.models.experiment_segment_insight_variant import ExperimentSegmentInsightVariant as ExperimentSegmentInsightVariant +from talon_one.models.experiment_segment_insights import ExperimentSegmentInsights as ExperimentSegmentInsights from talon_one.models.experiment_variant import ExperimentVariant as ExperimentVariant from talon_one.models.experiment_variant_allocation import ExperimentVariantAllocation as ExperimentVariantAllocation from talon_one.models.experiment_variant_result import ExperimentVariantResult as ExperimentVariantResult from talon_one.models.experiment_variant_result_confidence import ExperimentVariantResultConfidence as ExperimentVariantResultConfidence +from talon_one.models.experiment_verdict import ExperimentVerdict as ExperimentVerdict +from talon_one.models.experiment_verdict_response import ExperimentVerdictResponse as ExperimentVerdictResponse from talon_one.models.expiring_card_points_data import ExpiringCardPointsData as ExpiringCardPointsData from talon_one.models.expiring_card_points_notification import ExpiringCardPointsNotification as ExpiringCardPointsNotification from talon_one.models.expiring_coupons_data import ExpiringCouponsData as ExpiringCouponsData @@ -1065,6 +1085,7 @@ from talon_one.models.integration_event_v2_response import IntegrationEventV2Response as IntegrationEventV2Response from talon_one.models.integration_event_v3_request import IntegrationEventV3Request as IntegrationEventV3Request from talon_one.models.integration_event_v3_response import IntegrationEventV3Response as IntegrationEventV3Response +from talon_one.models.integration_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response as IntegrationGetAllCampaigns200Response from talon_one.models.integration_hub_config import IntegrationHubConfig as IntegrationHubConfig from talon_one.models.integration_hub_event_payload_coupon_based_notifications import IntegrationHubEventPayloadCouponBasedNotifications as IntegrationHubEventPayloadCouponBasedNotifications from talon_one.models.integration_hub_event_payload_coupon_based_notifications_limits import IntegrationHubEventPayloadCouponBasedNotificationsLimits as IntegrationHubEventPayloadCouponBasedNotificationsLimits @@ -1102,6 +1123,7 @@ from talon_one.models.list_account_collections200_response import ListAccountCollections200Response as ListAccountCollections200Response from talon_one.models.list_achievements200_response import ListAchievements200Response as ListAchievements200Response from talon_one.models.list_all_roles_v2200_response import ListAllRolesV2200Response as ListAllRolesV2200Response +from talon_one.models.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response as ListApplicationCartItemFilters200Response from talon_one.models.list_campaign_store_budget_limits200_response import ListCampaignStoreBudgetLimits200Response as ListCampaignStoreBudgetLimits200Response from talon_one.models.list_campaign_store_budgets import ListCampaignStoreBudgets as ListCampaignStoreBudgets from talon_one.models.list_campaign_store_budgets_store import ListCampaignStoreBudgetsStore as ListCampaignStoreBudgetsStore @@ -1135,6 +1157,7 @@ from talon_one.models.loyalty_program_transaction import LoyaltyProgramTransaction as LoyaltyProgramTransaction from talon_one.models.loyalty_sub_ledger import LoyaltySubLedger as LoyaltySubLedger from talon_one.models.loyalty_tier import LoyaltyTier as LoyaltyTier +from talon_one.models.mcp_key import MCPKey as MCPKey from talon_one.models.management_key import ManagementKey as ManagementKey from talon_one.models.manager_config import ManagerConfig as ManagerConfig from talon_one.models.message_log_entries import MessageLogEntries as MessageLogEntries @@ -1197,6 +1220,7 @@ from talon_one.models.new_invite_email import NewInviteEmail as NewInviteEmail from talon_one.models.new_loyalty_program import NewLoyaltyProgram as NewLoyaltyProgram from talon_one.models.new_loyalty_tier import NewLoyaltyTier as NewLoyaltyTier +from talon_one.models.new_mcp_key import NewMCPKey as NewMCPKey from talon_one.models.new_management_key import NewManagementKey as NewManagementKey from talon_one.models.new_message_test import NewMessageTest as NewMessageTest from talon_one.models.new_multiple_audiences_item import NewMultipleAudiencesItem as NewMultipleAudiencesItem @@ -1211,6 +1235,7 @@ from talon_one.models.new_referrals_for_multiple_advocates import NewReferralsForMultipleAdvocates as NewReferralsForMultipleAdvocates 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_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 @@ -1278,6 +1303,7 @@ from talon_one.models.revision_activation import RevisionActivation as RevisionActivation 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.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 diff --git a/talon_one/api/integration_api.py b/talon_one/api/integration_api.py index 915cc5d..b838003 100644 --- a/talon_one/api/integration_api.py +++ b/talon_one/api/integration_api.py @@ -45,6 +45,7 @@ from talon_one.models.integration_customer_session_response import IntegrationCustomerSessionResponse from talon_one.models.integration_event_v2_request import IntegrationEventV2Request from talon_one.models.integration_event_v2_response import IntegrationEventV2Response +from talon_one.models.integration_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response from talon_one.models.integration_request import IntegrationRequest from talon_one.models.integration_state_v2 import IntegrationStateV2 from talon_one.models.loyalty_balances_with_tiers import LoyaltyBalancesWithTiers @@ -7614,6 +7615,417 @@ def _get_reserved_customers_serialize( + @validate_call + def integration_get_all_campaigns( + self, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + campaign_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. ")] = None, + start_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + start_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IntegrationGetAllCampaigns200Response: + """List all running campaigns + + Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param campaign_ids: Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. + :type campaign_ids: List[str] + :param start_after: Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_after: datetime + :param start_before: Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_before: datetime + :param end_after: Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_after: datetime + :param end_before: Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_before: datetime + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._integration_get_all_campaigns_serialize( + page_size=page_size, + skip=skip, + campaign_ids=campaign_ids, + start_after=start_after, + start_before=start_before, + end_after=end_after, + end_before=end_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntegrationGetAllCampaigns200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def integration_get_all_campaigns_with_http_info( + self, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + campaign_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. ")] = None, + start_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + start_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IntegrationGetAllCampaigns200Response]: + """List all running campaigns + + Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param campaign_ids: Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. + :type campaign_ids: List[str] + :param start_after: Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_after: datetime + :param start_before: Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_before: datetime + :param end_after: Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_after: datetime + :param end_before: Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_before: datetime + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._integration_get_all_campaigns_serialize( + page_size=page_size, + skip=skip, + campaign_ids=campaign_ids, + start_after=start_after, + start_before=start_before, + end_after=end_after, + end_before=end_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntegrationGetAllCampaigns200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def integration_get_all_campaigns_without_preload_content( + self, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + campaign_ids: Annotated[Optional[List[StrictStr]], Field(description="Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. ")] = None, + start_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + start_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_after: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + end_before: Annotated[Optional[datetime], Field(description="Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all running campaigns + + Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param campaign_ids: Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. + :type campaign_ids: List[str] + :param start_after: Filter results to only include campaigns that start on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_after: datetime + :param start_before: Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type start_before: datetime + :param end_after: Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_after: datetime + :param end_before: Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. + :type end_before: datetime + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._integration_get_all_campaigns_serialize( + page_size=page_size, + skip=skip, + campaign_ids=campaign_ids, + start_after=start_after, + start_before=start_before, + end_after=end_after, + end_before=end_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntegrationGetAllCampaigns200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _integration_get_all_campaigns_serialize( + self, + page_size, + skip, + campaign_ids, + start_after, + start_before, + end_after, + end_before, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'campaignIds': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if skip is not None: + + _query_params.append(('skip', skip)) + + if campaign_ids is not None: + + _query_params.append(('campaignIds', campaign_ids)) + + if start_after is not None: + if isinstance(start_after, datetime): + _query_params.append( + ( + 'startAfter', + start_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startAfter', start_after)) + + if start_before is not None: + if isinstance(start_before, datetime): + _query_params.append( + ( + 'startBefore', + start_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startBefore', start_before)) + + if end_after is not None: + if isinstance(end_after, datetime): + _query_params.append( + ( + 'endAfter', + end_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endAfter', end_after)) + + if end_before is not None: + if isinstance(end_before, datetime): + _query_params.append( + ( + 'endBefore', + end_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endBefore', end_before)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key_v1' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/integration/campaigns', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def link_loyalty_card_to_profile( self, @@ -8200,6 +8612,7 @@ def return_cart_items( customer_session_id: Annotated[StrictStr, Field(description="The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. ")], return_integration_request: Annotated[ReturnIntegrationRequest, Field(description="body")], dry: Annotated[Optional[StrictBool], Field(description="Indicates whether to persist the changes. Changes are ignored when `dry=true`. ")] = None, + run_rule_engine: Annotated[Optional[StrictBool], Field(description="When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8223,6 +8636,8 @@ def return_cart_items( :type return_integration_request: ReturnIntegrationRequest :param dry: Indicates whether to persist the changes. Changes are ignored when `dry=true`. :type dry: bool + :param run_rule_engine: When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. + :type run_rule_engine: bool :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 @@ -8249,6 +8664,7 @@ def return_cart_items( customer_session_id=customer_session_id, return_integration_request=return_integration_request, dry=dry, + run_rule_engine=run_rule_engine, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8277,6 +8693,7 @@ def return_cart_items_with_http_info( customer_session_id: Annotated[StrictStr, Field(description="The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. ")], return_integration_request: Annotated[ReturnIntegrationRequest, Field(description="body")], dry: Annotated[Optional[StrictBool], Field(description="Indicates whether to persist the changes. Changes are ignored when `dry=true`. ")] = None, + run_rule_engine: Annotated[Optional[StrictBool], Field(description="When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8300,6 +8717,8 @@ def return_cart_items_with_http_info( :type return_integration_request: ReturnIntegrationRequest :param dry: Indicates whether to persist the changes. Changes are ignored when `dry=true`. :type dry: bool + :param run_rule_engine: When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. + :type run_rule_engine: bool :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 @@ -8326,6 +8745,7 @@ def return_cart_items_with_http_info( customer_session_id=customer_session_id, return_integration_request=return_integration_request, dry=dry, + run_rule_engine=run_rule_engine, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8354,6 +8774,7 @@ def return_cart_items_without_preload_content( customer_session_id: Annotated[StrictStr, Field(description="The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. ")], return_integration_request: Annotated[ReturnIntegrationRequest, Field(description="body")], dry: Annotated[Optional[StrictBool], Field(description="Indicates whether to persist the changes. Changes are ignored when `dry=true`. ")] = None, + run_rule_engine: Annotated[Optional[StrictBool], Field(description="When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8377,6 +8798,8 @@ def return_cart_items_without_preload_content( :type return_integration_request: ReturnIntegrationRequest :param dry: Indicates whether to persist the changes. Changes are ignored when `dry=true`. :type dry: bool + :param run_rule_engine: When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. + :type run_rule_engine: bool :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 @@ -8403,6 +8826,7 @@ def return_cart_items_without_preload_content( customer_session_id=customer_session_id, return_integration_request=return_integration_request, dry=dry, + run_rule_engine=run_rule_engine, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8426,6 +8850,7 @@ def _return_cart_items_serialize( customer_session_id, return_integration_request, dry, + run_rule_engine, _request_auth, _content_type, _headers, @@ -8454,6 +8879,10 @@ def _return_cart_items_serialize( _query_params.append(('dry', dry)) + if run_rule_engine is not None: + + _query_params.append(('runRuleEngine', run_rule_engine)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/talon_one/api/management_api.py b/talon_one/api/management_api.py index 54dd33e..4a528b3 100644 --- a/talon_one/api/management_api.py +++ b/talon_one/api/management_api.py @@ -27,6 +27,7 @@ from talon_one.models.add_loyalty_points import AddLoyaltyPoints from talon_one.models.application import Application from talon_one.models.application_api_health import ApplicationApiHealth +from talon_one.models.application_cif_expression import ApplicationCIFExpression from talon_one.models.application_customer import ApplicationCustomer from talon_one.models.application_session import ApplicationSession from talon_one.models.async_coupon_creation_response import AsyncCouponCreationResponse @@ -90,6 +91,7 @@ from talon_one.models.list_account_collections200_response import ListAccountCollections200Response from talon_one.models.list_achievements200_response import ListAchievements200Response from talon_one.models.list_all_roles_v2200_response import ListAllRolesV2200Response +from talon_one.models.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response from talon_one.models.list_campaign_store_budget_limits200_response import ListCampaignStoreBudgetLimits200Response from talon_one.models.list_catalog_items200_response import ListCatalogItems200Response from talon_one.models.list_experiments200_response import ListExperiments200Response @@ -4036,7 +4038,7 @@ def _create_coupons_serialize( @validate_call - def create_coupons_async( + def create_coupons_asynchronously( 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.")], @@ -4086,7 +4088,7 @@ def create_coupons_async( :return: Returns the result object. """ # noqa: E501 - _param = self._create_coupons_async_serialize( + _param = self._create_coupons_asynchronously_serialize( application_id=application_id, campaign_id=campaign_id, new_coupon_creation_job=new_coupon_creation_job, @@ -4111,7 +4113,7 @@ def create_coupons_async( @validate_call - def create_coupons_async_with_http_info( + def create_coupons_asynchronously_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.")], @@ -4161,7 +4163,7 @@ def create_coupons_async_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_coupons_async_serialize( + _param = self._create_coupons_asynchronously_serialize( application_id=application_id, campaign_id=campaign_id, new_coupon_creation_job=new_coupon_creation_job, @@ -4186,7 +4188,7 @@ def create_coupons_async_with_http_info( @validate_call - def create_coupons_async_without_preload_content( + def create_coupons_asynchronously_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.")], @@ -4236,7 +4238,7 @@ def create_coupons_async_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_coupons_async_serialize( + _param = self._create_coupons_asynchronously_serialize( application_id=application_id, campaign_id=campaign_id, new_coupon_creation_job=new_coupon_creation_job, @@ -4256,7 +4258,7 @@ def create_coupons_async_without_preload_content( return response_data.response - def _create_coupons_async_serialize( + def _create_coupons_asynchronously_serialize( self, application_id, campaign_id, @@ -12865,6 +12867,307 @@ def _export_campaign_stores_serialize( + @validate_call + def export_campaign_value_map( + 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.")], + value_map_id: Annotated[StrictInt, Field(description="The ID of the value map. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Export campaign value map + + Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 value_map_id: The ID of the value map. (required) + :type value_map_id: int + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_campaign_value_map_serialize( + application_id=application_id, + campaign_id=campaign_id, + value_map_id=value_map_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_campaign_value_map_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.")], + value_map_id: Annotated[StrictInt, Field(description="The ID of the value map. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Export campaign value map + + Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 value_map_id: The ID of the value map. (required) + :type value_map_id: int + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_campaign_value_map_serialize( + application_id=application_id, + campaign_id=campaign_id, + value_map_id=value_map_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def export_campaign_value_map_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.")], + value_map_id: Annotated[StrictInt, Field(description="The ID of the value map. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Export campaign value map + + Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 value_map_id: The ID of the value map. (required) + :type value_map_id: int + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_campaign_value_map_serialize( + application_id=application_id, + campaign_id=campaign_id, + value_map_id=value_map_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_campaign_value_map_serialize( + self, + application_id, + campaign_id, + value_map_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['applicationId'] = application_id + if campaign_id is not None: + _path_params['campaignId'] = campaign_id + if value_map_id is not None: + _path_params['valueMapId'] = value_map_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/csv', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key_v1' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def export_collection_items( self, @@ -19988,7 +20291,7 @@ def get_application( ) -> Application: """Get Application - Get the application specified by the ID. + Get the Application specified by the ID. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int @@ -20055,7 +20358,7 @@ def get_application_with_http_info( ) -> ApiResponse[Application]: """Get Application - Get the application specified by the ID. + Get the Application specified by the ID. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int @@ -20122,7 +20425,7 @@ def get_application_without_preload_content( ) -> RESTResponseType: """Get Application - Get the application specified by the ID. + Get the Application specified by the ID. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int @@ -20492,10 +20795,11 @@ def _get_application_api_health_serialize( @validate_call - def get_application_customer( + def get_application_cart_item_filter_expression( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], + cart_item_filter_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint.")], + expression_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter expression.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20508,15 +20812,17 @@ def get_application_customer( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApplicationCustomer: - """Get application's customer + ) -> ApplicationCIFExpression: + """Get Application cart item filter expression - Retrieve the customers of the specified application. + Get an Application cart item filter expression for a specific Application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) - :type customer_id: int + :param cart_item_filter_id: The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + :type cart_item_filter_id: int + :param expression_id: The ID of the Application cart item filter expression. (required) + :type expression_id: int :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 @@ -20539,9 +20845,10 @@ def get_application_customer( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_serialize( + _param = self._get_application_cart_item_filter_expression_serialize( application_id=application_id, - customer_id=customer_id, + cart_item_filter_id=cart_item_filter_id, + expression_id=expression_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20549,7 +20856,7 @@ def get_application_customer( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationCustomer", + '200': "ApplicationCIFExpression", } response_data = self.api_client.call_api( *_param, @@ -20563,10 +20870,11 @@ def get_application_customer( @validate_call - def get_application_customer_with_http_info( + def get_application_cart_item_filter_expression_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], + cart_item_filter_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint.")], + expression_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter expression.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20579,15 +20887,17 @@ def get_application_customer_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApplicationCustomer]: - """Get application's customer + ) -> ApiResponse[ApplicationCIFExpression]: + """Get Application cart item filter expression - Retrieve the customers of the specified application. + Get an Application cart item filter expression for a specific Application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) - :type customer_id: int + :param cart_item_filter_id: The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + :type cart_item_filter_id: int + :param expression_id: The ID of the Application cart item filter expression. (required) + :type expression_id: int :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 @@ -20610,9 +20920,10 @@ def get_application_customer_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_serialize( + _param = self._get_application_cart_item_filter_expression_serialize( application_id=application_id, - customer_id=customer_id, + cart_item_filter_id=cart_item_filter_id, + expression_id=expression_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20620,7 +20931,7 @@ def get_application_customer_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationCustomer", + '200': "ApplicationCIFExpression", } response_data = self.api_client.call_api( *_param, @@ -20634,10 +20945,11 @@ def get_application_customer_with_http_info( @validate_call - def get_application_customer_without_preload_content( + def get_application_cart_item_filter_expression_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], + cart_item_filter_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint.")], + expression_id: Annotated[StrictInt, Field(description="The ID of the Application cart item filter expression.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20651,14 +20963,16 @@ def get_application_customer_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get application's customer + """Get Application cart item filter expression - Retrieve the customers of the specified application. + Get an Application cart item filter expression for a specific Application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) - :type customer_id: int + :param cart_item_filter_id: The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + :type cart_item_filter_id: int + :param expression_id: The ID of the Application cart item filter expression. (required) + :type expression_id: int :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 @@ -20681,9 +20995,10 @@ def get_application_customer_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_serialize( + _param = self._get_application_cart_item_filter_expression_serialize( application_id=application_id, - customer_id=customer_id, + cart_item_filter_id=cart_item_filter_id, + expression_id=expression_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20691,7 +21006,7 @@ def get_application_customer_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationCustomer", + '200': "ApplicationCIFExpression", } response_data = self.api_client.call_api( *_param, @@ -20700,10 +21015,11 @@ def get_application_customer_without_preload_content( return response_data.response - def _get_application_customer_serialize( + def _get_application_cart_item_filter_expression_serialize( self, application_id, - customer_id, + cart_item_filter_id, + expression_id, _request_auth, _content_type, _headers, @@ -20727,8 +21043,10 @@ def _get_application_customer_serialize( # process the path parameters if application_id is not None: _path_params['applicationId'] = application_id - if customer_id is not None: - _path_params['customerId'] = customer_id + if cart_item_filter_id is not None: + _path_params['cartItemFilterId'] = cart_item_filter_id + if expression_id is not None: + _path_params['expressionId'] = expression_id # process the query parameters # process the header parameters # process the form parameters @@ -20751,7 +21069,7 @@ def _get_application_customer_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/applications/{applicationId}/customers/{customerId}', + resource_path='/v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -20768,14 +21086,10 @@ def _get_application_customer_serialize( @validate_call - def get_application_customer_friends( + def get_application_customer( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20788,23 +21102,15 @@ def get_application_customer_friends( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetApplicationCustomerFriends200Response: - """List friends referred by customer profile + ) -> ApplicationCustomer: + """Get application's customer - List the friends referred by the specified customer profile in this Application. + Retrieve the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param integration_id: The Integration ID of the Advocate's Profile. (required) - :type integration_id: str - :param page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool + :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + :type customer_id: int :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 @@ -20827,13 +21133,9 @@ def get_application_customer_friends( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_friends_serialize( + _param = self._get_application_customer_serialize( application_id=application_id, - integration_id=integration_id, - page_size=page_size, - skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, + customer_id=customer_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20841,7 +21143,7 @@ def get_application_customer_friends( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomerFriends200Response", + '200': "ApplicationCustomer", } response_data = self.api_client.call_api( *_param, @@ -20855,14 +21157,10 @@ def get_application_customer_friends( @validate_call - def get_application_customer_friends_with_http_info( + def get_application_customer_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20875,23 +21173,15 @@ def get_application_customer_friends_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetApplicationCustomerFriends200Response]: - """List friends referred by customer profile + ) -> ApiResponse[ApplicationCustomer]: + """Get application's customer - List the friends referred by the specified customer profile in this Application. + Retrieve the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param integration_id: The Integration ID of the Advocate's Profile. (required) - :type integration_id: str - :param page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool + :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + :type customer_id: int :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 @@ -20914,13 +21204,9 @@ def get_application_customer_friends_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_friends_serialize( + _param = self._get_application_customer_serialize( application_id=application_id, - integration_id=integration_id, - page_size=page_size, - skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, + customer_id=customer_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20928,7 +21214,7 @@ def get_application_customer_friends_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomerFriends200Response", + '200': "ApplicationCustomer", } response_data = self.api_client.call_api( *_param, @@ -20942,14 +21228,10 @@ def get_application_customer_friends_with_http_info( @validate_call - def get_application_customer_friends_without_preload_content( + def get_application_customer_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + customer_id: Annotated[StrictInt, Field(description="The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20963,22 +21245,14 @@ def get_application_customer_friends_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List friends referred by customer profile + """Get application's customer - List the friends referred by the specified customer profile in this Application. + Retrieve the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param integration_id: The Integration ID of the Advocate's Profile. (required) - :type integration_id: str - :param page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool + :param customer_id: The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + :type customer_id: int :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 @@ -21001,13 +21275,9 @@ def get_application_customer_friends_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customer_friends_serialize( + _param = self._get_application_customer_serialize( application_id=application_id, - integration_id=integration_id, - page_size=page_size, - skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, + customer_id=customer_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21015,7 +21285,7 @@ def get_application_customer_friends_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomerFriends200Response", + '200': "ApplicationCustomer", } response_data = self.api_client.call_api( *_param, @@ -21024,14 +21294,10 @@ def get_application_customer_friends_without_preload_content( return response_data.response - def _get_application_customer_friends_serialize( + def _get_application_customer_serialize( self, application_id, - integration_id, - page_size, - skip, - sort, - with_total_result_size, + customer_id, _request_auth, _content_type, _headers, @@ -21055,25 +21321,9 @@ def _get_application_customer_friends_serialize( # process the path parameters if application_id is not None: _path_params['applicationId'] = application_id - if integration_id is not None: - _path_params['integrationId'] = integration_id + if customer_id is not None: + _path_params['customerId'] = customer_id # process the query parameters - if page_size is not None: - - _query_params.append(('pageSize', page_size)) - - if skip is not None: - - _query_params.append(('skip', skip)) - - if sort is not None: - - _query_params.append(('sort', sort)) - - if with_total_result_size is not None: - - _query_params.append(('withTotalResultSize', with_total_result_size)) - # process the header parameters # process the form parameters # process the body parameter @@ -21095,7 +21345,7 @@ def _get_application_customer_friends_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/applications/{applicationId}/profile/{integrationId}/friends', + resource_path='/v1/applications/{applicationId}/customers/{customerId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21112,96 +21362,14 @@ def _get_application_customer_friends_serialize( @validate_call - def get_application_customers( - self, - application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetApplicationCustomers200Response: - """List application's customers - - List all the customers of the specified application. - - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :type application_id: int - :param integration_id: Filter results performing an exact matching against the profile integration identifier. - :type integration_id: str - :param page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool - :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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_application_customers_serialize( - application_id=application_id, - integration_id=integration_id, - page_size=page_size, - skip=skip, - with_total_result_size=with_total_result_size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomers200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_application_customers_with_http_info( + def get_application_customer_friends( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, + integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21214,20 +21382,22 @@ def get_application_customers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetApplicationCustomers200Response]: - """List application's customers + ) -> GetApplicationCustomerFriends200Response: + """List friends referred by customer profile - List all the customers of the specified application. + List the friends referred by the specified customer profile in this Application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param integration_id: Filter results performing an exact matching against the profile integration identifier. + :param integration_id: The Integration ID of the Advocate's Profile. (required) :type integration_id: str :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -21251,11 +21421,12 @@ def get_application_customers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customers_serialize( + _param = self._get_application_customer_friends_serialize( application_id=application_id, integration_id=integration_id, page_size=page_size, skip=skip, + sort=sort, with_total_result_size=with_total_result_size, _request_auth=_request_auth, _content_type=_content_type, @@ -21264,7 +21435,94 @@ def get_application_customers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomers200Response", + '200': "GetApplicationCustomerFriends200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_application_customer_friends_with_http_info( + self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetApplicationCustomerFriends200Response]: + """List friends referred by customer profile + + List the friends referred by the specified customer profile in this Application. + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param integration_id: The Integration ID of the Advocate's Profile. (required) + :type integration_id: str + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_customer_friends_serialize( + application_id=application_id, + integration_id=integration_id, + page_size=page_size, + skip=skip, + sort=sort, + with_total_result_size=with_total_result_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetApplicationCustomerFriends200Response", } response_data = self.api_client.call_api( *_param, @@ -21278,13 +21536,14 @@ def get_application_customers_with_http_info( @validate_call - def get_application_customers_without_preload_content( + def get_application_customer_friends_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, + integration_id: Annotated[StrictStr, Field(description="The Integration ID of the Advocate's Profile.")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21298,19 +21557,21 @@ def get_application_customers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List application's customers + """List friends referred by customer profile - List all the customers of the specified application. + List the friends referred by the specified customer profile in this Application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param integration_id: Filter results performing an exact matching against the profile integration identifier. + :param integration_id: The Integration ID of the Advocate's Profile. (required) :type integration_id: str :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -21334,11 +21595,12 @@ def get_application_customers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customers_serialize( + _param = self._get_application_customer_friends_serialize( application_id=application_id, integration_id=integration_id, page_size=page_size, skip=skip, + sort=sort, with_total_result_size=with_total_result_size, _request_auth=_request_auth, _content_type=_content_type, @@ -21347,7 +21609,7 @@ def get_application_customers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomers200Response", + '200': "GetApplicationCustomerFriends200Response", } response_data = self.api_client.call_api( *_param, @@ -21356,12 +21618,13 @@ def get_application_customers_without_preload_content( return response_data.response - def _get_application_customers_serialize( + def _get_application_customer_friends_serialize( self, application_id, integration_id, page_size, skip, + sort, with_total_result_size, _request_auth, _content_type, @@ -21386,11 +21649,9 @@ def _get_application_customers_serialize( # process the path parameters if application_id is not None: _path_params['applicationId'] = application_id - # process the query parameters if integration_id is not None: - - _query_params.append(('integrationId', integration_id)) - + _path_params['integrationId'] = integration_id + # process the query parameters if page_size is not None: _query_params.append(('pageSize', page_size)) @@ -21399,6 +21660,10 @@ def _get_application_customers_serialize( _query_params.append(('skip', skip)) + if sort is not None: + + _query_params.append(('sort', sort)) + if with_total_result_size is not None: _query_params.append(('withTotalResultSize', with_total_result_size)) @@ -21424,7 +21689,7 @@ def _get_application_customers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/applications/{applicationId}/customers', + resource_path='/v1/applications/{applicationId}/profile/{integrationId}/friends', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21441,13 +21706,13 @@ def _get_application_customers_serialize( @validate_call - def get_application_customers_by_attributes( + def get_application_customers( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], + integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21460,20 +21725,20 @@ def get_application_customers_by_attributes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetApplicationCustomersByAttributes200Response: - """List application customers matching the given attributes + ) -> GetApplicationCustomers200Response: + """List application's customers - Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. + List all the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_profile_search_query: body (required) - :type customer_profile_search_query: CustomerProfileSearchQuery + :param integration_id: Filter results performing an exact matching against the profile integration identifier. + :type integration_id: str :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -21497,9 +21762,9 @@ def get_application_customers_by_attributes( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customers_by_attributes_serialize( + _param = self._get_application_customers_serialize( application_id=application_id, - customer_profile_search_query=customer_profile_search_query, + integration_id=integration_id, page_size=page_size, skip=skip, with_total_result_size=with_total_result_size, @@ -21510,7 +21775,7 @@ def get_application_customers_by_attributes( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomersByAttributes200Response", + '200': "GetApplicationCustomers200Response", } response_data = self.api_client.call_api( *_param, @@ -21524,13 +21789,13 @@ def get_application_customers_by_attributes( @validate_call - def get_application_customers_by_attributes_with_http_info( + def get_application_customers_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], + integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21543,20 +21808,20 @@ def get_application_customers_by_attributes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetApplicationCustomersByAttributes200Response]: - """List application customers matching the given attributes + ) -> ApiResponse[GetApplicationCustomers200Response]: + """List application's customers - Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. + List all the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_profile_search_query: body (required) - :type customer_profile_search_query: CustomerProfileSearchQuery + :param integration_id: Filter results performing an exact matching against the profile integration identifier. + :type integration_id: str :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -21580,9 +21845,9 @@ def get_application_customers_by_attributes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customers_by_attributes_serialize( + _param = self._get_application_customers_serialize( application_id=application_id, - customer_profile_search_query=customer_profile_search_query, + integration_id=integration_id, page_size=page_size, skip=skip, with_total_result_size=with_total_result_size, @@ -21593,7 +21858,7 @@ def get_application_customers_by_attributes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomersByAttributes200Response", + '200': "GetApplicationCustomers200Response", } response_data = self.api_client.call_api( *_param, @@ -21607,13 +21872,13 @@ def get_application_customers_by_attributes_with_http_info( @validate_call - def get_application_customers_by_attributes_without_preload_content( + def get_application_customers_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], - customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], + integration_id: Annotated[Optional[StrictStr], Field(description="Filter results performing an exact matching against the profile integration identifier.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21627,19 +21892,19 @@ def get_application_customers_by_attributes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List application customers matching the given attributes + """List application's customers - Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. + List all the customers of the specified application. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int - :param customer_profile_search_query: body (required) - :type customer_profile_search_query: CustomerProfileSearchQuery + :param integration_id: Filter results performing an exact matching against the profile integration identifier. + :type integration_id: str :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -21663,9 +21928,9 @@ def get_application_customers_by_attributes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_customers_by_attributes_serialize( + _param = self._get_application_customers_serialize( application_id=application_id, - customer_profile_search_query=customer_profile_search_query, + integration_id=integration_id, page_size=page_size, skip=skip, with_total_result_size=with_total_result_size, @@ -21676,7 +21941,7 @@ def get_application_customers_by_attributes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationCustomersByAttributes200Response", + '200': "GetApplicationCustomers200Response", } response_data = self.api_client.call_api( *_param, @@ -21685,10 +21950,10 @@ def get_application_customers_by_attributes_without_preload_content( return response_data.response - def _get_application_customers_by_attributes_serialize( + def _get_application_customers_serialize( self, application_id, - customer_profile_search_query, + integration_id, page_size, skip, with_total_result_size, @@ -21716,6 +21981,10 @@ def _get_application_customers_by_attributes_serialize( if application_id is not None: _path_params['applicationId'] = application_id # process the query parameters + if integration_id is not None: + + _query_params.append(('integrationId', integration_id)) + if page_size is not None: _query_params.append(('pageSize', page_size)) @@ -21731,8 +22000,6 @@ def _get_application_customers_by_attributes_serialize( # process the header parameters # process the form parameters # process the body parameter - if customer_profile_search_query is not None: - _body_params = customer_profile_search_query # set the HTTP header `Accept` @@ -21743,19 +22010,6 @@ def _get_application_customers_by_attributes_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -21763,8 +22017,8 @@ def _get_application_customers_by_attributes_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/applications/{applicationId}/customer_search', + method='GET', + resource_path='/v1/applications/{applicationId}/customers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21781,12 +22035,13 @@ def _get_application_customers_by_attributes_serialize( @validate_call - def get_application_event_types( + def get_application_customers_by_attributes( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21799,19 +22054,21 @@ def get_application_event_types( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetApplicationEventTypes200Response: - """List Applications event types + ) -> GetApplicationCustomersByAttributes200Response: + """List application customers matching the given attributes - Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int + :param customer_profile_search_query: body (required) + :type customer_profile_search_query: CustomerProfileSearchQuery :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool :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 @@ -21834,11 +22091,12 @@ def get_application_event_types( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_event_types_serialize( + _param = self._get_application_customers_by_attributes_serialize( application_id=application_id, + customer_profile_search_query=customer_profile_search_query, page_size=page_size, skip=skip, - sort=sort, + with_total_result_size=with_total_result_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21846,7 +22104,7 @@ def get_application_event_types( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationEventTypes200Response", + '200': "GetApplicationCustomersByAttributes200Response", } response_data = self.api_client.call_api( *_param, @@ -21860,12 +22118,13 @@ def get_application_event_types( @validate_call - def get_application_event_types_with_http_info( + def get_application_customers_by_attributes_with_http_info( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21878,19 +22137,21 @@ def get_application_event_types_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetApplicationEventTypes200Response]: - """List Applications event types + ) -> ApiResponse[GetApplicationCustomersByAttributes200Response]: + """List application customers matching the given attributes - Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int + :param customer_profile_search_query: body (required) + :type customer_profile_search_query: CustomerProfileSearchQuery :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool :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 @@ -21913,11 +22174,12 @@ def get_application_event_types_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_application_event_types_serialize( + _param = self._get_application_customers_by_attributes_serialize( application_id=application_id, + customer_profile_search_query=customer_profile_search_query, page_size=page_size, skip=skip, - sort=sort, + with_total_result_size=with_total_result_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21925,7 +22187,7 @@ def get_application_event_types_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetApplicationEventTypes200Response", + '200': "GetApplicationCustomersByAttributes200Response", } response_data = self.api_client.call_api( *_param, @@ -21939,12 +22201,13 @@ def get_application_event_types_with_http_info( @validate_call - def get_application_event_types_without_preload_content( + def get_application_customers_by_attributes_without_preload_content( self, application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + customer_profile_search_query: Annotated[CustomerProfileSearchQuery, Field(description="body")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21958,18 +22221,349 @@ def get_application_event_types_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Applications event types + """List application customers matching the given attributes - Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :type application_id: int + :param customer_profile_search_query: body (required) + :type customer_profile_search_query: CustomerProfileSearchQuery :param page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_customers_by_attributes_serialize( + application_id=application_id, + customer_profile_search_query=customer_profile_search_query, + page_size=page_size, + skip=skip, + with_total_result_size=with_total_result_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetApplicationCustomersByAttributes200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_customers_by_attributes_serialize( + self, + application_id, + customer_profile_search_query, + page_size, + skip, + with_total_result_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['applicationId'] = application_id + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if skip is not None: + + _query_params.append(('skip', skip)) + + if with_total_result_size is not None: + + _query_params.append(('withTotalResultSize', with_total_result_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + if customer_profile_search_query is not None: + _body_params = customer_profile_search_query + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'api_key_v1' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/applications/{applicationId}/customer_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_application_event_types( + self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetApplicationEventTypes200Response: + """List Applications event types + + Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_event_types_serialize( + application_id=application_id, + page_size=page_size, + skip=skip, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetApplicationEventTypes200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_application_event_types_with_http_info( + self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetApplicationEventTypes200Response]: + """List Applications event types + + Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_event_types_serialize( + application_id=application_id, + page_size=page_size, + skip=skip, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetApplicationEventTypes200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_application_event_types_without_preload_content( + self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Applications event types + + Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) + + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str :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 @@ -23406,7 +24000,7 @@ def get_applications( ) -> GetApplications200Response: """List Applications - List all applications in the current account. + List all the Applications in the current account. :param page_size: The number of items in the response. :type page_size: int @@ -23481,7 +24075,7 @@ def get_applications_with_http_info( ) -> ApiResponse[GetApplications200Response]: """List Applications - List all applications in the current account. + List all the Applications in the current account. :param page_size: The number of items in the response. :type page_size: int @@ -23556,7 +24150,7 @@ def get_applications_without_preload_content( ) -> RESTResponseType: """List Applications - List all applications in the current account. + List all the Applications in the current account. :param page_size: The number of items in the response. :type page_size: int @@ -24663,7 +25257,7 @@ def get_audiences( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24687,7 +25281,7 @@ def get_audiences( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -24742,7 +25336,7 @@ def get_audiences_with_http_info( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24766,7 +25360,7 @@ def get_audiences_with_http_info( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -24821,7 +25415,7 @@ def get_audiences_without_preload_content( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24845,7 +25439,7 @@ def get_audiences_without_preload_content( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -27736,7 +28330,7 @@ def get_changes( user_id: Annotated[Optional[StrictInt], Field(description="Filter results by user ID.")] = None, created_before: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, created_after: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, management_key_id: Annotated[Optional[StrictInt], Field(description="Filter results that match the given management key ID.")] = None, include_old: Annotated[Optional[StrictBool], Field(description="When this flag is set to false, the state without the change will not be returned. The default value is true.")] = None, _request_timeout: Union[ @@ -27772,7 +28366,7 @@ def get_changes( :type created_before: datetime :param created_after: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. :type created_after: datetime - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param management_key_id: Filter results that match the given management key ID. :type management_key_id: int @@ -27843,7 +28437,7 @@ def get_changes_with_http_info( user_id: Annotated[Optional[StrictInt], Field(description="Filter results by user ID.")] = None, created_before: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, created_after: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, management_key_id: Annotated[Optional[StrictInt], Field(description="Filter results that match the given management key ID.")] = None, include_old: Annotated[Optional[StrictBool], Field(description="When this flag is set to false, the state without the change will not be returned. The default value is true.")] = None, _request_timeout: Union[ @@ -27879,7 +28473,7 @@ def get_changes_with_http_info( :type created_before: datetime :param created_after: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. :type created_after: datetime - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param management_key_id: Filter results that match the given management key ID. :type management_key_id: int @@ -27950,7 +28544,7 @@ def get_changes_without_preload_content( user_id: Annotated[Optional[StrictInt], Field(description="Filter results by user ID.")] = None, created_before: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, created_after: Annotated[Optional[datetime], Field(description="Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, management_key_id: Annotated[Optional[StrictInt], Field(description="Filter results that match the given management key ID.")] = None, include_old: Annotated[Optional[StrictBool], Field(description="When this flag is set to false, the state without the change will not be returned. The default value is true.")] = None, _request_timeout: Union[ @@ -27986,7 +28580,7 @@ def get_changes_without_preload_content( :type created_before: datetime :param created_after: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. :type created_after: datetime - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param management_key_id: Filter results that match the given management key ID. :type management_key_id: int @@ -39843,8 +40437,304 @@ def import_account_collection_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_account_collection_serialize( - collection_id=collection_id, + _param = self._import_account_collection_serialize( + collection_id=collection_id, + up_file=up_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ModelImport", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import data into existing account-level collection + + Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the 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 _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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_account_collection_serialize( + collection_id=collection_id, + up_file=up_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ModelImport", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _import_account_collection_serialize( + self, + collection_id, + up_file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection_id is not None: + _path_params['collectionId'] = collection_id + # process the query parameters + # process the header parameters + # process the form parameters + if up_file is not None: + _form_params.append(('upFile', up_file)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'api_key_v1' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/collections/{collectionId}/import', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ModelImport: + """Import allowed values for attribute + + Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + + :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 _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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_allowed_list_serialize( + attribute_id=attribute_id, + up_file=up_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ModelImport", + '400': "ErrorResponse", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ModelImport]: + """Import allowed values for attribute + + Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + + :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 _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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_allowed_list_serialize( + attribute_id=attribute_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -39854,8 +40744,9 @@ def import_account_collection_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponseWithStatus", + '400': "ErrorResponse", '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -39869,9 +40760,9 @@ def import_account_collection_with_http_info( @validate_call - def import_account_collection_without_preload_content( + def import_allowed_list_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.")], + 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, _request_timeout: Union[ None, @@ -39886,12 +40777,12 @@ def import_account_collection_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import data into existing account-level collection + """Import allowed values for attribute - Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. + Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` - :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 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 _request_timeout: timeout setting for this request. If one @@ -39916,8 +40807,8 @@ def import_account_collection_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_account_collection_serialize( - collection_id=collection_id, + _param = self._import_allowed_list_serialize( + attribute_id=attribute_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -39927,8 +40818,9 @@ def import_account_collection_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponseWithStatus", + '400': "ErrorResponse", '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -39937,9 +40829,9 @@ def import_account_collection_without_preload_content( return response_data.response - def _import_account_collection_serialize( + def _import_allowed_list_serialize( self, - collection_id, + attribute_id, up_file, _request_auth, _content_type, @@ -39962,8 +40854,8 @@ def _import_account_collection_serialize( _body_params: Optional[bytes] = None # process the path parameters - if collection_id is not None: - _path_params['collectionId'] = collection_id + if attribute_id is not None: + _path_params['attributeId'] = attribute_id # process the query parameters # process the header parameters # process the form parameters @@ -40001,7 +40893,7 @@ def _import_account_collection_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/collections/{collectionId}/import', + resource_path='/v1/attributes/{attributeId}/allowed_list/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -40018,9 +40910,9 @@ def _import_account_collection_serialize( @validate_call - def import_allowed_list( + def import_audiences_memberships( 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**.")], + 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, _request_timeout: Union[ None, @@ -40035,12 +40927,12 @@ def import_allowed_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import allowed values for attribute + """Import audience members - Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` - :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 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 _request_timeout: timeout setting for this request. If one @@ -40065,8 +40957,8 @@ def import_allowed_list( :return: Returns the result object. """ # noqa: E501 - _param = self._import_allowed_list_serialize( - attribute_id=attribute_id, + _param = self._import_audiences_memberships_serialize( + audience_id=audience_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40092,9 +40984,9 @@ def import_allowed_list( @validate_call - def import_allowed_list_with_http_info( + def import_audiences_memberships_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**.")], + 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, _request_timeout: Union[ None, @@ -40109,12 +41001,12 @@ def import_allowed_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import allowed values for attribute + """Import audience members - Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` - :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 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 _request_timeout: timeout setting for this request. If one @@ -40139,8 +41031,8 @@ def import_allowed_list_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_allowed_list_serialize( - attribute_id=attribute_id, + _param = self._import_audiences_memberships_serialize( + audience_id=audience_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40166,9 +41058,9 @@ def import_allowed_list_with_http_info( @validate_call - def import_allowed_list_without_preload_content( + def import_audiences_memberships_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**.")], + 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, _request_timeout: Union[ None, @@ -40183,12 +41075,12 @@ def import_allowed_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import allowed values for attribute + """Import audience members - Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` - :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 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 _request_timeout: timeout setting for this request. If one @@ -40213,8 +41105,8 @@ def import_allowed_list_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_allowed_list_serialize( - attribute_id=attribute_id, + _param = self._import_audiences_memberships_serialize( + audience_id=audience_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40235,9 +41127,9 @@ def import_allowed_list_without_preload_content( return response_data.response - def _import_allowed_list_serialize( + def _import_audiences_memberships_serialize( self, - attribute_id, + audience_id, up_file, _request_auth, _content_type, @@ -40260,8 +41152,8 @@ def _import_allowed_list_serialize( _body_params: Optional[bytes] = None # process the path parameters - if attribute_id is not None: - _path_params['attributeId'] = attribute_id + if audience_id is not None: + _path_params['audienceId'] = audience_id # process the query parameters # process the header parameters # process the form parameters @@ -40299,7 +41191,7 @@ def _import_allowed_list_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/attributes/{attributeId}/allowed_list/import', + resource_path='/v1/audiences/{audienceId}/memberships/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -40316,9 +41208,12 @@ def _import_allowed_list_serialize( @validate_call - def import_audiences_memberships( + def import_campaign_store_budget( self, - audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], + 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.")], + 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, _request_timeout: Union[ None, @@ -40333,12 +41228,18 @@ def import_audiences_memberships( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import audience members + """Import campaign store budgets - Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` + Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. - :param audience_id: The ID of the audience. (required) - :type audience_id: int + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 action: The action that this budget is limiting. + :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 _request_timeout: timeout setting for this request. If one @@ -40363,8 +41264,11 @@ def import_audiences_memberships( :return: Returns the result object. """ # noqa: E501 - _param = self._import_audiences_memberships_serialize( - audience_id=audience_id, + _param = self._import_campaign_store_budget_serialize( + application_id=application_id, + campaign_id=campaign_id, + action=action, + period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40373,10 +41277,8 @@ def import_audiences_memberships( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '201': "ModelImport", '400': "ErrorResponse", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40390,9 +41292,12 @@ def import_audiences_memberships( @validate_call - def import_audiences_memberships_with_http_info( + def import_campaign_store_budget_with_http_info( self, - audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], + 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.")], + 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, _request_timeout: Union[ None, @@ -40407,12 +41312,18 @@ def import_audiences_memberships_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import audience members + """Import campaign store budgets - Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` + Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. - :param audience_id: The ID of the audience. (required) - :type audience_id: int + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 action: The action that this budget is limiting. + :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 _request_timeout: timeout setting for this request. If one @@ -40437,8 +41348,11 @@ def import_audiences_memberships_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_audiences_memberships_serialize( - audience_id=audience_id, + _param = self._import_campaign_store_budget_serialize( + application_id=application_id, + campaign_id=campaign_id, + action=action, + period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40447,10 +41361,8 @@ def import_audiences_memberships_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '201': "ModelImport", '400': "ErrorResponse", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40464,9 +41376,12 @@ def import_audiences_memberships_with_http_info( @validate_call - def import_audiences_memberships_without_preload_content( + def import_campaign_store_budget_without_preload_content( self, - audience_id: Annotated[StrictInt, Field(description="The ID of the audience.")], + 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.")], + 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, _request_timeout: Union[ None, @@ -40481,12 +41396,18 @@ def import_audiences_memberships_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import audience members + """Import campaign store budgets - Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - `profileintegrationid`: The integration ID of the customer profile. The import **replaces** the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text profileintegrationid charles alexa ``` + Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. - :param audience_id: The ID of the audience. (required) - :type audience_id: int + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 action: The action that this budget is limiting. + :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 _request_timeout: timeout setting for this request. If one @@ -40511,8 +41432,11 @@ def import_audiences_memberships_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_audiences_memberships_serialize( - audience_id=audience_id, + _param = self._import_campaign_store_budget_serialize( + application_id=application_id, + campaign_id=campaign_id, + action=action, + period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40521,10 +41445,8 @@ def import_audiences_memberships_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '201': "ModelImport", '400': "ErrorResponse", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40533,9 +41455,12 @@ def import_audiences_memberships_without_preload_content( return response_data.response - def _import_audiences_memberships_serialize( + def _import_campaign_store_budget_serialize( self, - audience_id, + application_id, + campaign_id, + action, + period, up_file, _request_auth, _content_type, @@ -40558,9 +41483,19 @@ def _import_audiences_memberships_serialize( _body_params: Optional[bytes] = None # process the path parameters - if audience_id is not None: - _path_params['audienceId'] = audience_id + if application_id is not None: + _path_params['applicationId'] = application_id + if campaign_id is not None: + _path_params['campaignId'] = campaign_id # process the query parameters + if action is not None: + + _query_params.append(('action', action)) + + if period is not None: + + _query_params.append(('period', period)) + # process the header parameters # process the form parameters if up_file is not None: @@ -40597,7 +41532,7 @@ def _import_audiences_memberships_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/audiences/{audienceId}/memberships/import', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -40614,12 +41549,10 @@ def _import_audiences_memberships_serialize( @validate_call - def import_campaign_store_budget( + 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.")], - 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, _request_timeout: Union[ None, @@ -40634,18 +41567,14 @@ def import_campaign_store_budget( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import campaign store budgets + """Import stores - Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. + Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 action: The action that this budget is limiting. - :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 _request_timeout: timeout setting for this request. If one @@ -40670,11 +41599,9 @@ def import_campaign_store_budget( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_store_budget_serialize( + _param = self._import_campaign_stores_serialize( application_id=application_id, campaign_id=campaign_id, - action=action, - period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40683,8 +41610,10 @@ def import_campaign_store_budget( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ModelImport", + '200': "ModelImport", '400': "ErrorResponse", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40698,12 +41627,10 @@ def import_campaign_store_budget( @validate_call - def import_campaign_store_budget_with_http_info( + 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.")], - 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, _request_timeout: Union[ None, @@ -40718,18 +41645,14 @@ def import_campaign_store_budget_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import campaign store budgets + """Import stores - Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. + Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 action: The action that this budget is limiting. - :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 _request_timeout: timeout setting for this request. If one @@ -40754,11 +41677,9 @@ def import_campaign_store_budget_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_store_budget_serialize( + _param = self._import_campaign_stores_serialize( application_id=application_id, campaign_id=campaign_id, - action=action, - period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40767,8 +41688,10 @@ def import_campaign_store_budget_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ModelImport", + '200': "ModelImport", '400': "ErrorResponse", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40782,12 +41705,10 @@ def import_campaign_store_budget_with_http_info( @validate_call - def import_campaign_store_budget_without_preload_content( + 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.")], - 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, _request_timeout: Union[ None, @@ -40802,18 +41723,14 @@ def import_campaign_store_budget_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import campaign store budgets + """Import stores - Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file **must** only contain the following columns: - `store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import **replaces** the previous list of store budgets. + Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 action: The action that this budget is limiting. - :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 _request_timeout: timeout setting for this request. If one @@ -40838,11 +41755,9 @@ def import_campaign_store_budget_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_store_budget_serialize( + _param = self._import_campaign_stores_serialize( application_id=application_id, campaign_id=campaign_id, - action=action, - period=period, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -40851,8 +41766,10 @@ def import_campaign_store_budget_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ModelImport", + '200': "ModelImport", '400': "ErrorResponse", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -40861,12 +41778,10 @@ def import_campaign_store_budget_without_preload_content( return response_data.response - def _import_campaign_store_budget_serialize( + def _import_campaign_stores_serialize( self, application_id, campaign_id, - action, - period, up_file, _request_auth, _content_type, @@ -40894,14 +41809,6 @@ def _import_campaign_store_budget_serialize( if campaign_id is not None: _path_params['campaignId'] = campaign_id # process the query parameters - if action is not None: - - _query_params.append(('action', action)) - - if period is not None: - - _query_params.append(('period', period)) - # process the header parameters # process the form parameters if up_file is not None: @@ -40938,7 +41845,7 @@ def _import_campaign_store_budget_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/import', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/stores/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -40955,10 +41862,11 @@ def _import_campaign_store_budget_serialize( @validate_call - def import_campaign_stores( + def import_collection( 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.")], + 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, _request_timeout: Union[ None, @@ -40973,14 +41881,16 @@ def import_campaign_stores( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import stores + """Import data into existing campaign-level collection - Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. + Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 _request_timeout: timeout setting for this request. If one @@ -41005,9 +41915,10 @@ def import_campaign_stores( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_stores_serialize( + _param = self._import_collection_serialize( application_id=application_id, campaign_id=campaign_id, + collection_id=collection_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41017,9 +41928,7 @@ def import_campaign_stores( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponse", '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41033,10 +41942,11 @@ def import_campaign_stores( @validate_call - def import_campaign_stores_with_http_info( + def import_collection_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.")], + 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, _request_timeout: Union[ None, @@ -41051,14 +41961,16 @@ def import_campaign_stores_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import stores + """Import data into existing campaign-level collection - Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. + Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 _request_timeout: timeout setting for this request. If one @@ -41083,9 +41995,10 @@ def import_campaign_stores_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_stores_serialize( + _param = self._import_collection_serialize( application_id=application_id, campaign_id=campaign_id, + collection_id=collection_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41095,9 +42008,7 @@ def import_campaign_stores_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponse", '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41111,10 +42022,11 @@ def import_campaign_stores_with_http_info( @validate_call - def import_campaign_stores_without_preload_content( + def import_collection_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.")], + 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, _request_timeout: Union[ None, @@ -41129,14 +42041,16 @@ def import_campaign_stores_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import stores + """Import data into existing campaign-level collection - Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file **must** only contain the following column: - `store_integration_id`: The identifier of the store. The import **replaces** the previous list of stores linked to the campaign. + Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 _request_timeout: timeout setting for this request. If one @@ -41161,9 +42075,10 @@ def import_campaign_stores_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_campaign_stores_serialize( + _param = self._import_collection_serialize( application_id=application_id, campaign_id=campaign_id, + collection_id=collection_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41173,9 +42088,7 @@ def import_campaign_stores_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponse", '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41184,10 +42097,11 @@ def import_campaign_stores_without_preload_content( return response_data.response - def _import_campaign_stores_serialize( + def _import_collection_serialize( self, application_id, campaign_id, + collection_id, up_file, _request_auth, _content_type, @@ -41214,6 +42128,8 @@ def _import_campaign_stores_serialize( _path_params['applicationId'] = application_id if campaign_id is not None: _path_params['campaignId'] = campaign_id + if collection_id is not None: + _path_params['collectionId'] = collection_id # process the query parameters # process the header parameters # process the form parameters @@ -41251,7 +42167,7 @@ def _import_campaign_stores_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/stores/import', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -41268,11 +42184,11 @@ def _import_campaign_stores_serialize( @validate_call - def import_collection( + def import_coupons( 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.")], - 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.")], + 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, _request_timeout: Union[ None, @@ -41287,16 +42203,16 @@ def import_collection( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import data into existing campaign-level collection + """Import coupons - Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. + Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41321,10 +42237,10 @@ def import_collection( :return: Returns the result object. """ # noqa: E501 - _param = self._import_collection_serialize( + _param = self._import_coupons_serialize( application_id=application_id, campaign_id=campaign_id, - collection_id=collection_id, + skip_duplicates=skip_duplicates, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41334,7 +42250,6 @@ def import_collection( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '401': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41348,11 +42263,11 @@ def import_collection( @validate_call - def import_collection_with_http_info( + def import_coupons_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.")], - 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.")], + 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, _request_timeout: Union[ None, @@ -41367,16 +42282,16 @@ def import_collection_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import data into existing campaign-level collection + """Import coupons - Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. + Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41401,10 +42316,10 @@ def import_collection_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_collection_serialize( + _param = self._import_coupons_serialize( application_id=application_id, campaign_id=campaign_id, - collection_id=collection_id, + skip_duplicates=skip_duplicates, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41414,7 +42329,6 @@ def import_collection_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '401': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41428,11 +42342,11 @@ def import_collection_with_http_info( @validate_call - def import_collection_without_preload_content( + def import_coupons_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.")], - 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.")], + 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, _request_timeout: Union[ None, @@ -41447,16 +42361,16 @@ def import_collection_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import data into existing campaign-level collection + """Import coupons - Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. ## Example ``` item Adidas Nike Asics ``` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection. + Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41481,10 +42395,10 @@ def import_collection_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_collection_serialize( + _param = self._import_coupons_serialize( application_id=application_id, campaign_id=campaign_id, - collection_id=collection_id, + skip_duplicates=skip_duplicates, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41494,7 +42408,6 @@ def import_collection_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '401': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41503,11 +42416,11 @@ def import_collection_without_preload_content( return response_data.response - def _import_collection_serialize( + def _import_coupons_serialize( self, application_id, campaign_id, - collection_id, + skip_duplicates, up_file, _request_auth, _content_type, @@ -41534,9 +42447,11 @@ def _import_collection_serialize( _path_params['applicationId'] = application_id if campaign_id is not None: _path_params['campaignId'] = campaign_id - if collection_id is not None: - _path_params['collectionId'] = collection_id # process the query parameters + if skip_duplicates is not None: + + _query_params.append(('skipDuplicates', skip_duplicates)) + # process the header parameters # process the form parameters if up_file is not None: @@ -41573,7 +42488,7 @@ def _import_collection_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -41590,11 +42505,9 @@ def _import_collection_serialize( @validate_call - def import_coupons( + def import_loyalty_cards( 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.")], - 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, + 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, _request_timeout: Union[ None, @@ -41609,16 +42522,12 @@ def import_coupons( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import coupons + """Import loyalty cards - Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41643,10 +42552,8 @@ def import_coupons( :return: Returns the result object. """ # noqa: E501 - _param = self._import_coupons_serialize( - application_id=application_id, - campaign_id=campaign_id, - skip_duplicates=skip_duplicates, + _param = self._import_loyalty_cards_serialize( + loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41656,6 +42563,8 @@ def import_coupons( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41669,11 +42578,9 @@ def import_coupons( @validate_call - def import_coupons_with_http_info( + def import_loyalty_cards_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.")], - 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, + 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, _request_timeout: Union[ None, @@ -41688,16 +42595,12 @@ def import_coupons_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import coupons + """Import loyalty cards - Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41722,10 +42625,8 @@ def import_coupons_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_coupons_serialize( - application_id=application_id, - campaign_id=campaign_id, - skip_duplicates=skip_duplicates, + _param = self._import_loyalty_cards_serialize( + loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41735,6 +42636,8 @@ def import_coupons_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41748,11 +42651,9 @@ def import_coupons_with_http_info( @validate_call - def import_coupons_without_preload_content( + def import_loyalty_cards_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.")], - 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, + 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, _request_timeout: Union[ None, @@ -41767,16 +42668,12 @@ def import_coupons_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import coupons + """Import loyalty cards - Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -41801,10 +42698,8 @@ def import_coupons_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_coupons_serialize( - application_id=application_id, - campaign_id=campaign_id, - skip_duplicates=skip_duplicates, + _param = self._import_loyalty_cards_serialize( + loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -41814,6 +42709,8 @@ def import_coupons_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -41822,11 +42719,9 @@ def import_coupons_without_preload_content( return response_data.response - def _import_coupons_serialize( + def _import_loyalty_cards_serialize( self, - application_id, - campaign_id, - skip_duplicates, + loyalty_program_id, up_file, _request_auth, _content_type, @@ -41849,15 +42744,9 @@ def _import_coupons_serialize( _body_params: Optional[bytes] = None # process the path parameters - if application_id is not None: - _path_params['applicationId'] = application_id - if campaign_id is not None: - _path_params['campaignId'] = campaign_id + if loyalty_program_id is not None: + _path_params['loyaltyProgramId'] = loyalty_program_id # process the query parameters - if skip_duplicates is not None: - - _query_params.append(('skipDuplicates', skip_duplicates)) - # process the header parameters # process the form parameters if up_file is not None: @@ -41894,7 +42783,7 @@ def _import_coupons_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons', + resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_cards', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -41911,9 +42800,9 @@ def _import_coupons_serialize( @validate_call - def import_loyalty_cards( + def import_loyalty_customers_tiers( 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. ")], + 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, _request_timeout: Union[ None, @@ -41928,11 +42817,11 @@ def import_loyalty_cards( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import loyalty cards + """Import customers into loyalty tiers - Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` - :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) + :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 @@ -41958,7 +42847,7 @@ def import_loyalty_cards( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_cards_serialize( + _param = self._import_loyalty_customers_tiers_serialize( loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, @@ -41969,6 +42858,7 @@ def import_loyalty_cards( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '400': "ErrorResponseWithStatus", '401': "ErrorResponseWithStatus", '404': "ErrorResponseWithStatus", } @@ -41984,9 +42874,9 @@ def import_loyalty_cards( @validate_call - def import_loyalty_cards_with_http_info( + def import_loyalty_customers_tiers_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. ")], + 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, _request_timeout: Union[ None, @@ -42001,11 +42891,11 @@ def import_loyalty_cards_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import loyalty cards + """Import customers into loyalty tiers - Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` - :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) + :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 @@ -42031,7 +42921,7 @@ def import_loyalty_cards_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_cards_serialize( + _param = self._import_loyalty_customers_tiers_serialize( loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, @@ -42042,6 +42932,7 @@ def import_loyalty_cards_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '400': "ErrorResponseWithStatus", '401': "ErrorResponseWithStatus", '404': "ErrorResponseWithStatus", } @@ -42057,9 +42948,9 @@ def import_loyalty_cards_with_http_info( @validate_call - def import_loyalty_cards_without_preload_content( + def import_loyalty_customers_tiers_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. ")], + 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, _request_timeout: Union[ None, @@ -42074,11 +42965,11 @@ def import_loyalty_cards_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import loyalty cards + """Import customers into loyalty tiers - Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). > [!note] We recommend limiting your file size to 500MB. ## Example ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` - :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) + :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 @@ -42104,7 +42995,7 @@ def import_loyalty_cards_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_cards_serialize( + _param = self._import_loyalty_customers_tiers_serialize( loyalty_program_id=loyalty_program_id, up_file=up_file, _request_auth=_request_auth, @@ -42115,6 +43006,7 @@ def import_loyalty_cards_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", + '400': "ErrorResponseWithStatus", '401': "ErrorResponseWithStatus", '404': "ErrorResponseWithStatus", } @@ -42125,7 +43017,7 @@ def import_loyalty_cards_without_preload_content( return response_data.response - def _import_loyalty_cards_serialize( + def _import_loyalty_customers_tiers_serialize( self, loyalty_program_id, up_file, @@ -42189,7 +43081,7 @@ def _import_loyalty_cards_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_cards', + resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -42206,9 +43098,10 @@ def _import_loyalty_cards_serialize( @validate_call - def import_loyalty_customers_tiers( + 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, _request_timeout: Union[ None, @@ -42223,12 +43116,14 @@ def import_loyalty_customers_tiers( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import customers into loyalty tiers + """Import loyalty points - Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` + Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` :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 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 _request_timeout: timeout setting for this request. If one @@ -42253,8 +43148,9 @@ def import_loyalty_customers_tiers( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_customers_tiers_serialize( + _param = self._import_loyalty_points_serialize( loyalty_program_id=loyalty_program_id, + notifications_enabled=notifications_enabled, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42264,9 +43160,6 @@ def import_loyalty_customers_tiers( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -42280,9 +43173,10 @@ def import_loyalty_customers_tiers( @validate_call - def import_loyalty_customers_tiers_with_http_info( + 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, _request_timeout: Union[ None, @@ -42297,12 +43191,14 @@ def import_loyalty_customers_tiers_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import customers into loyalty tiers + """Import loyalty points - Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` + Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` :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 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 _request_timeout: timeout setting for this request. If one @@ -42327,8 +43223,9 @@ def import_loyalty_customers_tiers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_customers_tiers_serialize( + _param = self._import_loyalty_points_serialize( loyalty_program_id=loyalty_program_id, + notifications_enabled=notifications_enabled, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42338,9 +43235,6 @@ def import_loyalty_customers_tiers_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -42354,9 +43248,10 @@ def import_loyalty_customers_tiers_with_http_info( @validate_call - def import_loyalty_customers_tiers_without_preload_content( + 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, _request_timeout: Union[ None, @@ -42371,12 +43266,14 @@ def import_loyalty_customers_tiers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import customers into loyalty tiers + """Import loyalty points - Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. > [!note] We recommend not using this endpoint to update the tier of a customer. To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` + Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` :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 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 _request_timeout: timeout setting for this request. If one @@ -42401,8 +43298,9 @@ def import_loyalty_customers_tiers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_customers_tiers_serialize( + _param = self._import_loyalty_points_serialize( loyalty_program_id=loyalty_program_id, + notifications_enabled=notifications_enabled, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42412,9 +43310,6 @@ def import_loyalty_customers_tiers_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ModelImport", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -42423,9 +43318,10 @@ def import_loyalty_customers_tiers_without_preload_content( return response_data.response - def _import_loyalty_customers_tiers_serialize( + def _import_loyalty_points_serialize( self, loyalty_program_id, + notifications_enabled, up_file, _request_auth, _content_type, @@ -42451,6 +43347,10 @@ def _import_loyalty_customers_tiers_serialize( if loyalty_program_id is not None: _path_params['loyaltyProgramId'] = loyalty_program_id # process the query parameters + if notifications_enabled is not None: + + _query_params.append(('notificationsEnabled', notifications_enabled)) + # process the header parameters # process the form parameters if up_file is not None: @@ -42487,7 +43387,7 @@ def _import_loyalty_customers_tiers_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers', + resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_points', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -42504,10 +43404,9 @@ def _import_loyalty_customers_tiers_serialize( @validate_call - def import_loyalty_points( + def import_pool_giveaways( 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, + 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, _request_timeout: Union[ None, @@ -42522,14 +43421,12 @@ def import_loyalty_points( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import loyalty points + """Import giveaway codes into a giveaway pool - Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` + Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -42554,9 +43451,8 @@ def import_loyalty_points( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_points_serialize( - loyalty_program_id=loyalty_program_id, - notifications_enabled=notifications_enabled, + _param = self._import_pool_giveaways_serialize( + pool_id=pool_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42579,10 +43475,9 @@ def import_loyalty_points( @validate_call - def import_loyalty_points_with_http_info( + def import_pool_giveaways_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, + 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, _request_timeout: Union[ None, @@ -42597,14 +43492,12 @@ def import_loyalty_points_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import loyalty points + """Import giveaway codes into a giveaway pool - Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` + Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -42629,9 +43522,8 @@ def import_loyalty_points_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_points_serialize( - loyalty_program_id=loyalty_program_id, - notifications_enabled=notifications_enabled, + _param = self._import_pool_giveaways_serialize( + pool_id=pool_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42654,10 +43546,9 @@ def import_loyalty_points_with_http_info( @validate_call - def import_loyalty_points_without_preload_content( + def import_pool_giveaways_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, + 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, _request_timeout: Union[ None, @@ -42672,14 +43563,12 @@ def import_loyalty_points_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import loyalty points + """Import giveaway codes into a giveaway pool - Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. **Note**: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` **Note**: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are _active_. If it is later, the points are _pending_ until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ## Example for card-based programs ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` + Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` - :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 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 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 _request_timeout: timeout setting for this request. If one @@ -42704,9 +43593,8 @@ def import_loyalty_points_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_loyalty_points_serialize( - loyalty_program_id=loyalty_program_id, - notifications_enabled=notifications_enabled, + _param = self._import_pool_giveaways_serialize( + pool_id=pool_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42724,10 +43612,9 @@ def import_loyalty_points_without_preload_content( return response_data.response - def _import_loyalty_points_serialize( + def _import_pool_giveaways_serialize( self, - loyalty_program_id, - notifications_enabled, + pool_id, up_file, _request_auth, _content_type, @@ -42750,13 +43637,9 @@ def _import_loyalty_points_serialize( _body_params: Optional[bytes] = None # process the path parameters - if loyalty_program_id is not None: - _path_params['loyaltyProgramId'] = loyalty_program_id + if pool_id is not None: + _path_params['poolId'] = pool_id # process the query parameters - if notifications_enabled is not None: - - _query_params.append(('notificationsEnabled', notifications_enabled)) - # process the header parameters # process the form parameters if up_file is not None: @@ -42793,7 +43676,7 @@ def _import_loyalty_points_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/loyalty_programs/{loyaltyProgramId}/import_points', + resource_path='/v1/giveaways/pools/{poolId}/import', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -42810,9 +43693,10 @@ def _import_loyalty_points_serialize( @validate_call - def import_pool_giveaways( + def import_referrals( self, - pool_id: Annotated[StrictInt, Field(description="The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.")], + 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, _request_timeout: Union[ None, @@ -42827,12 +43711,14 @@ def import_pool_giveaways( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ModelImport: - """Import giveaway codes into a giveaway pool + """Import referrals - Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` + Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` - :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 application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 _request_timeout: timeout setting for this request. If one @@ -42857,8 +43743,9 @@ def import_pool_giveaways( :return: Returns the result object. """ # noqa: E501 - _param = self._import_pool_giveaways_serialize( - pool_id=pool_id, + _param = self._import_referrals_serialize( + application_id=application_id, + campaign_id=campaign_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42881,9 +43768,10 @@ def import_pool_giveaways( @validate_call - def import_pool_giveaways_with_http_info( + def import_referrals_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.")], + 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, _request_timeout: Union[ None, @@ -42898,12 +43786,14 @@ def import_pool_giveaways_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ModelImport]: - """Import giveaway codes into a giveaway pool + """Import referrals - Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` + Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` - :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 application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 _request_timeout: timeout setting for this request. If one @@ -42928,8 +43818,9 @@ def import_pool_giveaways_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_pool_giveaways_serialize( - pool_id=pool_id, + _param = self._import_referrals_serialize( + application_id=application_id, + campaign_id=campaign_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -42952,9 +43843,10 @@ def import_pool_giveaways_with_http_info( @validate_call - def import_pool_giveaways_without_preload_content( + def import_referrals_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.")], + 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, _request_timeout: Union[ None, @@ -42969,12 +43861,14 @@ def import_pool_giveaways_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import giveaway codes into a giveaway pool + """Import referrals - Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): The code of your giveaway, for instance, a gift card redemption code. - `startdate`: The start date in RFC3339 of the code redemption period. - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] **Note** > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` + Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` - :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 application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 _request_timeout: timeout setting for this request. If one @@ -42999,8 +43893,9 @@ def import_pool_giveaways_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_pool_giveaways_serialize( - pool_id=pool_id, + _param = self._import_referrals_serialize( + application_id=application_id, + campaign_id=campaign_id, up_file=up_file, _request_auth=_request_auth, _content_type=_content_type, @@ -43018,9 +43913,10 @@ def import_pool_giveaways_without_preload_content( return response_data.response - def _import_pool_giveaways_serialize( + def _import_referrals_serialize( self, - pool_id, + application_id, + campaign_id, up_file, _request_auth, _content_type, @@ -43043,8 +43939,10 @@ def _import_pool_giveaways_serialize( _body_params: Optional[bytes] = None # process the path parameters - if pool_id is not None: - _path_params['poolId'] = pool_id + if application_id is not None: + _path_params['applicationId'] = application_id + if campaign_id is not None: + _path_params['campaignId'] = campaign_id # process the query parameters # process the header parameters # process the form parameters @@ -43082,7 +43980,7 @@ def _import_pool_giveaways_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/giveaways/pools/{poolId}/import', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -43099,11 +43997,9 @@ def _import_pool_giveaways_serialize( @validate_call - def import_referrals( + def invite_user_external( 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, + new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43116,17 +44012,13 @@ def import_referrals( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ModelImport: - """Import referrals + ) -> None: + """Invite user from identity provider - Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 new_external_invitation: body (required) + :type new_external_invitation: NewExternalInvitation :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 @@ -43149,10 +44041,8 @@ def import_referrals( :return: Returns the result object. """ # noqa: E501 - _param = self._import_referrals_serialize( - application_id=application_id, - campaign_id=campaign_id, - up_file=up_file, + _param = self._invite_user_external_serialize( + new_external_invitation=new_external_invitation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43160,7 +44050,7 @@ def import_referrals( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -43174,11 +44064,9 @@ def import_referrals( @validate_call - def import_referrals_with_http_info( + def invite_user_external_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, + new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43191,17 +44079,13 @@ def import_referrals_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ModelImport]: - """Import referrals + ) -> ApiResponse[None]: + """Invite user from identity provider - Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 new_external_invitation: body (required) + :type new_external_invitation: NewExternalInvitation :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 @@ -43224,10 +44108,8 @@ def import_referrals_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_referrals_serialize( - application_id=application_id, - campaign_id=campaign_id, - up_file=up_file, + _param = self._invite_user_external_serialize( + new_external_invitation=new_external_invitation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43235,7 +44117,7 @@ def import_referrals_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -43249,11 +44131,9 @@ def import_referrals_with_http_info( @validate_call - def import_referrals_without_preload_content( + def invite_user_external_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, + new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43267,16 +44147,12 @@ def import_referrals_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import referrals + """Invite user from identity provider - Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is **not** automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 new_external_invitation: body (required) + :type new_external_invitation: NewExternalInvitation :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 @@ -43299,10 +44175,8 @@ def import_referrals_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_referrals_serialize( - application_id=application_id, - campaign_id=campaign_id, - up_file=up_file, + _param = self._invite_user_external_serialize( + new_external_invitation=new_external_invitation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43310,7 +44184,7 @@ def import_referrals_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ModelImport", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -43319,11 +44193,9 @@ def import_referrals_without_preload_content( return response_data.response - def _import_referrals_serialize( + def _invite_user_external_serialize( self, - application_id, - campaign_id, - up_file, + new_external_invitation, _request_auth, _content_type, _headers, @@ -43345,25 +44217,14 @@ def _import_referrals_serialize( _body_params: Optional[bytes] = None # process the path parameters - if application_id is not None: - _path_params['applicationId'] = application_id - if campaign_id is not None: - _path_params['campaignId'] = campaign_id # process the query parameters # process the header parameters # process the form parameters - if up_file is not None: - _form_params.append(('upFile', up_file)) # process the body parameter + if new_external_invitation is not None: + _body_params = new_external_invitation - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) # set the HTTP header `Content-Type` if _content_type: @@ -43372,7 +44233,7 @@ def _import_referrals_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'multipart/form-data' + 'application/json' ] ) ) @@ -43386,7 +44247,7 @@ def _import_referrals_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals', + resource_path='/v1/users/invite', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -43403,9 +44264,13 @@ def _import_referrals_serialize( @validate_call - def invite_user_external( + def list_account_collections( self, - new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43418,13 +44283,21 @@ def invite_user_external( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Invite user from identity provider + ) -> ListAccountCollections200Response: + """List collections in account - [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. + List account-level collections in the account. - :param new_external_invitation: body (required) - :type new_external_invitation: NewExternalInvitation + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool + :param name: Filter by collection name. + :type name: str :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 @@ -43447,8 +44320,12 @@ def invite_user_external( :return: Returns the result object. """ # noqa: E501 - _param = self._invite_user_external_serialize( - new_external_invitation=new_external_invitation, + _param = self._list_account_collections_serialize( + page_size=page_size, + skip=skip, + sort=sort, + with_total_result_size=with_total_result_size, + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43456,7 +44333,10 @@ def invite_user_external( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "ListAccountCollections200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -43470,9 +44350,13 @@ def invite_user_external( @validate_call - def invite_user_external_with_http_info( + def list_account_collections_with_http_info( self, - new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43485,13 +44369,21 @@ def invite_user_external_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Invite user from identity provider + ) -> ApiResponse[ListAccountCollections200Response]: + """List collections in account - [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. + List account-level collections in the account. - :param new_external_invitation: body (required) - :type new_external_invitation: NewExternalInvitation + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool + :param name: Filter by collection name. + :type name: str :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 @@ -43514,8 +44406,12 @@ def invite_user_external_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._invite_user_external_serialize( - new_external_invitation=new_external_invitation, + _param = self._list_account_collections_serialize( + page_size=page_size, + skip=skip, + sort=sort, + with_total_result_size=with_total_result_size, + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43523,7 +44419,10 @@ def invite_user_external_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "ListAccountCollections200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -43537,9 +44436,13 @@ def invite_user_external_with_http_info( @validate_call - def invite_user_external_without_preload_content( + def list_account_collections_without_preload_content( self, - new_external_invitation: Annotated[NewExternalInvitation, Field(description="body")], + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43553,12 +44456,20 @@ def invite_user_external_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Invite user from identity provider + """List collections in account - [Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address. + List account-level collections in the account. - :param new_external_invitation: body (required) - :type new_external_invitation: NewExternalInvitation + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. + :type sort: str + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. + :type with_total_result_size: bool + :param name: Filter by collection name. + :type name: str :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 @@ -43581,8 +44492,12 @@ def invite_user_external_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._invite_user_external_serialize( - new_external_invitation=new_external_invitation, + _param = self._list_account_collections_serialize( + page_size=page_size, + skip=skip, + sort=sort, + with_total_result_size=with_total_result_size, + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43590,7 +44505,10 @@ def invite_user_external_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "ListAccountCollections200Response", + '400': "ErrorResponseWithStatus", + '401': "ErrorResponseWithStatus", + '404': "ErrorResponseWithStatus", } response_data = self.api_client.call_api( *_param, @@ -43599,9 +44517,13 @@ def invite_user_external_without_preload_content( return response_data.response - def _invite_user_external_serialize( + def _list_account_collections_serialize( self, - new_external_invitation, + page_size, + skip, + sort, + with_total_result_size, + name, _request_auth, _content_type, _headers, @@ -43624,27 +44546,39 @@ def _invite_user_external_serialize( # process the path parameters # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if skip is not None: + + _query_params.append(('skip', skip)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if with_total_result_size is not None: + + _query_params.append(('withTotalResultSize', with_total_result_size)) + + if name is not None: + + _query_params.append(('name', name)) + # process the header parameters # process the form parameters # process the body parameter - if new_external_invitation is not None: - _body_params = new_external_invitation - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + # authentication setting _auth_settings: List[str] = [ @@ -43652,8 +44586,8 @@ def _invite_user_external_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/users/invite', + method='GET', + resource_path='/v1/collections', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -43670,13 +44604,13 @@ def _invite_user_external_serialize( @validate_call - def list_account_collections( + def list_achievements( self, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + 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.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, - name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43689,21 +44623,21 @@ def list_account_collections( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListAccountCollections200Response: - """List collections in account + ) -> ListAchievements200Response: + """List achievements - List account-level collections in the account. + List all the achievements for a specific campaign. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool - :param name: Filter by collection name. - :type name: str + :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. + :type title: str :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 @@ -43726,12 +44660,12 @@ def list_account_collections( :return: Returns the result object. """ # noqa: E501 - _param = self._list_account_collections_serialize( + _param = self._list_achievements_serialize( + application_id=application_id, + campaign_id=campaign_id, page_size=page_size, skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, - name=name, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43739,10 +44673,7 @@ def list_account_collections( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAccountCollections200Response", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", + '200': "ListAchievements200Response", } response_data = self.api_client.call_api( *_param, @@ -43756,13 +44687,13 @@ def list_account_collections( @validate_call - def list_account_collections_with_http_info( + def list_achievements_with_http_info( self, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + 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.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, - name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43775,21 +44706,21 @@ def list_account_collections_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListAccountCollections200Response]: - """List collections in account + ) -> ApiResponse[ListAchievements200Response]: + """List achievements - List account-level collections in the account. + List all the achievements for a specific campaign. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool - :param name: Filter by collection name. - :type name: str + :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. + :type title: str :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 @@ -43812,12 +44743,12 @@ def list_account_collections_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_account_collections_serialize( + _param = self._list_achievements_serialize( + application_id=application_id, + campaign_id=campaign_id, page_size=page_size, skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, - name=name, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43825,10 +44756,7 @@ def list_account_collections_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAccountCollections200Response", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", + '200': "ListAchievements200Response", } response_data = self.api_client.call_api( *_param, @@ -43842,13 +44770,13 @@ def list_account_collections_with_http_info( @validate_call - def list_account_collections_without_preload_content( + def list_achievements_without_preload_content( self, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + 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.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, - name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -43862,20 +44790,20 @@ def list_account_collections_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List collections in account + """List achievements - List account-level collections in the account. + List all the achievements for a specific campaign. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :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 page_size: The number of items in the response. :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. - :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. - :type with_total_result_size: bool - :param name: Filter by collection name. - :type name: str + :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. + :type title: str :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,12 +44826,12 @@ def list_account_collections_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_account_collections_serialize( + _param = self._list_achievements_serialize( + application_id=application_id, + campaign_id=campaign_id, page_size=page_size, skip=skip, - sort=sort, - with_total_result_size=with_total_result_size, - name=name, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -43911,10 +44839,7 @@ def list_account_collections_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAccountCollections200Response", - '400': "ErrorResponseWithStatus", - '401': "ErrorResponseWithStatus", - '404': "ErrorResponseWithStatus", + '200': "ListAchievements200Response", } response_data = self.api_client.call_api( *_param, @@ -43923,13 +44848,13 @@ def list_account_collections_without_preload_content( return response_data.response - def _list_account_collections_serialize( + def _list_achievements_serialize( self, + application_id, + campaign_id, page_size, skip, - sort, - with_total_result_size, - name, + title, _request_auth, _content_type, _headers, @@ -43951,6 +44876,10 @@ def _list_account_collections_serialize( _body_params: Optional[bytes] = None # process the path parameters + if application_id is not None: + _path_params['applicationId'] = application_id + if campaign_id is not None: + _path_params['campaignId'] = campaign_id # process the query parameters if page_size is not None: @@ -43960,17 +44889,9 @@ def _list_account_collections_serialize( _query_params.append(('skip', skip)) - if sort is not None: - - _query_params.append(('sort', sort)) - - if with_total_result_size is not None: - - _query_params.append(('withTotalResultSize', with_total_result_size)) - - if name is not None: + if title is not None: - _query_params.append(('name', name)) + _query_params.append(('title', title)) # process the header parameters # process the form parameters @@ -43993,7 +44914,7 @@ def _list_account_collections_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/collections', + resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/achievements', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -44010,13 +44931,8 @@ def _list_account_collections_serialize( @validate_call - def list_achievements( + def list_all_roles_v2( 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.")], - page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44029,21 +44945,11 @@ def list_achievements( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListAchievements200Response: - """List achievements + ) -> ListAllRolesV2200Response: + """List roles - List all the achievements for a specific campaign. + List all roles. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. - :type title: str :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 @@ -44066,12 +44972,7 @@ def list_achievements( :return: Returns the result object. """ # noqa: E501 - _param = self._list_achievements_serialize( - application_id=application_id, - campaign_id=campaign_id, - page_size=page_size, - skip=skip, - title=title, + _param = self._list_all_roles_v2_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44079,7 +44980,7 @@ def list_achievements( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAchievements200Response", + '200': "ListAllRolesV2200Response", } response_data = self.api_client.call_api( *_param, @@ -44093,13 +44994,8 @@ def list_achievements( @validate_call - def list_achievements_with_http_info( + def list_all_roles_v2_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.")], - page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44112,21 +45008,11 @@ def list_achievements_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListAchievements200Response]: - """List achievements + ) -> ApiResponse[ListAllRolesV2200Response]: + """List roles - List all the achievements for a specific campaign. + List all roles. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. - :type title: str :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 @@ -44149,12 +45035,7 @@ def list_achievements_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_achievements_serialize( - application_id=application_id, - campaign_id=campaign_id, - page_size=page_size, - skip=skip, - title=title, + _param = self._list_all_roles_v2_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44162,7 +45043,7 @@ def list_achievements_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAchievements200Response", + '200': "ListAllRolesV2200Response", } response_data = self.api_client.call_api( *_param, @@ -44176,13 +45057,8 @@ def list_achievements_with_http_info( @validate_call - def list_achievements_without_preload_content( + def list_all_roles_v2_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.")], - page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, - skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - title: Annotated[Optional[StrictStr], Field(description="Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44196,20 +45072,10 @@ def list_achievements_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List achievements + """List roles - List all the achievements for a specific campaign. + List all roles. - :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - :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 page_size: The number of items in the response. - :type page_size: int - :param skip: The number of items to skip when paging through large result sets. - :type skip: int - :param title: Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. - :type title: str :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 @@ -44232,12 +45098,7 @@ def list_achievements_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_achievements_serialize( - application_id=application_id, - campaign_id=campaign_id, - page_size=page_size, - skip=skip, - title=title, + _param = self._list_all_roles_v2_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44245,7 +45106,7 @@ def list_achievements_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAchievements200Response", + '200': "ListAllRolesV2200Response", } response_data = self.api_client.call_api( *_param, @@ -44254,13 +45115,8 @@ def list_achievements_without_preload_content( return response_data.response - def _list_achievements_serialize( + def _list_all_roles_v2_serialize( self, - application_id, - campaign_id, - page_size, - skip, - title, _request_auth, _content_type, _headers, @@ -44282,23 +45138,7 @@ def _list_achievements_serialize( _body_params: Optional[bytes] = None # process the path parameters - if application_id is not None: - _path_params['applicationId'] = application_id - if campaign_id is not None: - _path_params['campaignId'] = campaign_id # process the query parameters - if page_size is not None: - - _query_params.append(('pageSize', page_size)) - - if skip is not None: - - _query_params.append(('skip', skip)) - - if title is not None: - - _query_params.append(('title', title)) - # process the header parameters # process the form parameters # process the body parameter @@ -44320,7 +45160,7 @@ def _list_achievements_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/applications/{applicationId}/campaigns/{campaignId}/achievements', + resource_path='/v2/roles', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -44337,8 +45177,12 @@ def _list_achievements_serialize( @validate_call - def list_all_roles_v2( + def list_application_cart_item_filters( self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44351,11 +45195,19 @@ def list_all_roles_v2( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListAllRolesV2200Response: - """List roles + ) -> ListApplicationCartItemFilters200Response: + """List Application cart item filters - List all roles. + Return all the Application cart item filters for a specific Application. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param title: Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. + :type title: str :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 @@ -44378,7 +45230,11 @@ def list_all_roles_v2( :return: Returns the result object. """ # noqa: E501 - _param = self._list_all_roles_v2_serialize( + _param = self._list_application_cart_item_filters_serialize( + application_id=application_id, + page_size=page_size, + skip=skip, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44386,7 +45242,7 @@ def list_all_roles_v2( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllRolesV2200Response", + '200': "ListApplicationCartItemFilters200Response", } response_data = self.api_client.call_api( *_param, @@ -44400,8 +45256,12 @@ def list_all_roles_v2( @validate_call - def list_all_roles_v2_with_http_info( + def list_application_cart_item_filters_with_http_info( self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44414,11 +45274,19 @@ def list_all_roles_v2_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListAllRolesV2200Response]: - """List roles + ) -> ApiResponse[ListApplicationCartItemFilters200Response]: + """List Application cart item filters - List all roles. + Return all the Application cart item filters for a specific Application. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param title: Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. + :type title: str :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 @@ -44441,7 +45309,11 @@ def list_all_roles_v2_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_all_roles_v2_serialize( + _param = self._list_application_cart_item_filters_serialize( + application_id=application_id, + page_size=page_size, + skip=skip, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44449,7 +45321,7 @@ def list_all_roles_v2_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllRolesV2200Response", + '200': "ListApplicationCartItemFilters200Response", } response_data = self.api_client.call_api( *_param, @@ -44463,8 +45335,12 @@ def list_all_roles_v2_with_http_info( @validate_call - def list_all_roles_v2_without_preload_content( + def list_application_cart_item_filters_without_preload_content( self, + application_id: Annotated[StrictInt, Field(description="The ID of the Application. It is displayed in your Talon.One deployment URL.")], + page_size: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, + skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, + title: Annotated[Optional[StrictStr], Field(description="Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -44478,10 +45354,18 @@ def list_all_roles_v2_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List roles + """List Application cart item filters - List all roles. + Return all the Application cart item filters for a specific Application. + :param application_id: The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + :type application_id: int + :param page_size: The number of items in the response. + :type page_size: int + :param skip: The number of items to skip when paging through large result sets. + :type skip: int + :param title: Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. + :type title: str :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 @@ -44504,7 +45388,11 @@ def list_all_roles_v2_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_all_roles_v2_serialize( + _param = self._list_application_cart_item_filters_serialize( + application_id=application_id, + page_size=page_size, + skip=skip, + title=title, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -44512,7 +45400,7 @@ def list_all_roles_v2_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllRolesV2200Response", + '200': "ListApplicationCartItemFilters200Response", } response_data = self.api_client.call_api( *_param, @@ -44521,8 +45409,12 @@ def list_all_roles_v2_without_preload_content( return response_data.response - def _list_all_roles_v2_serialize( + def _list_application_cart_item_filters_serialize( self, + application_id, + page_size, + skip, + title, _request_auth, _content_type, _headers, @@ -44544,7 +45436,21 @@ def _list_all_roles_v2_serialize( _body_params: Optional[bytes] = None # process the path parameters + if application_id is not None: + _path_params['applicationId'] = application_id # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if skip is not None: + + _query_params.append(('skip', skip)) + + if title is not None: + + _query_params.append(('title', title)) + # process the header parameters # process the form parameters # process the body parameter @@ -44566,7 +45472,7 @@ def _list_all_roles_v2_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/roles', + resource_path='/v1/applications/{applicationId}/cart_item_filters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -44907,7 +45813,7 @@ def list_catalog_items( catalog_id: Annotated[StrictInt, Field(description="The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, sku: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more SKUs. Must be exact match.")] = None, product_names: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more product names. Must be exact match.")] = None, _request_timeout: Union[ @@ -44933,7 +45839,7 @@ def list_catalog_items( :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param sku: Filter results by one or more SKUs. Must be exact match. :type sku: List[str] @@ -44994,7 +45900,7 @@ def list_catalog_items_with_http_info( catalog_id: Annotated[StrictInt, Field(description="The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, sku: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more SKUs. Must be exact match.")] = None, product_names: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more product names. Must be exact match.")] = None, _request_timeout: Union[ @@ -45020,7 +45926,7 @@ def list_catalog_items_with_http_info( :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param sku: Filter results by one or more SKUs. Must be exact match. :type sku: List[str] @@ -45081,7 +45987,7 @@ def list_catalog_items_without_preload_content( catalog_id: Annotated[StrictInt, Field(description="The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.")], page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, sku: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more SKUs. Must be exact match.")] = None, product_names: Annotated[Optional[List[StrictStr]], Field(description="Filter results by one or more product names. Must be exact match.")] = None, _request_timeout: Union[ @@ -45107,7 +46013,7 @@ def list_catalog_items_without_preload_content( :type page_size: int :param skip: The number of items to skip when paging through large result sets. :type skip: int - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param sku: Filter results by one or more SKUs. Must be exact match. :type sku: List[str] @@ -45257,7 +46163,7 @@ def list_collections( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45286,7 +46192,7 @@ def list_collections( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -45349,7 +46255,7 @@ def list_collections_with_http_info( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45378,7 +46284,7 @@ def list_collections_with_http_info( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -45441,7 +46347,7 @@ def list_collections_without_preload_content( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45470,7 +46376,7 @@ def list_collections_without_preload_content( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -45620,7 +46526,7 @@ def list_collections_in_application( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45647,7 +46553,7 @@ def list_collections_in_application( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -45708,7 +46614,7 @@ def list_collections_in_application_with_http_info( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45735,7 +46641,7 @@ def list_collections_in_application_with_http_info( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -45796,7 +46702,7 @@ def list_collections_in_application_without_preload_content( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, name: Annotated[Optional[StrictStr], Field(description="Filter by collection name.")] = None, _request_timeout: Union[ None, @@ -45823,7 +46729,7 @@ def list_collections_in_application_without_preload_content( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param name: Filter by collection name. :type name: str @@ -46281,7 +47187,7 @@ def list_stores( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, campaign_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter results by campaign ID.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the store.")] = None, integration_id: Annotated[Optional[StrictStr], Field(description="The integration ID of the store.")] = None, @@ -46311,7 +47217,7 @@ def list_stores( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param campaign_id: Filter results by campaign ID. :type campaign_id: float @@ -46380,7 +47286,7 @@ def list_stores_with_http_info( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, campaign_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter results by campaign ID.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the store.")] = None, integration_id: Annotated[Optional[StrictStr], Field(description="The integration ID of the store.")] = None, @@ -46410,7 +47316,7 @@ def list_stores_with_http_info( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param campaign_id: Filter results by campaign ID. :type campaign_id: float @@ -46479,7 +47385,7 @@ def list_stores_without_preload_content( page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of items in the response.")] = None, skip: Annotated[Optional[StrictInt], Field(description="The number of items to skip when paging through large result sets.")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. ")] = None, - with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. ")] = None, + with_total_result_size: Annotated[Optional[StrictBool], Field(description="When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. ")] = None, campaign_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Filter results by campaign ID.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the store.")] = None, integration_id: Annotated[Optional[StrictStr], Field(description="The integration ID of the store.")] = None, @@ -46509,7 +47415,7 @@ def list_stores_without_preload_content( :type skip: int :param sort: The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. :type sort: str - :param with_total_result_size: When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + :param with_total_result_size: When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. :type with_total_result_size: bool :param campaign_id: Filter results by campaign ID. :type campaign_id: float diff --git a/talon_one/api_client.py b/talon_one/api_client.py index db2bb86..c6136c0 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.07.0/python' + self.user_agent = 'OpenAPI-Generator/26.08.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 25b95dc..2c013fe 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.07.0".\ + "SDK Package Version: 26.08.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 1fe5263..62ce90f 100644 --- a/talon_one/models/__init__.py +++ b/talon_one/models/__init__.py @@ -197,6 +197,7 @@ from talon_one.models.create_application_api_key import CreateApplicationAPIKey from talon_one.models.create_coupon_data import CreateCouponData from talon_one.models.create_coupons200_response import CreateCoupons200Response +from talon_one.models.create_mcp_key import CreateMCPKey from talon_one.models.create_management_key import CreateManagementKey from talon_one.models.create_referrals_for_multiple_advocates201_response import CreateReferralsForMultipleAdvocates201Response from talon_one.models.create_template_campaign import CreateTemplateCampaign @@ -250,10 +251,16 @@ from talon_one.models.experiment_list_results_request import ExperimentListResultsRequest from talon_one.models.experiment_result import ExperimentResult from talon_one.models.experiment_results import ExperimentResults +from talon_one.models.experiment_segment_insight import ExperimentSegmentInsight +from talon_one.models.experiment_segment_insight_metric import ExperimentSegmentInsightMetric +from talon_one.models.experiment_segment_insight_variant import ExperimentSegmentInsightVariant +from talon_one.models.experiment_segment_insights import ExperimentSegmentInsights from talon_one.models.experiment_variant import ExperimentVariant from talon_one.models.experiment_variant_allocation import ExperimentVariantAllocation from talon_one.models.experiment_variant_result import ExperimentVariantResult from talon_one.models.experiment_variant_result_confidence import ExperimentVariantResultConfidence +from talon_one.models.experiment_verdict import ExperimentVerdict +from talon_one.models.experiment_verdict_response import ExperimentVerdictResponse from talon_one.models.expiring_card_points_data import ExpiringCardPointsData from talon_one.models.expiring_card_points_notification import ExpiringCardPointsNotification from talon_one.models.expiring_coupons_data import ExpiringCouponsData @@ -347,6 +354,7 @@ from talon_one.models.integration_event_v2_response import IntegrationEventV2Response from talon_one.models.integration_event_v3_request import IntegrationEventV3Request from talon_one.models.integration_event_v3_response import IntegrationEventV3Response +from talon_one.models.integration_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response from talon_one.models.integration_hub_config import IntegrationHubConfig from talon_one.models.integration_hub_event_payload_coupon_based_notifications import IntegrationHubEventPayloadCouponBasedNotifications from talon_one.models.integration_hub_event_payload_coupon_based_notifications_limits import IntegrationHubEventPayloadCouponBasedNotificationsLimits @@ -384,6 +392,7 @@ from talon_one.models.list_account_collections200_response import ListAccountCollections200Response from talon_one.models.list_achievements200_response import ListAchievements200Response from talon_one.models.list_all_roles_v2200_response import ListAllRolesV2200Response +from talon_one.models.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response from talon_one.models.list_campaign_store_budget_limits200_response import ListCampaignStoreBudgetLimits200Response from talon_one.models.list_campaign_store_budgets import ListCampaignStoreBudgets from talon_one.models.list_campaign_store_budgets_store import ListCampaignStoreBudgetsStore @@ -417,6 +426,7 @@ from talon_one.models.loyalty_program_transaction import LoyaltyProgramTransaction from talon_one.models.loyalty_sub_ledger import LoyaltySubLedger from talon_one.models.loyalty_tier import LoyaltyTier +from talon_one.models.mcp_key import MCPKey from talon_one.models.management_key import ManagementKey from talon_one.models.manager_config import ManagerConfig from talon_one.models.message_log_entries import MessageLogEntries @@ -479,6 +489,7 @@ from talon_one.models.new_invite_email import NewInviteEmail from talon_one.models.new_loyalty_program import NewLoyaltyProgram from talon_one.models.new_loyalty_tier import NewLoyaltyTier +from talon_one.models.new_mcp_key import NewMCPKey from talon_one.models.new_management_key import NewManagementKey from talon_one.models.new_message_test import NewMessageTest from talon_one.models.new_multiple_audiences_item import NewMultipleAudiencesItem @@ -493,6 +504,7 @@ from talon_one.models.new_referrals_for_multiple_advocates import NewReferralsForMultipleAdvocates 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_role import NewRole from talon_one.models.new_role_v2 import NewRoleV2 from talon_one.models.new_ruleset import NewRuleset @@ -560,6 +572,7 @@ from talon_one.models.revision_activation import RevisionActivation 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.role import Role from talon_one.models.role_assign import RoleAssign from talon_one.models.role_membership import RoleMembership diff --git a/talon_one/models/achievement_v2.py b/talon_one/models/achievement_v2.py index 45710c4..568b22b 100644 --- a/talon_one/models/achievement_v2.py +++ b/talon_one/models/achievement_v2.py @@ -31,19 +31,19 @@ class AchievementV2(BaseModel): """ # noqa: E501 id: StrictInt = Field(description="The internal ID of this entity.") created: datetime = Field(description="The time this entity was created.") - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. ") - title: Optional[StrictStr] = Field(default=None, description="The display name for the achievement in the Campaign Manager.") - description: Optional[StrictStr] = Field(default=None, description="A description of the achievement.") - target: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The required number of actions or the transactional milestone to complete the achievement.") + name: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. ") + title: StrictStr = Field(description="The display name for the achievement in the Campaign Manager.") + description: StrictStr = Field(description="A description of the achievement.") + target: Union[StrictFloat, StrictInt] = Field(description="The required number of actions or the transactional milestone to complete the achievement.") period: Optional[StrictStr] = Field(default=None, description="The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. ") - recurrence_policy: Optional[StrictStr] = Field(default=None, description="The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again. ", alias="recurrencePolicy") - activation_policy: Optional[StrictStr] = Field(default=None, description="The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. ", alias="activationPolicy") + recurrence_policy: StrictStr = Field(description="The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again. ", alias="recurrencePolicy") + activation_policy: StrictStr = Field(description="The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. ", alias="activationPolicy") fixed_start_date: Optional[datetime] = Field(default=None, description="The achievement's start date when `activationPolicy` is set to `fixed_schedule`. **Note:** It must be an RFC3339 timestamp string. ", alias="fixedStartDate") end_date: Optional[datetime] = Field(default=None, description="The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. ", alias="endDate") allow_rollback_after_completion: Optional[StrictBool] = Field(default=None, description="When `true`, customer progress can be rolled back in completed achievements.", alias="allowRollbackAfterCompletion") - sandbox: Optional[StrictBool] = Field(default=None, description="Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type.") - subscribed_applications: Optional[Annotated[List[StrictInt], Field(min_length=0)]] = Field(default=None, description="A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement.", alias="subscribedApplications") - timezone: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A string containing an IANA timezone descriptor.") + sandbox: StrictBool = Field(description="Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type.") + subscribed_applications: Annotated[List[StrictInt], Field(min_length=0)] = Field(description="A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement.", alias="subscribedApplications") + timezone: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A string containing an IANA timezone descriptor.") user_id: StrictInt = Field(description="The ID of the user that created this achievement.", alias="userId") created_by: Optional[StrictStr] = Field(default=None, description="Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. ", alias="createdBy") has_progress: Optional[StrictBool] = Field(default=None, description="Indicates if a customer has made progress in the achievement.", alias="hasProgress") @@ -53,9 +53,6 @@ class AchievementV2(BaseModel): @field_validator('name') def name_validate_regular_expression(cls, value): """Validates the regular expression""" - if value is None: - return value - if not re.match(r"^[a-zA-Z]\w+$", value): raise ValueError(r"must validate the regular expression /^[a-zA-Z]\w+$/") return value @@ -63,9 +60,6 @@ def name_validate_regular_expression(cls, value): @field_validator('recurrence_policy') def recurrence_policy_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - if value not in set(['no_recurrence', 'on_expiration', 'on_completion']): raise ValueError("must be one of enum values ('no_recurrence', 'on_expiration', 'on_completion')") return value @@ -73,9 +67,6 @@ def recurrence_policy_validate_enum(cls, value): @field_validator('activation_policy') def activation_policy_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - if value not in set(['user_action', 'fixed_schedule']): raise ValueError("must be one of enum values ('user_action', 'fixed_schedule')") return value diff --git a/talon_one/models/best_prior_price_request.py b/talon_one/models/best_prior_price_request.py index eedcbca..ee73358 100644 --- a/talon_one/models/best_prior_price_request.py +++ b/talon_one/models/best_prior_price_request.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from talon_one.models.best_prior_target import BestPriorTarget @@ -33,17 +33,13 @@ class BestPriorPriceRequest(BaseModel): skus: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="List of product SKUs to check when determining the best prior price.") timeframe_end_date: datetime = Field(description="The end date and time that defines the latest time for retrieving historical SKU prices.", alias="timeframeEndDate") timeframe: StrictStr = Field(description="The number of days prior to the timeframeEndDate. Only prices within this look back period are considered for the best prior price evaluation.") - strict_end_date: StrictBool = Field(description="This property is **deprecated**. Use `timeframeEndDateType` instead. Indicates whether the timeframe includes the start of the current sale. - When `false`, the timeframe includes the start date of the current sale. - When `true`, the timeframe strictly uses the number of days specified in `timeframe`. ", alias="strictEndDate") - timeframe_end_date_type: Optional[StrictStr] = Field(default=None, description="Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. ", alias="timeframeEndDateType") + timeframe_end_date_type: StrictStr = Field(description="Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. ", alias="timeframeEndDateType") target: Optional[BestPriorTarget] = None - __properties: ClassVar[List[str]] = ["skus", "timeframeEndDate", "timeframe", "strictEndDate", "timeframeEndDateType", "target"] + __properties: ClassVar[List[str]] = ["skus", "timeframeEndDate", "timeframe", "timeframeEndDateType", "target"] @field_validator('timeframe_end_date_type') def timeframe_end_date_type_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - if value not in set(['strict', 'price', 'sale']): raise ValueError("must be one of enum values ('strict', 'price', 'sale')") return value @@ -105,7 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skus": obj.get("skus"), "timeframeEndDate": obj.get("timeframeEndDate"), "timeframe": obj.get("timeframe"), - "strictEndDate": obj.get("strictEndDate"), "timeframeEndDateType": obj.get("timeframeEndDateType"), "target": BestPriorTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) diff --git a/talon_one/models/create_achievement_v2.py b/talon_one/models/create_achievement_v2.py index 964c5e8..52cef22 100644 --- a/talon_one/models/create_achievement_v2.py +++ b/talon_one/models/create_achievement_v2.py @@ -40,7 +40,7 @@ class CreateAchievementV2(BaseModel): end_date: Optional[datetime] = Field(default=None, description="The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. ", alias="endDate") allow_rollback_after_completion: Optional[StrictBool] = Field(default=None, description="When `true`, customer progress can be rolled back in completed achievements.", alias="allowRollbackAfterCompletion") sandbox: StrictBool = Field(description="Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type.") - subscribed_applications: Annotated[List[StrictInt], Field(min_length=0)] = Field(description="A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement.", alias="subscribedApplications") + subscribed_applications: Optional[Annotated[List[StrictInt], Field(min_length=0)]] = Field(default=None, description="A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement.", alias="subscribedApplications") timezone: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A string containing an IANA timezone descriptor.") __properties: ClassVar[List[str]] = ["name", "title", "description", "target", "period", "recurrencePolicy", "activationPolicy", "fixedStartDate", "endDate", "allowRollbackAfterCompletion", "sandbox", "subscribedApplications", "timezone"] diff --git a/talon_one/models/create_mcp_key.py b/talon_one/models/create_mcp_key.py new file mode 100644 index 0000000..2227c7f --- /dev/null +++ b/talon_one/models/create_mcp_key.py @@ -0,0 +1,91 @@ +# 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, 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 CreateMCPKey(BaseModel): + """ + CreateMCPKey + """ # noqa: E501 + name: StrictStr = Field(description="Name for the MCP key.") + expiry_date: datetime = Field(description="The date the MCP key expires.", alias="expiryDate") + __properties: ClassVar[List[str]] = ["name", "expiryDate"] + + 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 CreateMCPKey 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 CreateMCPKey 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"), + "expiryDate": obj.get("expiryDate") + }) + return _obj + + diff --git a/talon_one/models/experiment_segment_insight.py b/talon_one/models/experiment_segment_insight.py new file mode 100644 index 0000000..a734e3a --- /dev/null +++ b/talon_one/models/experiment_segment_insight.py @@ -0,0 +1,119 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from talon_one.models.experiment_segment_insight_variant import ExperimentSegmentInsightVariant +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ExperimentSegmentInsight(BaseModel): + """ + ExperimentSegmentInsight + """ # noqa: E501 + dimension: StrictStr = Field(description="The segmentation dimension used to group customers or purchases for analysis.") + bucket: StrictStr = Field(description="The specific group within the segmentation dimension.") + confidence: Union[Annotated[float, Field(le=100, strict=True, ge=95)], Annotated[int, Field(le=100, strict=True, ge=95)]] = Field(description="The raw (unadjusted) confidence score expressed as a percentage. Only segments with a confidence score greater than or equal to 95% are returned. ") + winner_variant_id: StrictInt = Field(description="The ID of the variant that performed better in this segment.", alias="winnerVariantId") + variants: List[ExperimentSegmentInsightVariant] = Field(description="Per-variant metric values for this segment.") + __properties: ClassVar[List[str]] = ["dimension", "bucket", "confidence", "winnerVariantId", "variants"] + + @field_validator('dimension') + def dimension_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cart_value', 'item_count', 'customer_type']): + raise ValueError("must be one of enum values ('cart_value', 'item_count', 'customer_type')") + return value + + @field_validator('bucket') + def bucket_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['low', 'medium', 'high', 'new', 'returning', 'loyal']): + raise ValueError("must be one of enum values ('low', 'medium', 'high', 'new', 'returning', 'loyal')") + 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 ExperimentSegmentInsight 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 variants (list) + _items = [] + if self.variants: + for _item_variants in self.variants: + if _item_variants: + _items.append(_item_variants.to_dict()) + _dict['variants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExperimentSegmentInsight from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dimension": obj.get("dimension"), + "bucket": obj.get("bucket"), + "confidence": obj.get("confidence"), + "winnerVariantId": obj.get("winnerVariantId"), + "variants": [ExperimentSegmentInsightVariant.from_dict(_item) for _item in obj["variants"]] if obj.get("variants") is not None else None + }) + return _obj + + diff --git a/talon_one/models/experiment_segment_insight_metric.py b/talon_one/models/experiment_segment_insight_metric.py new file mode 100644 index 0000000..035bf05 --- /dev/null +++ b/talon_one/models/experiment_segment_insight_metric.py @@ -0,0 +1,105 @@ +# 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 talon_one.models.experiment_segment_insight import ExperimentSegmentInsight +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ExperimentSegmentInsightMetric(BaseModel): + """ + ExperimentSegmentInsightMetric + """ # noqa: E501 + metric: StrictStr = Field(description="The metric being measured.") + segments: List[ExperimentSegmentInsight] = Field(description="Segments with statistically significant results for this metric. An empty array means no significant segments were found. Segments are sorted by confidence score from highest to lowest. ") + __properties: ClassVar[List[str]] = ["metric", "segments"] + + @field_validator('metric') + def metric_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['avg_session_value', 'avg_discounted_session_value', 'avg_items_per_session']): + raise ValueError("must be one of enum values ('avg_session_value', 'avg_discounted_session_value', 'avg_items_per_session')") + 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 ExperimentSegmentInsightMetric 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 segments (list) + _items = [] + if self.segments: + for _item_segments in self.segments: + if _item_segments: + _items.append(_item_segments.to_dict()) + _dict['segments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExperimentSegmentInsightMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metric": obj.get("metric"), + "segments": [ExperimentSegmentInsight.from_dict(_item) for _item in obj["segments"]] if obj.get("segments") is not None else None + }) + return _obj + + diff --git a/talon_one/models/experiment_segment_insight_variant.py b/talon_one/models/experiment_segment_insight_variant.py new file mode 100644 index 0000000..745283e --- /dev/null +++ b/talon_one/models/experiment_segment_insight_variant.py @@ -0,0 +1,94 @@ +# 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ExperimentSegmentInsightVariant(BaseModel): + """ + ExperimentSegmentInsightVariant + """ # noqa: E501 + variant_id: StrictInt = Field(description="The ID of the experiment variant.", alias="variantId") + variant_name: StrictStr = Field(description="The name of the experiment variant.", alias="variantName") + sessions_count: StrictInt = Field(description="The number of sessions in this segment for this variant.", alias="sessionsCount") + value: Union[StrictFloat, StrictInt] = Field(description="The metric value for this variant in the segment.") + __properties: ClassVar[List[str]] = ["variantId", "variantName", "sessionsCount", "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 ExperimentSegmentInsightVariant 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 ExperimentSegmentInsightVariant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "variantId": obj.get("variantId"), + "variantName": obj.get("variantName"), + "sessionsCount": obj.get("sessionsCount"), + "value": obj.get("value") + }) + return _obj + + diff --git a/talon_one/models/experiment_segment_insights.py b/talon_one/models/experiment_segment_insights.py new file mode 100644 index 0000000..bd22dd7 --- /dev/null +++ b/talon_one/models/experiment_segment_insights.py @@ -0,0 +1,102 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from talon_one.models.experiment_segment_insight_metric import ExperimentSegmentInsightMetric +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ExperimentSegmentInsights(BaseModel): + """ + ExperimentSegmentInsights + """ # noqa: E501 + metrics: List[ExperimentSegmentInsightMetric] = Field(description="Segment insights grouped by metric. This array always contains exactly three metric objects. Each metric includes a segments array, which is empty if no significant results were found. The metrics array itself is empty if the `reason` property is populated. ") + total_segments_tested: StrictInt = Field(description="Total number of segment-metric combinations that were tested for statistical significance. ", alias="totalSegmentsTested") + dimensions_tested: StrictInt = Field(description="Number of segmentation dimensions that had sufficient data variance to test. Dimensions where all sessions fall into a single bucket are excluded. ", alias="dimensionsTested") + reason: StrictStr = Field(description="Empty string when segment insights are available. Contains a reason code when insights could not be computed (e.g., \"insufficient_data\" when the experiment has fewer than 100 sessions per variant). ") + __properties: ClassVar[List[str]] = ["metrics", "totalSegmentsTested", "dimensionsTested", "reason"] + + 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 ExperimentSegmentInsights 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 metrics (list) + _items = [] + if self.metrics: + for _item_metrics in self.metrics: + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExperimentSegmentInsights from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metrics": [ExperimentSegmentInsightMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, + "totalSegmentsTested": obj.get("totalSegmentsTested"), + "dimensionsTested": obj.get("dimensionsTested"), + "reason": obj.get("reason") + }) + return _obj + + diff --git a/talon_one/models/experiment_verdict.py b/talon_one/models/experiment_verdict.py new file mode 100644 index 0000000..b7378b6 --- /dev/null +++ b/talon_one/models/experiment_verdict.py @@ -0,0 +1,96 @@ +# 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 ExperimentVerdict(BaseModel): + """ + ExperimentVerdict + """ # noqa: E501 + winner_variant_name: StrictStr = Field(description="The name of the winning variant. If no variant shows a statistically significant advantage on key business metrics, return 'Inconclusive'.", alias="winnerVariantName") + verdict_summary: StrictStr = Field(description="A one-sentence summary of the outcome, including the key metric and confidence level that led to the decision.", alias="verdictSummary") + key_findings: List[StrictStr] = Field(description="A bullet point stating the most important finding, including the metric, the percentage change, and the confidence.", alias="keyFindings") + ai_confidence_level: StrictStr = Field(description="Your confidence in this overall verdict, from 0 to 100.", alias="aiConfidenceLevel") + recommendation: StrictStr = Field(description="A short, actionable recommendation based on the findings. If inconclusive, suggest running the test longer. If there is a clear winner, recommend promoting it.") + __properties: ClassVar[List[str]] = ["winnerVariantName", "verdictSummary", "keyFindings", "aiConfidenceLevel", "recommendation"] + + 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 ExperimentVerdict 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 ExperimentVerdict from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "winnerVariantName": obj.get("winnerVariantName"), + "verdictSummary": obj.get("verdictSummary"), + "keyFindings": obj.get("keyFindings"), + "aiConfidenceLevel": obj.get("aiConfidenceLevel"), + "recommendation": obj.get("recommendation") + }) + return _obj + + diff --git a/talon_one/models/experiment_verdict_response.py b/talon_one/models/experiment_verdict_response.py new file mode 100644 index 0000000..3d6029d --- /dev/null +++ b/talon_one/models/experiment_verdict_response.py @@ -0,0 +1,95 @@ +# 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 +from typing import Any, ClassVar, Dict, List +from talon_one.models.experiment_verdict import ExperimentVerdict +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ExperimentVerdictResponse(BaseModel): + """ + ExperimentVerdictResponse + """ # noqa: E501 + verdict: ExperimentVerdict + generated: datetime = Field(description="Timestamp of the moment when the verdict was generated.") + __properties: ClassVar[List[str]] = ["verdict", "generated"] + + 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 ExperimentVerdictResponse 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 verdict + if self.verdict: + _dict['verdict'] = self.verdict.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExperimentVerdictResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verdict": ExperimentVerdict.from_dict(obj["verdict"]) if obj.get("verdict") is not None else None, + "generated": obj.get("generated") + }) + return _obj + + diff --git a/talon_one/models/integration_get_all_campaigns200_response.py b/talon_one/models/integration_get_all_campaigns200_response.py new file mode 100644 index 0000000..4cb271a --- /dev/null +++ b/talon_one/models/integration_get_all_campaigns200_response.py @@ -0,0 +1,98 @@ +# 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, StrictBool +from typing import Any, ClassVar, Dict, List +from talon_one.models.integration_campaign import IntegrationCampaign +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IntegrationGetAllCampaigns200Response(BaseModel): + """ + IntegrationGetAllCampaigns200Response + """ # noqa: E501 + has_more: StrictBool = Field(alias="hasMore") + data: List[IntegrationCampaign] + __properties: ClassVar[List[str]] = ["hasMore", "data"] + + 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 IntegrationGetAllCampaigns200Response 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntegrationGetAllCampaigns200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hasMore": obj.get("hasMore"), + "data": [IntegrationCampaign.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/talon_one/models/ledger_info.py b/talon_one/models/ledger_info.py index ddd45c5..a487699 100644 --- a/talon_one/models/ledger_info.py +++ b/talon_one/models/ledger_info.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from talon_one.models.tier import Tier from typing import Optional, Set @@ -38,7 +38,8 @@ class LedgerInfo(BaseModel): tentative_negative_balance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The tentative negative balance after all additions and deductions from the current customer session are applied to `negativeBalance`. When the session is closed, the tentative effects are applied and `negativeBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. ", alias="tentativeNegativeBalance") current_tier: Optional[Tier] = Field(default=None, description="Tier for which the ledger is eligible.", alias="currentTier") points_to_next_tier: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Points required to move up a tier.", alias="pointsToNextTier") - __properties: ClassVar[List[str]] = ["currentBalance", "pendingBalance", "negativeBalance", "expiredBalance", "spentBalance", "tentativeCurrentBalance", "tentativePendingBalance", "tentativeNegativeBalance", "currentTier", "pointsToNextTier"] + next_tier_name: Optional[StrictStr] = Field(default=None, description="The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. ", alias="nextTierName") + __properties: ClassVar[List[str]] = ["currentBalance", "pendingBalance", "negativeBalance", "expiredBalance", "spentBalance", "tentativeCurrentBalance", "tentativePendingBalance", "tentativeNegativeBalance", "currentTier", "pointsToNextTier", "nextTierName"] model_config = ConfigDict( validate_by_name=True, @@ -103,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tentativePendingBalance": obj.get("tentativePendingBalance"), "tentativeNegativeBalance": obj.get("tentativeNegativeBalance"), "currentTier": Tier.from_dict(obj["currentTier"]) if obj.get("currentTier") is not None else None, - "pointsToNextTier": obj.get("pointsToNextTier") + "pointsToNextTier": obj.get("pointsToNextTier"), + "nextTierName": obj.get("nextTierName") }) return _obj diff --git a/talon_one/models/list_application_cart_item_filters200_response.py b/talon_one/models/list_application_cart_item_filters200_response.py new file mode 100644 index 0000000..d765e21 --- /dev/null +++ b/talon_one/models/list_application_cart_item_filters200_response.py @@ -0,0 +1,98 @@ +# 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, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from talon_one.models.application_cif import ApplicationCIF +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ListApplicationCartItemFilters200Response(BaseModel): + """ + ListApplicationCartItemFilters200Response + """ # noqa: E501 + has_more: Optional[StrictBool] = Field(default=None, alias="hasMore") + data: List[ApplicationCIF] + __properties: ClassVar[List[str]] = ["hasMore", "data"] + + 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 ListApplicationCartItemFilters200Response 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 data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListApplicationCartItemFilters200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hasMore": obj.get("hasMore"), + "data": [ApplicationCIF.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/talon_one/models/loyalty_balance_with_tier.py b/talon_one/models/loyalty_balance_with_tier.py index 90597f9..1abdfc6 100644 --- a/talon_one/models/loyalty_balance_with_tier.py +++ b/talon_one/models/loyalty_balance_with_tier.py @@ -37,7 +37,7 @@ class LoyaltyBalanceWithTier(BaseModel): current_tier: Optional[Tier] = Field(default=None, description="Customer's current tier.", alias="currentTier") projected_tier: Optional[ProjectedTier] = Field(default=None, alias="projectedTier") points_to_next_tier: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of points required to move up a tier.", alias="pointsToNextTier") - next_tier_name: Optional[StrictStr] = Field(default=None, description="The name of the tier consecutive to the current tier.", alias="nextTierName") + next_tier_name: Optional[StrictStr] = Field(default=None, description="The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. ", alias="nextTierName") __properties: ClassVar[List[str]] = ["activePoints", "pendingPoints", "spentPoints", "expiredPoints", "negativePoints", "currentTier", "projectedTier", "pointsToNextTier", "nextTierName"] model_config = ConfigDict( diff --git a/talon_one/models/mcp_key.py b/talon_one/models/mcp_key.py new file mode 100644 index 0000000..f84e386 --- /dev/null +++ b/talon_one/models/mcp_key.py @@ -0,0 +1,103 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class MCPKey(BaseModel): + """ + MCPKey + """ # noqa: E501 + name: StrictStr = Field(description="Name for the MCP key.") + expiry_date: datetime = Field(description="The date the MCP key expires.", alias="expiryDate") + id: StrictInt = Field(description="ID of the MCP key.") + created_by: StrictInt = Field(description="ID of the user who created it.", alias="createdBy") + account_id: StrictInt = Field(description="ID of account the key is used for.", alias="accountID") + created: datetime = Field(description="The date the MCP key was created.") + disabled: Optional[StrictBool] = Field(default=None, description="The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted.") + last_used: Optional[datetime] = Field(default=None, description="The last time the MCP key was used.", alias="lastUsed") + __properties: ClassVar[List[str]] = ["name", "expiryDate", "id", "createdBy", "accountID", "created", "disabled", "lastUsed"] + + 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 MCPKey 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 MCPKey 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"), + "expiryDate": obj.get("expiryDate"), + "id": obj.get("id"), + "createdBy": obj.get("createdBy"), + "accountID": obj.get("accountID"), + "created": obj.get("created"), + "disabled": obj.get("disabled"), + "lastUsed": obj.get("lastUsed") + }) + return _obj + + diff --git a/talon_one/models/new_mcp_key.py b/talon_one/models/new_mcp_key.py new file mode 100644 index 0000000..b7ca696 --- /dev/null +++ b/talon_one/models/new_mcp_key.py @@ -0,0 +1,105 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NewMCPKey(BaseModel): + """ + NewMCPKey + """ # noqa: E501 + name: StrictStr = Field(description="Name for the MCP key.") + expiry_date: datetime = Field(description="The date the MCP key expires.", alias="expiryDate") + id: StrictInt = Field(description="ID of the MCP key.") + created_by: StrictInt = Field(description="ID of the user who created it.", alias="createdBy") + account_id: StrictInt = Field(description="ID of account the key is used for.", alias="accountID") + created: datetime = Field(description="The date the MCP key was created.") + disabled: Optional[StrictBool] = Field(default=None, description="The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted.") + last_used: Optional[datetime] = Field(default=None, description="The last time the MCP key was used.", alias="lastUsed") + key: StrictStr = Field(description="The generated MCP key. Only returned once on creation.") + __properties: ClassVar[List[str]] = ["name", "expiryDate", "id", "createdBy", "accountID", "created", "disabled", "lastUsed", "key"] + + 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 NewMCPKey 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 NewMCPKey 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"), + "expiryDate": obj.get("expiryDate"), + "id": obj.get("id"), + "createdBy": obj.get("createdBy"), + "accountID": obj.get("accountID"), + "created": obj.get("created"), + "disabled": obj.get("disabled"), + "lastUsed": obj.get("lastUsed"), + "key": obj.get("key") + }) + return _obj + + diff --git a/talon_one/models/new_reward.py b/talon_one/models/new_reward.py new file mode 100644 index 0000000..5f8597e --- /dev/null +++ b/talon_one/models/new_reward.py @@ -0,0 +1,97 @@ +# 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, StrictBool, StrictInt, StrictStr +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 NewReward(BaseModel): + """ + NewReward + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the reward.") + api_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique identifier used to reference the reward in API integrations.", alias="apiName") + 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.") + __properties: ClassVar[List[str]] = ["name", "apiName", "description", "applicationIds", "sandbox"] + + 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 NewReward 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 NewReward 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"), + "apiName": obj.get("apiName"), + "description": obj.get("description"), + "applicationIds": obj.get("applicationIds"), + "sandbox": obj.get("sandbox") + }) + return _obj + + diff --git a/talon_one/models/reward.py b/talon_one/models/reward.py new file mode 100644 index 0000000..7976ef4 --- /dev/null +++ b/talon_one/models/reward.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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 Reward(BaseModel): + """ + Reward + """ # noqa: E501 + id: StrictInt = Field(description="The internal ID of this entity.") + created: datetime = Field(description="The time this entity was created.") + account_id: StrictInt = Field(description="The ID of the account that owns this entity.", alias="accountId") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the reward.") + api_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique identifier used to reference the reward in API integrations.", alias="apiName") + 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.") + status: StrictStr = Field(description="The status of the reward.") + __properties: ClassVar[List[str]] = ["id", "created", "accountId", "name", "apiName", "description", "applicationIds", "sandbox", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + 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 Reward 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 Reward 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"), + "accountId": obj.get("accountId"), + "name": obj.get("name"), + "apiName": obj.get("apiName"), + "description": obj.get("description"), + "applicationIds": obj.get("applicationIds"), + "sandbox": obj.get("sandbox"), + "status": obj.get("status") + }) + return _obj + + diff --git a/talon_one/models/rule_metadata.py b/talon_one/models/rule_metadata.py index ce05d33..eced4fe 100644 --- a/talon_one/models/rule_metadata.py +++ b/talon_one/models/rule_metadata.py @@ -28,9 +28,9 @@ class RuleMetadata(BaseModel): RuleMetadata """ # noqa: E501 title: StrictStr = Field(description="A short description of the rule.") - display_name: Optional[StrictStr] = Field(default=None, description="A customer-facing name used to identify the reward defined within the rule.", alias="displayName") - display_description: Optional[StrictStr] = Field(default=None, description="A customer-facing description of the reward defined in 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="Data related to the reward, such as a vendor name, an image URL, or a content management system (CMS) ID. ", alias="relatedData") + 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") __properties: ClassVar[List[str]] = ["title", "displayName", "displayDescription", "relatedData"] model_config = ConfigDict( diff --git a/talon_one/models/set_discount_per_item_effect_props.py b/talon_one/models/set_discount_per_item_effect_props.py index fc37404..7038a08 100644 --- a/talon_one/models/set_discount_per_item_effect_props.py +++ b/talon_one/models/set_discount_per_item_effect_props.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -39,7 +39,8 @@ class SetDiscountPerItemEffectProps(BaseModel): bundle_name: Optional[StrictStr] = Field(default=None, description="The name of the bundle definition.", alias="bundleName") targeted_item_position: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The index of the targeted bundle item on which the applied discount is based.", alias="targetedItemPosition") targeted_item_sub_position: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The sub-position of the targeted bundle item on which the applied discount is based. ", alias="targetedItemSubPosition") - __properties: ClassVar[List[str]] = ["name", "value", "position", "subPosition", "desiredValue", "scope", "totalDiscount", "desiredTotalDiscount", "bundleIndex", "bundleName", "targetedItemPosition", "targetedItemSubPosition"] + 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", "position", "subPosition", "desiredValue", "scope", "totalDiscount", "desiredTotalDiscount", "bundleIndex", "bundleName", "targetedItemPosition", "targetedItemSubPosition", "excludedFromPriceHistory"] model_config = ConfigDict( validate_by_name=True, @@ -103,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bundleIndex": obj.get("bundleIndex"), "bundleName": obj.get("bundleName"), "targetedItemPosition": obj.get("targetedItemPosition"), - "targetedItemSubPosition": obj.get("targetedItemSubPosition") + "targetedItemSubPosition": obj.get("targetedItemSubPosition"), + "excludedFromPriceHistory": obj.get("excludedFromPriceHistory") }) return _obj 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 4b7132f..36b697e 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 @@ -29,8 +29,8 @@ class StrikethroughSetDiscountPerItemEffectProps(BaseModel): """ # noqa: E501 name: StrictStr = Field(description="effect name.") value: Optional[Any] - exclude_from_best_prior_price_history: Optional[StrictBool] = Field(default=None, alias="excludeFromBestPriorPriceHistory") - __properties: ClassVar[List[str]] = ["name", "value", "excludeFromBestPriorPriceHistory"] + excluded_from_price_history: Optional[StrictBool] = Field(default=None, alias="excludedFromPriceHistory") + __properties: ClassVar[List[str]] = ["name", "value", "excludedFromPriceHistory"] model_config = ConfigDict( validate_by_name=True, @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), "value": obj.get("value"), - "excludeFromBestPriorPriceHistory": obj.get("excludeFromBestPriorPriceHistory") + "excludedFromPriceHistory": obj.get("excludedFromPriceHistory") }) return _obj diff --git a/test/test_achievement_v2.py b/test/test_achievement_v2.py index 77d3e30..5639b78 100644 --- a/test/test_achievement_v2.py +++ b/test/test_achievement_v2.py @@ -59,6 +59,15 @@ def make_instance(self, include_optional) -> AchievementV2: return AchievementV2( id = 6, created = '2020-06-10T09:05:27.993483Z', + name = 'Order50Discount', + title = '50% off on 50th purchase.', + description = '50% off for every 50th purchase in a year.', + target = 50, + recurrence_policy = 'no_recurrence', + activation_policy = 'fixed_schedule', + sandbox = True, + subscribed_applications = [132, 97], + timezone = 'Europe/Berlin', user_id = 1234, ) """ diff --git a/test/test_best_prior_price_request.py b/test/test_best_prior_price_request.py index 622b954..4c6b61e 100644 --- a/test/test_best_prior_price_request.py +++ b/test/test_best_prior_price_request.py @@ -38,7 +38,6 @@ def make_instance(self, include_optional) -> BestPriorPriceRequest: skus = [comma, period], timeframe_end_date = '2020-11-10T23:00:00Z', timeframe = '30', - strict_end_date = True, timeframe_end_date_type = 'sale', target = talon_one.models.best_prior_target.BestPriorTarget( target_type = 'AUDIENCE', @@ -49,7 +48,7 @@ def make_instance(self, include_optional) -> BestPriorPriceRequest: skus = [comma, period], timeframe_end_date = '2020-11-10T23:00:00Z', timeframe = '30', - strict_end_date = True, + timeframe_end_date_type = 'sale', ) """ diff --git a/test/test_create_achievement_v2.py b/test/test_create_achievement_v2.py index 5c4b417..04e0f07 100644 --- a/test/test_create_achievement_v2.py +++ b/test/test_create_achievement_v2.py @@ -56,7 +56,6 @@ def make_instance(self, include_optional) -> CreateAchievementV2: description = '50% off for every 50th purchase in a year.', target = 50, sandbox = True, - subscribed_applications = [132, 97], timezone = 'Europe/Berlin', ) """ diff --git a/test/test_create_mcp_key.py b/test/test_create_mcp_key.py new file mode 100644 index 0000000..30152ba --- /dev/null +++ b/test/test_create_mcp_key.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.create_mcp_key import CreateMCPKey + +class TestCreateMCPKey(unittest.TestCase): + """CreateMCPKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateMCPKey: + """Test CreateMCPKey + 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 `CreateMCPKey` + """ + model = CreateMCPKey() + if include_optional: + return CreateMCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z' + ) + else: + return CreateMCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z', + ) + """ + + def testCreateMCPKey(self): + """Test CreateMCPKey""" + # 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_experiment_segment_insight.py b/test/test_experiment_segment_insight.py new file mode 100644 index 0000000..ab5cb47 --- /dev/null +++ b/test/test_experiment_segment_insight.py @@ -0,0 +1,72 @@ +# 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.experiment_segment_insight import ExperimentSegmentInsight + +class TestExperimentSegmentInsight(unittest.TestCase): + """ExperimentSegmentInsight unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentSegmentInsight: + """Test ExperimentSegmentInsight + 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 `ExperimentSegmentInsight` + """ + model = ExperimentSegmentInsight() + if include_optional: + return ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ] + ) + else: + return ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ], + ) + """ + + def testExperimentSegmentInsight(self): + """Test ExperimentSegmentInsight""" + # 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_experiment_segment_insight_metric.py b/test/test_experiment_segment_insight_metric.py new file mode 100644 index 0000000..67fee4f --- /dev/null +++ b/test/test_experiment_segment_insight_metric.py @@ -0,0 +1,80 @@ +# 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.experiment_segment_insight_metric import ExperimentSegmentInsightMetric + +class TestExperimentSegmentInsightMetric(unittest.TestCase): + """ExperimentSegmentInsightMetric unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentSegmentInsightMetric: + """Test ExperimentSegmentInsightMetric + 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 `ExperimentSegmentInsightMetric` + """ + model = ExperimentSegmentInsightMetric() + if include_optional: + return ExperimentSegmentInsightMetric( + metric = 'avg_session_value', + segments = [ + talon_one.models.experiment_segment_insight.ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ], ) + ] + ) + else: + return ExperimentSegmentInsightMetric( + metric = 'avg_session_value', + segments = [ + talon_one.models.experiment_segment_insight.ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ], ) + ], + ) + """ + + def testExperimentSegmentInsightMetric(self): + """Test ExperimentSegmentInsightMetric""" + # 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_experiment_segment_insight_variant.py b/test/test_experiment_segment_insight_variant.py new file mode 100644 index 0000000..704af41 --- /dev/null +++ b/test/test_experiment_segment_insight_variant.py @@ -0,0 +1,58 @@ +# 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.experiment_segment_insight_variant import ExperimentSegmentInsightVariant + +class TestExperimentSegmentInsightVariant(unittest.TestCase): + """ExperimentSegmentInsightVariant unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentSegmentInsightVariant: + """Test ExperimentSegmentInsightVariant + 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 `ExperimentSegmentInsightVariant` + """ + model = ExperimentSegmentInsightVariant() + if include_optional: + return ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13 + ) + else: + return ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, + ) + """ + + def testExperimentSegmentInsightVariant(self): + """Test ExperimentSegmentInsightVariant""" + # 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_experiment_segment_insights.py b/test/test_experiment_segment_insights.py new file mode 100644 index 0000000..eaf6a4c --- /dev/null +++ b/test/test_experiment_segment_insights.py @@ -0,0 +1,92 @@ +# 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.experiment_segment_insights import ExperimentSegmentInsights + +class TestExperimentSegmentInsights(unittest.TestCase): + """ExperimentSegmentInsights unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentSegmentInsights: + """Test ExperimentSegmentInsights + 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 `ExperimentSegmentInsights` + """ + model = ExperimentSegmentInsights() + if include_optional: + return ExperimentSegmentInsights( + metrics = [ + talon_one.models.experiment_segment_insight_metric.ExperimentSegmentInsightMetric( + metric = 'avg_session_value', + segments = [ + talon_one.models.experiment_segment_insight.ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ], ) + ], ) + ], + total_segments_tested = 24, + dimensions_tested = 3, + reason = '' + ) + else: + return ExperimentSegmentInsights( + metrics = [ + talon_one.models.experiment_segment_insight_metric.ExperimentSegmentInsightMetric( + metric = 'avg_session_value', + segments = [ + talon_one.models.experiment_segment_insight.ExperimentSegmentInsight( + dimension = 'cart_value', + bucket = 'high', + confidence = 99.2, + winner_variant_id = 42, + variants = [ + talon_one.models.experiment_segment_insight_variant.ExperimentSegmentInsightVariant( + variant_id = 41, + variant_name = 'Control', + sessions_count = 161, + value = 13.13, ) + ], ) + ], ) + ], + total_segments_tested = 24, + dimensions_tested = 3, + reason = '', + ) + """ + + def testExperimentSegmentInsights(self): + """Test ExperimentSegmentInsights""" + # 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_experiment_verdict.py b/test/test_experiment_verdict.py new file mode 100644 index 0000000..d86fdf6 --- /dev/null +++ b/test/test_experiment_verdict.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.experiment_verdict import ExperimentVerdict + +class TestExperimentVerdict(unittest.TestCase): + """ExperimentVerdict unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentVerdict: + """Test ExperimentVerdict + 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 `ExperimentVerdict` + """ + model = ExperimentVerdict() + if include_optional: + return ExperimentVerdict( + winner_variant_name = '', + verdict_summary = '', + key_findings = [ + '' + ], + ai_confidence_level = '', + recommendation = '' + ) + else: + return ExperimentVerdict( + winner_variant_name = '', + verdict_summary = '', + key_findings = [ + '' + ], + ai_confidence_level = '', + recommendation = '', + ) + """ + + def testExperimentVerdict(self): + """Test ExperimentVerdict""" + # 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_experiment_verdict_response.py b/test/test_experiment_verdict_response.py new file mode 100644 index 0000000..57225be --- /dev/null +++ b/test/test_experiment_verdict_response.py @@ -0,0 +1,68 @@ +# 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.experiment_verdict_response import ExperimentVerdictResponse + +class TestExperimentVerdictResponse(unittest.TestCase): + """ExperimentVerdictResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExperimentVerdictResponse: + """Test ExperimentVerdictResponse + 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 `ExperimentVerdictResponse` + """ + model = ExperimentVerdictResponse() + if include_optional: + return ExperimentVerdictResponse( + verdict = talon_one.models.experiment_verdict.ExperimentVerdict( + winner_variant_name = '', + verdict_summary = '', + key_findings = [ + '' + ], + ai_confidence_level = '', + recommendation = '', ), + generated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ExperimentVerdictResponse( + verdict = talon_one.models.experiment_verdict.ExperimentVerdict( + winner_variant_name = '', + verdict_summary = '', + key_findings = [ + '' + ], + ai_confidence_level = '', + recommendation = '', ), + generated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testExperimentVerdictResponse(self): + """Test ExperimentVerdictResponse""" + # 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_api.py b/test/test_integration_api.py index adf0f0e..3f94008 100644 --- a/test/test_integration_api.py +++ b/test/test_integration_api.py @@ -187,6 +187,13 @@ def test_get_reserved_customers(self) -> None: """ pass + def test_integration_get_all_campaigns(self) -> None: + """Test case for integration_get_all_campaigns + + List all running campaigns + """ + pass + def test_link_loyalty_card_to_profile(self) -> None: """Test case for link_loyalty_card_to_profile diff --git a/test/test_integration_get_all_campaigns200_response.py b/test/test_integration_get_all_campaigns200_response.py new file mode 100644 index 0000000..31e1149 --- /dev/null +++ b/test/test_integration_get_all_campaigns200_response.py @@ -0,0 +1,58 @@ +# 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_get_all_campaigns200_response import IntegrationGetAllCampaigns200Response + +class TestIntegrationGetAllCampaigns200Response(unittest.TestCase): + """IntegrationGetAllCampaigns200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IntegrationGetAllCampaigns200Response: + """Test IntegrationGetAllCampaigns200Response + 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 `IntegrationGetAllCampaigns200Response` + """ + model = IntegrationGetAllCampaigns200Response() + if include_optional: + return IntegrationGetAllCampaigns200Response( + has_more = True, + data = [ + null + ] + ) + else: + return IntegrationGetAllCampaigns200Response( + has_more = True, + data = [ + null + ], + ) + """ + + def testIntegrationGetAllCampaigns200Response(self): + """Test IntegrationGetAllCampaigns200Response""" + # 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_ledger_info.py b/test/test_ledger_info.py index d91d56f..77408ab 100644 --- a/test/test_ledger_info.py +++ b/test/test_ledger_info.py @@ -49,7 +49,8 @@ def make_instance(self, include_optional) -> LedgerInfo: start_date = '2021-05-03T12:32:00Z07:00', expiry_date = '2022-08-02T15:04:05Z07:00', downgrade_policy = 'one_down', ), - points_to_next_tier = 20 + points_to_next_tier = 20, + next_tier_name = 'Silver' ) else: return LedgerInfo( diff --git a/test/test_list_application_cart_item_filters200_response.py b/test/test_list_application_cart_item_filters200_response.py new file mode 100644 index 0000000..c339512 --- /dev/null +++ b/test/test_list_application_cart_item_filters200_response.py @@ -0,0 +1,57 @@ +# 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.list_application_cart_item_filters200_response import ListApplicationCartItemFilters200Response + +class TestListApplicationCartItemFilters200Response(unittest.TestCase): + """ListApplicationCartItemFilters200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListApplicationCartItemFilters200Response: + """Test ListApplicationCartItemFilters200Response + 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 `ListApplicationCartItemFilters200Response` + """ + model = ListApplicationCartItemFilters200Response() + if include_optional: + return ListApplicationCartItemFilters200Response( + has_more = True, + data = [ + null + ] + ) + else: + return ListApplicationCartItemFilters200Response( + data = [ + null + ], + ) + """ + + def testListApplicationCartItemFilters200Response(self): + """Test ListApplicationCartItemFilters200Response""" + # 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_loyalty_balance_with_tier.py b/test/test_loyalty_balance_with_tier.py index 022e124..c111dc3 100644 --- a/test/test_loyalty_balance_with_tier.py +++ b/test/test_loyalty_balance_with_tier.py @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> LoyaltyBalanceWithTier: stay_in_tier_points = 2, projected_tier_name = 'Tier 1', ), points_to_next_tier = 20, - next_tier_name = 'silver' + next_tier_name = 'Silver' ) else: return LoyaltyBalanceWithTier( diff --git a/test/test_management_api.py b/test/test_management_api.py index 72caa08..099e0e5 100644 --- a/test/test_management_api.py +++ b/test/test_management_api.py @@ -117,8 +117,8 @@ def test_create_coupons(self) -> None: """ pass - def test_create_coupons_async(self) -> None: - """Test case for create_coupons_async + def test_create_coupons_asynchronously(self) -> None: + """Test case for create_coupons_asynchronously Create coupons asynchronously """ @@ -327,6 +327,13 @@ def test_export_campaign_stores(self) -> None: """ pass + def test_export_campaign_value_map(self) -> None: + """Test case for export_campaign_value_map + + Export campaign value map + """ + pass + def test_export_collection_items(self) -> None: """Test case for export_collection_items @@ -495,6 +502,13 @@ def test_get_application_api_health(self) -> None: """ pass + def test_get_application_cart_item_filter_expression(self) -> None: + """Test case for get_application_cart_item_filter_expression + + Get Application cart item filter expression + """ + pass + def test_get_application_customer(self) -> None: """Test case for get_application_customer @@ -999,6 +1013,13 @@ def test_list_all_roles_v2(self) -> None: """ pass + def test_list_application_cart_item_filters(self) -> None: + """Test case for list_application_cart_item_filters + + List Application cart item filters + """ + pass + def test_list_campaign_store_budget_limits(self) -> None: """Test case for list_campaign_store_budget_limits diff --git a/test/test_mcp_key.py b/test/test_mcp_key.py new file mode 100644 index 0000000..47bc5e9 --- /dev/null +++ b/test/test_mcp_key.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.mcp_key import MCPKey + +class TestMCPKey(unittest.TestCase): + """MCPKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MCPKey: + """Test MCPKey + 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 `MCPKey` + """ + model = MCPKey() + if include_optional: + return MCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z', + id = 34, + created_by = 280, + account_id = 13, + created = '2026-03-02T16:46:17.758585Z', + disabled = True, + last_used = '2026-03-02T16:46:17.758585Z' + ) + else: + return MCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z', + id = 34, + created_by = 280, + account_id = 13, + created = '2026-03-02T16:46:17.758585Z', + ) + """ + + def testMCPKey(self): + """Test MCPKey""" + # 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_new_mcp_key.py b/test/test_new_mcp_key.py new file mode 100644 index 0000000..9c967ac --- /dev/null +++ b/test/test_new_mcp_key.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.new_mcp_key import NewMCPKey + +class TestNewMCPKey(unittest.TestCase): + """NewMCPKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NewMCPKey: + """Test NewMCPKey + 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 `NewMCPKey` + """ + model = NewMCPKey() + if include_optional: + return NewMCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z', + id = 34, + created_by = 280, + account_id = 13, + created = '2026-03-02T16:46:17.758585Z', + disabled = True, + last_used = '2026-03-02T16:46:17.758585Z', + key = 'f45f90d21dcd9bac965c45e547e9754a3196891d09948e35adbcbedc4e9e4b01' + ) + else: + return NewMCPKey( + name = 'My MCP key', + expiry_date = '2026-08-24T14:00:00Z', + id = 34, + created_by = 280, + account_id = 13, + created = '2026-03-02T16:46:17.758585Z', + key = 'f45f90d21dcd9bac965c45e547e9754a3196891d09948e35adbcbedc4e9e4b01', + ) + """ + + def testNewMCPKey(self): + """Test NewMCPKey""" + # 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_new_reward.py b/test/test_new_reward.py new file mode 100644 index 0000000..c42ea74 --- /dev/null +++ b/test/test_new_reward.py @@ -0,0 +1,59 @@ +# 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_reward import NewReward + +class TestNewReward(unittest.TestCase): + """NewReward unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NewReward: + """Test NewReward + 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 `NewReward` + """ + model = NewReward() + if include_optional: + return NewReward( + name = 'Free Coffee', + api_name = 'free-coffee', + description = 'This reward gets you one free coffee.', + application_ids = [1, 2, 3], + sandbox = True + ) + else: + return NewReward( + name = 'Free Coffee', + api_name = 'free-coffee', + application_ids = [1, 2, 3], + sandbox = True, + ) + """ + + def testNewReward(self): + """Test NewReward""" + # 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 new file mode 100644 index 0000000..ae35cdc --- /dev/null +++ b/test/test_reward.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.reward import Reward + +class TestReward(unittest.TestCase): + """Reward unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Reward: + """Test Reward + 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 `Reward` + """ + model = Reward() + if include_optional: + return Reward( + id = 6, + created = '2020-06-10T09:05:27.993483Z', + account_id = 3886, + name = 'Free Coffee', + api_name = 'free-coffee', + description = 'This reward gets you one free coffee.', + application_ids = [1, 2, 3], + sandbox = True, + status = 'active' + ) + else: + return Reward( + id = 6, + created = '2020-06-10T09:05:27.993483Z', + account_id = 3886, + name = 'Free Coffee', + api_name = 'free-coffee', + application_ids = [1, 2, 3], + sandbox = True, + status = 'active', + ) + """ + + def testReward(self): + """Test Reward""" + # 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_set_discount_per_item_effect_props.py b/test/test_set_discount_per_item_effect_props.py index 9d558b7..0d49925 100644 --- a/test/test_set_discount_per_item_effect_props.py +++ b/test/test_set_discount_per_item_effect_props.py @@ -46,7 +46,8 @@ def make_instance(self, include_optional) -> SetDiscountPerItemEffectProps: bundle_index = 56, bundle_name = '', targeted_item_position = 1.337, - targeted_item_sub_position = 1.337 + targeted_item_sub_position = 1.337, + excluded_from_price_history = True ) else: return SetDiscountPerItemEffectProps( diff --git a/test/test_strikethrough_set_discount_per_item_effect_props.py b/test/test_strikethrough_set_discount_per_item_effect_props.py index b48bf24..fd94dad 100644 --- a/test/test_strikethrough_set_discount_per_item_effect_props.py +++ b/test/test_strikethrough_set_discount_per_item_effect_props.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> StrikethroughSetDiscountPerItemEffe return StrikethroughSetDiscountPerItemEffectProps( name = '1EuroOff', value = None, - exclude_from_best_prior_price_history = True + excluded_from_price_history = True ) else: return StrikethroughSetDiscountPerItemEffectProps(