diff --git a/.travis.yml b/.travis.yml index fa1f1fd..443140c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build talon_one.gemspec - - gem install ./talon_one-5.0.0.gem + - gem install ./talon_one-6.0.0.gem diff --git a/README.md b/README.md index 73eae6c..a97d5c4 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: -- Package version: 5.0.0 +- Package version: 6.0.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -37,16 +37,16 @@ gem build talon_one.gemspec Then either install the gem locally: ```shell -gem install ./talon_one-5.0.0.gem +gem install ./talon_one-6.0.0.gem ``` -(for development, run `gem install --dev ./talon_one-5.0.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./talon_one-6.0.0.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'talon_one', '~> 5.0.0' + gem 'talon_one', '~> 6.0.0' ### Install from Git @@ -203,6 +203,7 @@ Class | Method | HTTP request | Description *TalonOne::IntegrationApi* | [**delete_audience_v2**](docs/IntegrationApi.md#delete_audience_v2) | **DELETE** /v2/audiences/{audienceId} | Delete audience *TalonOne::IntegrationApi* | [**delete_coupon_reservation**](docs/IntegrationApi.md#delete_coupon_reservation) | **DELETE** /v1/coupon_reservations/{couponValue} | Delete coupon reservations *TalonOne::IntegrationApi* | [**delete_customer_data**](docs/IntegrationApi.md#delete_customer_data) | **DELETE** /v1/customer_data/{integrationId} | Delete customer's personal data +*TalonOne::IntegrationApi* | [**generate_loyalty_card**](docs/IntegrationApi.md#generate_loyalty_card) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card *TalonOne::IntegrationApi* | [**get_customer_inventory**](docs/IntegrationApi.md#get_customer_inventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | List customer data *TalonOne::IntegrationApi* | [**get_customer_session**](docs/IntegrationApi.md#get_customer_session) | **GET** /v2/customer_sessions/{customerSessionId} | Get customer session *TalonOne::IntegrationApi* | [**get_loyalty_balances**](docs/IntegrationApi.md#get_loyalty_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points @@ -223,7 +224,7 @@ Class | Method | HTTP request | Description *TalonOne::IntegrationApi* | [**update_customer_profile_v2**](docs/IntegrationApi.md#update_customer_profile_v2) | **PUT** /v2/customer_profiles/{integrationId} | Update customer profile *TalonOne::IntegrationApi* | [**update_customer_profiles_v2**](docs/IntegrationApi.md#update_customer_profiles_v2) | **PUT** /v2/customer_profiles | Update multiple customer profiles *TalonOne::IntegrationApi* | [**update_customer_session_v2**](docs/IntegrationApi.md#update_customer_session_v2) | **PUT** /v2/customer_sessions/{customerSessionId} | Update customer session -*TalonOne::ManagementApi* | [**activate_user_by_email**](docs/ManagementApi.md#activate_user_by_email) | **POST** /v1/users/activate | Activate user by email address +*TalonOne::ManagementApi* | [**activate_user_by_email**](docs/ManagementApi.md#activate_user_by_email) | **POST** /v1/users/activate | Enable user by email address *TalonOne::ManagementApi* | [**add_loyalty_card_points**](docs/ManagementApi.md#add_loyalty_card_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card *TalonOne::ManagementApi* | [**add_loyalty_points**](docs/ManagementApi.md#add_loyalty_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile *TalonOne::ManagementApi* | [**copy_campaign_to_applications**](docs/ManagementApi.md#copy_campaign_to_applications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application @@ -231,17 +232,19 @@ Class | Method | HTTP request | Description *TalonOne::ManagementApi* | [**create_achievement**](docs/ManagementApi.md#create_achievement) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | Create achievement *TalonOne::ManagementApi* | [**create_additional_cost**](docs/ManagementApi.md#create_additional_cost) | **POST** /v1/additional_costs | Create additional cost *TalonOne::ManagementApi* | [**create_attribute**](docs/ManagementApi.md#create_attribute) | **POST** /v1/attributes | Create custom attribute +*TalonOne::ManagementApi* | [**create_batch_loyalty_cards**](docs/ManagementApi.md#create_batch_loyalty_cards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/cards/batch | Create loyalty cards *TalonOne::ManagementApi* | [**create_campaign_from_template**](docs/ManagementApi.md#create_campaign_from_template) | **POST** /v1/applications/{applicationId}/create_campaign_from_template | Create campaign from campaign template *TalonOne::ManagementApi* | [**create_collection**](docs/ManagementApi.md#create_collection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection *TalonOne::ManagementApi* | [**create_coupons**](docs/ManagementApi.md#create_coupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons *TalonOne::ManagementApi* | [**create_coupons_async**](docs/ManagementApi.md#create_coupons_async) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously +*TalonOne::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 *TalonOne::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 *TalonOne::ManagementApi* | [**create_invite_email**](docs/ManagementApi.md#create_invite_email) | **POST** /v1/invite_emails | Resend invitation email *TalonOne::ManagementApi* | [**create_invite_v2**](docs/ManagementApi.md#create_invite_v2) | **POST** /v2/invites | Invite user *TalonOne::ManagementApi* | [**create_password_recovery_email**](docs/ManagementApi.md#create_password_recovery_email) | **POST** /v1/password_recovery_emails | Request a password reset *TalonOne::ManagementApi* | [**create_session**](docs/ManagementApi.md#create_session) | **POST** /v1/sessions | Create session *TalonOne::ManagementApi* | [**create_store**](docs/ManagementApi.md#create_store) | **POST** /v1/applications/{applicationId}/stores | Create store -*TalonOne::ManagementApi* | [**deactivate_user_by_email**](docs/ManagementApi.md#deactivate_user_by_email) | **POST** /v1/users/deactivate | Deactivate user by email address +*TalonOne::ManagementApi* | [**deactivate_user_by_email**](docs/ManagementApi.md#deactivate_user_by_email) | **POST** /v1/users/deactivate | Disable user by email address *TalonOne::ManagementApi* | [**deduct_loyalty_card_points**](docs/ManagementApi.md#deduct_loyalty_card_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card *TalonOne::ManagementApi* | [**delete_account_collection**](docs/ManagementApi.md#delete_account_collection) | **DELETE** /v1/collections/{collectionId} | Delete account-level collection *TalonOne::ManagementApi* | [**delete_achievement**](docs/ManagementApi.md#delete_achievement) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Delete achievement @@ -255,9 +258,11 @@ Class | Method | HTTP request | Description *TalonOne::ManagementApi* | [**delete_user**](docs/ManagementApi.md#delete_user) | **DELETE** /v1/users/{userId} | Delete user *TalonOne::ManagementApi* | [**delete_user_by_email**](docs/ManagementApi.md#delete_user_by_email) | **POST** /v1/users/delete | Delete user by email address *TalonOne::ManagementApi* | [**destroy_session**](docs/ManagementApi.md#destroy_session) | **DELETE** /v1/sessions | Destroy session +*TalonOne::ManagementApi* | [**disconnect_campaign_stores**](docs/ManagementApi.md#disconnect_campaign_stores) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores *TalonOne::ManagementApi* | [**export_account_collection_items**](docs/ManagementApi.md#export_account_collection_items) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items *TalonOne::ManagementApi* | [**export_achievements**](docs/ManagementApi.md#export_achievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data *TalonOne::ManagementApi* | [**export_audiences_memberships**](docs/ManagementApi.md#export_audiences_memberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members +*TalonOne::ManagementApi* | [**export_campaign_stores**](docs/ManagementApi.md#export_campaign_stores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores *TalonOne::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 *TalonOne::ManagementApi* | [**export_coupons**](docs/ManagementApi.md#export_coupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons *TalonOne::ManagementApi* | [**export_customer_sessions**](docs/ManagementApi.md#export_customer_sessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -267,6 +272,7 @@ Class | Method | HTTP request | Description *TalonOne::ManagementApi* | [**export_loyalty_balances**](docs/ManagementApi.md#export_loyalty_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances | Export customer loyalty balances *TalonOne::ManagementApi* | [**export_loyalty_card_balances**](docs/ManagementApi.md#export_loyalty_card_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs *TalonOne::ManagementApi* | [**export_loyalty_card_ledger**](docs/ManagementApi.md#export_loyalty_card_ledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log +*TalonOne::ManagementApi* | [**export_loyalty_cards**](docs/ManagementApi.md#export_loyalty_cards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards *TalonOne::ManagementApi* | [**export_loyalty_ledger**](docs/ManagementApi.md#export_loyalty_ledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs *TalonOne::ManagementApi* | [**export_pool_giveaways**](docs/ManagementApi.md#export_pool_giveaways) | **GET** /v1/giveaways/pools/{poolId}/export | Export giveaway codes of a giveaway pool *TalonOne::ManagementApi* | [**export_referrals**](docs/ManagementApi.md#export_referrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals @@ -336,6 +342,7 @@ Class | Method | HTTP request | Description *TalonOne::ManagementApi* | [**import_account_collection**](docs/ManagementApi.md#import_account_collection) | **POST** /v1/collections/{collectionId}/import | Import data into existing account-level collection *TalonOne::ManagementApi* | [**import_allowed_list**](docs/ManagementApi.md#import_allowed_list) | **POST** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute *TalonOne::ManagementApi* | [**import_audiences_memberships**](docs/ManagementApi.md#import_audiences_memberships) | **POST** /v1/audiences/{audienceId}/memberships/import | Import audience members +*TalonOne::ManagementApi* | [**import_campaign_stores**](docs/ManagementApi.md#import_campaign_stores) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/import | Import stores *TalonOne::ManagementApi* | [**import_collection**](docs/ManagementApi.md#import_collection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data into existing campaign-level collection *TalonOne::ManagementApi* | [**import_coupons**](docs/ManagementApi.md#import_coupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons *TalonOne::ManagementApi* | [**import_loyalty_cards**](docs/ManagementApi.md#import_loyalty_cards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards @@ -352,11 +359,21 @@ Class | Method | HTTP request | Description *TalonOne::ManagementApi* | [**list_collections_in_application**](docs/ManagementApi.md#list_collections_in_application) | **GET** /v1/applications/{applicationId}/collections | List collections in Application *TalonOne::ManagementApi* | [**list_stores**](docs/ManagementApi.md#list_stores) | **GET** /v1/applications/{applicationId}/stores | List stores *TalonOne::ManagementApi* | [**notification_activation**](docs/ManagementApi.md#notification_activation) | **PUT** /v1/notifications/{notificationId}/activation | Activate or deactivate notification +*TalonOne::ManagementApi* | [**okta_event_handler_challenge**](docs/ManagementApi.md#okta_event_handler_challenge) | **GET** /v1/provisioning/okta | Validate Okta API ownership *TalonOne::ManagementApi* | [**post_added_deducted_points_notification**](docs/ManagementApi.md#post_added_deducted_points_notification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points | Create notification about added or deducted loyalty points *TalonOne::ManagementApi* | [**post_catalogs_strikethrough_notification**](docs/ManagementApi.md#post_catalogs_strikethrough_notification) | **POST** /v1/applications/{applicationId}/catalogs/notifications/strikethrough | Create strikethrough notification *TalonOne::ManagementApi* | [**post_pending_points_notification**](docs/ManagementApi.md#post_pending_points_notification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points | Create notification about pending loyalty points *TalonOne::ManagementApi* | [**remove_loyalty_points**](docs/ManagementApi.md#remove_loyalty_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile *TalonOne::ManagementApi* | [**reset_password**](docs/ManagementApi.md#reset_password) | **POST** /v1/reset_password | Reset password +*TalonOne::ManagementApi* | [**scim_create_user**](docs/ManagementApi.md#scim_create_user) | **POST** /v1/provisioning/scim/Users | Create SCIM user +*TalonOne::ManagementApi* | [**scim_delete_user**](docs/ManagementApi.md#scim_delete_user) | **DELETE** /v1/provisioning/scim/Users/{userId} | Delete SCIM user +*TalonOne::ManagementApi* | [**scim_get_resource_types**](docs/ManagementApi.md#scim_get_resource_types) | **GET** /v1/provisioning/scim/ResourceTypes | List supported SCIM resource types +*TalonOne::ManagementApi* | [**scim_get_schemas**](docs/ManagementApi.md#scim_get_schemas) | **GET** /v1/provisioning/scim/Schemas | List supported SCIM schemas +*TalonOne::ManagementApi* | [**scim_get_service_provider_config**](docs/ManagementApi.md#scim_get_service_provider_config) | **GET** /v1/provisioning/scim/ServiceProviderConfig | Get SCIM service provider configuration +*TalonOne::ManagementApi* | [**scim_get_user**](docs/ManagementApi.md#scim_get_user) | **GET** /v1/provisioning/scim/Users/{userId} | Get SCIM user +*TalonOne::ManagementApi* | [**scim_get_users**](docs/ManagementApi.md#scim_get_users) | **GET** /v1/provisioning/scim/Users | List SCIM users +*TalonOne::ManagementApi* | [**scim_patch_user**](docs/ManagementApi.md#scim_patch_user) | **PATCH** /v1/provisioning/scim/Users/{userId} | Update SCIM user attributes +*TalonOne::ManagementApi* | [**scim_replace_user_attributes**](docs/ManagementApi.md#scim_replace_user_attributes) | **PUT** /v1/provisioning/scim/Users/{userId} | Update SCIM user *TalonOne::ManagementApi* | [**search_coupons_advanced_application_wide_without_total_count**](docs/ManagementApi.md#search_coupons_advanced_application_wide_without_total_count) | **POST** /v1/applications/{applicationId}/coupons_search_advanced/no_total | List coupons that match the given attributes (without total count) *TalonOne::ManagementApi* | [**search_coupons_advanced_without_total_count**](docs/ManagementApi.md#search_coupons_advanced_without_total_count) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total | List coupons that match the given attributes in campaign (without total count) *TalonOne::ManagementApi* | [**transfer_loyalty_card**](docs/ManagementApi.md#transfer_loyalty_card) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer | Transfer card data @@ -404,21 +421,17 @@ Class | Method | HTTP request | Description - [TalonOne::AddedDeductedPointsNotificationPolicy](docs/AddedDeductedPointsNotificationPolicy.md) - [TalonOne::AdditionalCampaignProperties](docs/AdditionalCampaignProperties.md) - [TalonOne::AdditionalCost](docs/AdditionalCost.md) + - [TalonOne::AnalyticsDataPoint](docs/AnalyticsDataPoint.md) + - [TalonOne::AnalyticsDataPointWithTrend](docs/AnalyticsDataPointWithTrend.md) + - [TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate](docs/AnalyticsDataPointWithTrendAndInfluencedRate.md) + - [TalonOne::AnalyticsDataPointWithTrendAndUplift](docs/AnalyticsDataPointWithTrendAndUplift.md) - [TalonOne::Application](docs/Application.md) - [TalonOne::ApplicationAPIKey](docs/ApplicationAPIKey.md) - [TalonOne::ApplicationAnalyticsDataPoint](docs/ApplicationAnalyticsDataPoint.md) - - [TalonOne::ApplicationAnalyticsDataPointAvgItemsPerSession](docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md) - - [TalonOne::ApplicationAnalyticsDataPointAvgSessionValue](docs/ApplicationAnalyticsDataPointAvgSessionValue.md) - - [TalonOne::ApplicationAnalyticsDataPointSessionsCount](docs/ApplicationAnalyticsDataPointSessionsCount.md) - - [TalonOne::ApplicationAnalyticsDataPointTotalRevenue](docs/ApplicationAnalyticsDataPointTotalRevenue.md) - [TalonOne::ApplicationApiHealth](docs/ApplicationApiHealth.md) + - [TalonOne::ApplicationCIF](docs/ApplicationCIF.md) + - [TalonOne::ApplicationCIFExpression](docs/ApplicationCIFExpression.md) - [TalonOne::ApplicationCampaignAnalytics](docs/ApplicationCampaignAnalytics.md) - - [TalonOne::ApplicationCampaignAnalyticsAvgItemsPerSession](docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md) - - [TalonOne::ApplicationCampaignAnalyticsAvgSessionValue](docs/ApplicationCampaignAnalyticsAvgSessionValue.md) - - [TalonOne::ApplicationCampaignAnalyticsCouponsCount](docs/ApplicationCampaignAnalyticsCouponsCount.md) - - [TalonOne::ApplicationCampaignAnalyticsSessionsCount](docs/ApplicationCampaignAnalyticsSessionsCount.md) - - [TalonOne::ApplicationCampaignAnalyticsTotalDiscounts](docs/ApplicationCampaignAnalyticsTotalDiscounts.md) - - [TalonOne::ApplicationCampaignAnalyticsTotalRevenue](docs/ApplicationCampaignAnalyticsTotalRevenue.md) - [TalonOne::ApplicationCampaignStats](docs/ApplicationCampaignStats.md) - [TalonOne::ApplicationCustomer](docs/ApplicationCustomer.md) - [TalonOne::ApplicationCustomerEntity](docs/ApplicationCustomerEntity.md) @@ -430,6 +443,7 @@ Class | Method | HTTP request | Description - [TalonOne::ApplicationSessionEntity](docs/ApplicationSessionEntity.md) - [TalonOne::ApplicationStoreEntity](docs/ApplicationStoreEntity.md) - [TalonOne::AsyncCouponCreationResponse](docs/AsyncCouponCreationResponse.md) + - [TalonOne::AsyncCouponDeletionJobResponse](docs/AsyncCouponDeletionJobResponse.md) - [TalonOne::Attribute](docs/Attribute.md) - [TalonOne::AttributesMandatory](docs/AttributesMandatory.md) - [TalonOne::AttributesSettings](docs/AttributesSettings.md) @@ -455,6 +469,7 @@ Class | Method | HTTP request | Description - [TalonOne::CampaignAnalytics](docs/CampaignAnalytics.md) - [TalonOne::CampaignBudget](docs/CampaignBudget.md) - [TalonOne::CampaignCollection](docs/CampaignCollection.md) + - [TalonOne::CampaignCollectionEditedNotification](docs/CampaignCollectionEditedNotification.md) - [TalonOne::CampaignCollectionWithoutPayload](docs/CampaignCollectionWithoutPayload.md) - [TalonOne::CampaignCopy](docs/CampaignCopy.md) - [TalonOne::CampaignCreatedNotification](docs/CampaignCreatedNotification.md) @@ -475,9 +490,12 @@ Class | Method | HTTP request | Description - [TalonOne::CampaignSetLeafNode](docs/CampaignSetLeafNode.md) - [TalonOne::CampaignSetNode](docs/CampaignSetNode.md) - [TalonOne::CampaignStateChangedNotification](docs/CampaignStateChangedNotification.md) + - [TalonOne::CampaignStoreBudget](docs/CampaignStoreBudget.md) - [TalonOne::CampaignTemplate](docs/CampaignTemplate.md) - [TalonOne::CampaignTemplateCollection](docs/CampaignTemplateCollection.md) - [TalonOne::CampaignTemplateParams](docs/CampaignTemplateParams.md) + - [TalonOne::CampaignVersions](docs/CampaignVersions.md) + - [TalonOne::CardAddedDeductedPointsNotificationPolicy](docs/CardAddedDeductedPointsNotificationPolicy.md) - [TalonOne::CardExpiringPointsNotificationPolicy](docs/CardExpiringPointsNotificationPolicy.md) - [TalonOne::CardExpiringPointsNotificationTrigger](docs/CardExpiringPointsNotificationTrigger.md) - [TalonOne::CardLedgerPointsEntryIntegrationAPI](docs/CardLedgerPointsEntryIntegrationAPI.md) @@ -501,6 +519,8 @@ Class | Method | HTTP request | Description - [TalonOne::CouponConstraints](docs/CouponConstraints.md) - [TalonOne::CouponCreatedEffectProps](docs/CouponCreatedEffectProps.md) - [TalonOne::CouponCreationJob](docs/CouponCreationJob.md) + - [TalonOne::CouponDeletionFilters](docs/CouponDeletionFilters.md) + - [TalonOne::CouponDeletionJob](docs/CouponDeletionJob.md) - [TalonOne::CouponLimitConfigs](docs/CouponLimitConfigs.md) - [TalonOne::CouponRejectionReason](docs/CouponRejectionReason.md) - [TalonOne::CouponReservations](docs/CouponReservations.md) @@ -554,6 +574,12 @@ Class | Method | HTTP request | Description - [TalonOne::FeaturesFeed](docs/FeaturesFeed.md) - [TalonOne::FuncArgDef](docs/FuncArgDef.md) - [TalonOne::FunctionDef](docs/FunctionDef.md) + - [TalonOne::GenerateCampaignDescription](docs/GenerateCampaignDescription.md) + - [TalonOne::GenerateCampaignTags](docs/GenerateCampaignTags.md) + - [TalonOne::GenerateItemFilterDescription](docs/GenerateItemFilterDescription.md) + - [TalonOne::GenerateLoyaltyCard](docs/GenerateLoyaltyCard.md) + - [TalonOne::GenerateRuleTitle](docs/GenerateRuleTitle.md) + - [TalonOne::GenerateRuleTitleRule](docs/GenerateRuleTitleRule.md) - [TalonOne::GetIntegrationCouponRequest](docs/GetIntegrationCouponRequest.md) - [TalonOne::Giveaway](docs/Giveaway.md) - [TalonOne::GiveawaysPool](docs/GiveawaysPool.md) @@ -633,9 +659,13 @@ Class | Method | HTTP request | Description - [TalonOne::LoginParams](docs/LoginParams.md) - [TalonOne::Loyalty](docs/Loyalty.md) - [TalonOne::LoyaltyBalance](docs/LoyaltyBalance.md) + - [TalonOne::LoyaltyBalanceWithTier](docs/LoyaltyBalanceWithTier.md) - [TalonOne::LoyaltyBalances](docs/LoyaltyBalances.md) + - [TalonOne::LoyaltyBalancesWithTiers](docs/LoyaltyBalancesWithTiers.md) - [TalonOne::LoyaltyCard](docs/LoyaltyCard.md) - [TalonOne::LoyaltyCardBalances](docs/LoyaltyCardBalances.md) + - [TalonOne::LoyaltyCardBatch](docs/LoyaltyCardBatch.md) + - [TalonOne::LoyaltyCardBatchResponse](docs/LoyaltyCardBatchResponse.md) - [TalonOne::LoyaltyCardProfileRegistration](docs/LoyaltyCardProfileRegistration.md) - [TalonOne::LoyaltyCardRegistration](docs/LoyaltyCardRegistration.md) - [TalonOne::LoyaltyDashboardData](docs/LoyaltyDashboardData.md) @@ -648,7 +678,6 @@ Class | Method | HTTP request | Description - [TalonOne::LoyaltyProgramBalance](docs/LoyaltyProgramBalance.md) - [TalonOne::LoyaltyProgramEntity](docs/LoyaltyProgramEntity.md) - [TalonOne::LoyaltyProgramLedgers](docs/LoyaltyProgramLedgers.md) - - [TalonOne::LoyaltyProgramSubledgers](docs/LoyaltyProgramSubledgers.md) - [TalonOne::LoyaltyProgramTransaction](docs/LoyaltyProgramTransaction.md) - [TalonOne::LoyaltySubLedger](docs/LoyaltySubLedger.md) - [TalonOne::LoyaltyTier](docs/LoyaltyTier.md) @@ -673,8 +702,11 @@ Class | Method | HTTP request | Description - [TalonOne::NewAccount](docs/NewAccount.md) - [TalonOne::NewAccountSignUp](docs/NewAccountSignUp.md) - [TalonOne::NewAdditionalCost](docs/NewAdditionalCost.md) + - [TalonOne::NewAppWideCouponDeletionJob](docs/NewAppWideCouponDeletionJob.md) - [TalonOne::NewApplication](docs/NewApplication.md) - [TalonOne::NewApplicationAPIKey](docs/NewApplicationAPIKey.md) + - [TalonOne::NewApplicationCIF](docs/NewApplicationCIF.md) + - [TalonOne::NewApplicationCIFExpression](docs/NewApplicationCIFExpression.md) - [TalonOne::NewAttribute](docs/NewAttribute.md) - [TalonOne::NewAudience](docs/NewAudience.md) - [TalonOne::NewBaseNotification](docs/NewBaseNotification.md) @@ -687,6 +719,7 @@ Class | Method | HTTP request | Description - [TalonOne::NewCatalog](docs/NewCatalog.md) - [TalonOne::NewCollection](docs/NewCollection.md) - [TalonOne::NewCouponCreationJob](docs/NewCouponCreationJob.md) + - [TalonOne::NewCouponDeletionJob](docs/NewCouponDeletionJob.md) - [TalonOne::NewCoupons](docs/NewCoupons.md) - [TalonOne::NewCouponsForMultipleRecipients](docs/NewCouponsForMultipleRecipients.md) - [TalonOne::NewCustomEffect](docs/NewCustomEffect.md) @@ -713,6 +746,7 @@ Class | Method | HTTP request | Description - [TalonOne::NewReferral](docs/NewReferral.md) - [TalonOne::NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md) - [TalonOne::NewReturn](docs/NewReturn.md) + - [TalonOne::NewRevisionVersion](docs/NewRevisionVersion.md) - [TalonOne::NewRole](docs/NewRole.md) - [TalonOne::NewRoleV2](docs/NewRoleV2.md) - [TalonOne::NewRuleset](docs/NewRuleset.md) @@ -725,6 +759,10 @@ Class | Method | HTTP request | Description - [TalonOne::NotificationActivation](docs/NotificationActivation.md) - [TalonOne::NotificationListItem](docs/NotificationListItem.md) - [TalonOne::NotificationTest](docs/NotificationTest.md) + - [TalonOne::OktaEvent](docs/OktaEvent.md) + - [TalonOne::OktaEventPayload](docs/OktaEventPayload.md) + - [TalonOne::OktaEventPayloadData](docs/OktaEventPayloadData.md) + - [TalonOne::OktaEventTarget](docs/OktaEventTarget.md) - [TalonOne::OneTimeCode](docs/OneTimeCode.md) - [TalonOne::OutgoingIntegrationBrazePolicy](docs/OutgoingIntegrationBrazePolicy.md) - [TalonOne::OutgoingIntegrationCleverTapPolicy](docs/OutgoingIntegrationCleverTapPolicy.md) @@ -742,6 +780,7 @@ Class | Method | HTTP request | Description - [TalonOne::Picklist](docs/Picklist.md) - [TalonOne::Product](docs/Product.md) - [TalonOne::ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md) + - [TalonOne::ProjectedTier](docs/ProjectedTier.md) - [TalonOne::RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md) - [TalonOne::Referral](docs/Referral.md) - [TalonOne::ReferralConstraints](docs/ReferralConstraints.md) @@ -756,6 +795,9 @@ Class | Method | HTTP request | Description - [TalonOne::ReserveCouponEffectProps](docs/ReserveCouponEffectProps.md) - [TalonOne::ReturnIntegrationRequest](docs/ReturnIntegrationRequest.md) - [TalonOne::ReturnedCartItem](docs/ReturnedCartItem.md) + - [TalonOne::Revision](docs/Revision.md) + - [TalonOne::RevisionActivation](docs/RevisionActivation.md) + - [TalonOne::RevisionVersion](docs/RevisionVersion.md) - [TalonOne::Role](docs/Role.md) - [TalonOne::RoleAssign](docs/RoleAssign.md) - [TalonOne::RoleMembership](docs/RoleMembership.md) @@ -769,6 +811,7 @@ Class | Method | HTTP request | Description - [TalonOne::RollbackCouponEffectProps](docs/RollbackCouponEffectProps.md) - [TalonOne::RollbackDeductedLoyaltyPointsEffectProps](docs/RollbackDeductedLoyaltyPointsEffectProps.md) - [TalonOne::RollbackDiscountEffectProps](docs/RollbackDiscountEffectProps.md) + - [TalonOne::RollbackIncreasedAchievementProgressEffectProps](docs/RollbackIncreasedAchievementProgressEffectProps.md) - [TalonOne::RollbackReferralEffectProps](docs/RollbackReferralEffectProps.md) - [TalonOne::Rule](docs/Rule.md) - [TalonOne::RuleFailureReason](docs/RuleFailureReason.md) @@ -778,6 +821,22 @@ Class | Method | HTTP request | Description - [TalonOne::SamlConnectionInternal](docs/SamlConnectionInternal.md) - [TalonOne::SamlConnectionMetadata](docs/SamlConnectionMetadata.md) - [TalonOne::SamlLoginEndpoint](docs/SamlLoginEndpoint.md) + - [TalonOne::ScimBaseUser](docs/ScimBaseUser.md) + - [TalonOne::ScimBaseUserName](docs/ScimBaseUserName.md) + - [TalonOne::ScimNewUser](docs/ScimNewUser.md) + - [TalonOne::ScimPatchOperation](docs/ScimPatchOperation.md) + - [TalonOne::ScimPatchRequest](docs/ScimPatchRequest.md) + - [TalonOne::ScimResource](docs/ScimResource.md) + - [TalonOne::ScimResourceTypesListResponse](docs/ScimResourceTypesListResponse.md) + - [TalonOne::ScimSchemaResource](docs/ScimSchemaResource.md) + - [TalonOne::ScimSchemasListResponse](docs/ScimSchemasListResponse.md) + - [TalonOne::ScimServiceProviderConfigResponse](docs/ScimServiceProviderConfigResponse.md) + - [TalonOne::ScimServiceProviderConfigResponseBulk](docs/ScimServiceProviderConfigResponseBulk.md) + - [TalonOne::ScimServiceProviderConfigResponseChangePassword](docs/ScimServiceProviderConfigResponseChangePassword.md) + - [TalonOne::ScimServiceProviderConfigResponseFilter](docs/ScimServiceProviderConfigResponseFilter.md) + - [TalonOne::ScimServiceProviderConfigResponsePatch](docs/ScimServiceProviderConfigResponsePatch.md) + - [TalonOne::ScimUser](docs/ScimUser.md) + - [TalonOne::ScimUsersListResponse](docs/ScimUsersListResponse.md) - [TalonOne::Session](docs/Session.md) - [TalonOne::SetDiscountEffectProps](docs/SetDiscountEffectProps.md) - [TalonOne::SetDiscountPerAdditionalCostEffectProps](docs/SetDiscountPerAdditionalCostEffectProps.md) @@ -812,6 +871,7 @@ Class | Method | HTTP request | Description - [TalonOne::UpdateAchievement](docs/UpdateAchievement.md) - [TalonOne::UpdateApplication](docs/UpdateApplication.md) - [TalonOne::UpdateApplicationAPIKey](docs/UpdateApplicationAPIKey.md) + - [TalonOne::UpdateApplicationCIF](docs/UpdateApplicationCIF.md) - [TalonOne::UpdateAttributeEffectProps](docs/UpdateAttributeEffectProps.md) - [TalonOne::UpdateAudience](docs/UpdateAudience.md) - [TalonOne::UpdateCampaign](docs/UpdateCampaign.md) diff --git a/docs/AchievementProgress.md b/docs/AchievementProgress.md index 3150ac1..ea4b2f3 100644 --- a/docs/AchievementProgress.md +++ b/docs/AchievementProgress.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **achievement_id** | **Integer** | The internal ID of the achievement. | **name** | **String** | The internal name of the achievement used in API requests. | **title** | **String** | The display name of the achievement in the Campaign Manager. | +**description** | **String** | The description of the achievement in the Campaign Manager. | **campaign_id** | **Integer** | The ID of the campaign the achievement belongs to. | **status** | **String** | The status of the achievement. | **target** | **Float** | The required number of actions or the transactional milestone to complete the achievement. | [optional] @@ -23,6 +24,7 @@ require 'TalonOne' instance = TalonOne::AchievementProgress.new(achievement_id: 3, name: FreeCoffee10Orders, title: 50% off on 50th purchase., + description: 50% off for every 50th purchase in a year., campaign_id: 3, status: completed, target: 10.0, diff --git a/docs/AdditionalCampaignProperties.md b/docs/AdditionalCampaignProperties.md index 239b73a..0ab4b08 100644 --- a/docs/AdditionalCampaignProperties.md +++ b/docs/AdditionalCampaignProperties.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **updated_by** | **String** | Name of the user who last updated this campaign if available. | [optional] **template_id** | **Integer** | The ID of the Campaign Template this Campaign was created from. | [optional] **frontend_state** | **String** | A campaign state described exactly as in the Campaign Manager. | +**stores_imported** | **Boolean** | Indicates whether the linked stores were imported via a CSV file. | ## Code Sample @@ -53,7 +54,8 @@ instance = TalonOne::AdditionalCampaignProperties.new(budgets: null, created_by: John Doe, updated_by: Jane Doe, template_id: 3, - frontend_state: running) + frontend_state: running, + stores_imported: true) ``` diff --git a/docs/AnalyticsDataPoint.md b/docs/AnalyticsDataPoint.md new file mode 100644 index 0000000..c4361ab --- /dev/null +++ b/docs/AnalyticsDataPoint.md @@ -0,0 +1,19 @@ +# TalonOne::AnalyticsDataPoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **Float** | | +**influenced** | **Float** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::AnalyticsDataPoint.new(total: 12.0, + influenced: 12.0) +``` + + diff --git a/docs/AnalyticsDataPointWithTrend.md b/docs/AnalyticsDataPointWithTrend.md new file mode 100644 index 0000000..1ad2725 --- /dev/null +++ b/docs/AnalyticsDataPointWithTrend.md @@ -0,0 +1,19 @@ +# TalonOne::AnalyticsDataPointWithTrend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Float** | | +**trend** | **Float** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::AnalyticsDataPointWithTrend.new(value: 12.0, + trend: 3.25) +``` + + diff --git a/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md b/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md new file mode 100644 index 0000000..60a8f7a --- /dev/null +++ b/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md @@ -0,0 +1,21 @@ +# TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Float** | | +**influenced_rate** | **Float** | | +**trend** | **Float** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate.new(value: 12.0, + influenced_rate: 12.0, + trend: 3.25) +``` + + diff --git a/docs/AnalyticsDataPointWithTrendAndUplift.md b/docs/AnalyticsDataPointWithTrendAndUplift.md new file mode 100644 index 0000000..f793411 --- /dev/null +++ b/docs/AnalyticsDataPointWithTrendAndUplift.md @@ -0,0 +1,21 @@ +# TalonOne::AnalyticsDataPointWithTrendAndUplift + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Float** | | +**uplift** | **Float** | | +**trend** | **Float** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::AnalyticsDataPointWithTrendAndUplift.new(value: 12.0, + uplift: 3.25, + trend: 3.25) +``` + + diff --git a/docs/Application.md b/docs/Application.md index 1e3a6f1..de0aa0b 100644 --- a/docs/Application.md +++ b/docs/Application.md @@ -23,6 +23,8 @@ Name | Type | Description | Notes **enable_partial_discounts** | **Boolean** | Indicates if this Application supports partial discounts. | [optional] **default_discount_additional_cost_per_item_scope** | **String** | The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect. | [optional] **default_evaluation_group_id** | **Integer** | The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. | [optional] +**default_cart_item_filter_id** | **Integer** | The ID of the default Cart-Item-Filter for this application. | [optional] +**enable_campaign_state_management** | **Boolean** | Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. | [optional] **loyalty_programs** | [**Array<LoyaltyProgram>**](LoyaltyProgram.md) | An array containing all the loyalty programs to which this application is subscribed. | ## Code Sample @@ -49,6 +51,8 @@ instance = TalonOne::Application.new(id: 6, enable_partial_discounts: false, default_discount_additional_cost_per_item_scope: price, default_evaluation_group_id: 3, + default_cart_item_filter_id: 3, + enable_campaign_state_management: false, loyalty_programs: null) ``` diff --git a/docs/ApplicationAnalyticsDataPoint.md b/docs/ApplicationAnalyticsDataPoint.md index b677bdd..efb6952 100644 --- a/docs/ApplicationAnalyticsDataPoint.md +++ b/docs/ApplicationAnalyticsDataPoint.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**start_time** | **DateTime** | The start of the aggregation time frame in UTC. | [optional] -**end_time** | **DateTime** | The end of the aggregation time frame in UTC. | [optional] -**total_revenue** | [**ApplicationAnalyticsDataPointTotalRevenue**](ApplicationAnalyticsDataPointTotalRevenue.md) | | [optional] -**sessions_count** | [**ApplicationAnalyticsDataPointSessionsCount**](ApplicationAnalyticsDataPointSessionsCount.md) | | [optional] -**avg_items_per_session** | [**ApplicationAnalyticsDataPointAvgItemsPerSession**](ApplicationAnalyticsDataPointAvgItemsPerSession.md) | | [optional] -**avg_session_value** | [**ApplicationAnalyticsDataPointAvgSessionValue**](ApplicationAnalyticsDataPointAvgSessionValue.md) | | [optional] +**start_time** | **DateTime** | The start of the aggregation time frame in UTC. | +**end_time** | **DateTime** | The end of the aggregation time frame in UTC. | +**total_revenue** | [**AnalyticsDataPoint**](AnalyticsDataPoint.md) | | [optional] +**sessions_count** | [**AnalyticsDataPoint**](AnalyticsDataPoint.md) | | [optional] +**avg_items_per_session** | [**AnalyticsDataPoint**](AnalyticsDataPoint.md) | | [optional] +**avg_session_value** | [**AnalyticsDataPoint**](AnalyticsDataPoint.md) | | [optional] **total_discounts** | **Float** | The total value of discounts given for cart items in influenced sessions. | [optional] **coupons_count** | **Float** | The number of times a coupon was successfully redeemed in influenced sessions. | [optional] diff --git a/docs/ApplicationCIF.md b/docs/ApplicationCIF.md new file mode 100644 index 0000000..5d7fdca --- /dev/null +++ b/docs/ApplicationCIF.md @@ -0,0 +1,33 @@ +# TalonOne::ApplicationCIF + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Internal ID of this entity. | +**created** | **DateTime** | The time this entity was created. | +**name** | **String** | The name of the Application cart item filter used in API requests. | +**description** | **String** | A short description of the Application cart item filter. | [optional] +**active_expression_id** | **Integer** | The ID of the expression that the Application cart item filter uses. | [optional] +**modified_by** | **Integer** | The ID of the user who last updated the Application cart item filter. | [optional] +**created_by** | **Integer** | The ID of the user who created the Application cart item filter. | [optional] +**modified** | **DateTime** | Timestamp of the most recent update to the Application cart item filter. | [optional] +**application_id** | **Integer** | The ID of the application that owns this entity. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ApplicationCIF.new(id: 6, + created: 2020-06-10T09:05:27.993483Z, + name: Filter items by product, + description: This filter allows filtering by shoes, + active_expression_id: 1, + modified_by: 334, + created_by: 216, + modified: null, + application_id: 322) +``` + + diff --git a/docs/ApplicationCIFExpression.md b/docs/ApplicationCIFExpression.md new file mode 100644 index 0000000..7332c4b --- /dev/null +++ b/docs/ApplicationCIFExpression.md @@ -0,0 +1,27 @@ +# TalonOne::ApplicationCIFExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Internal ID of this entity. | +**created** | **DateTime** | The time this entity was created. | +**cart_item_filter_id** | **Integer** | The ID of the Application cart item filter. | [optional] +**created_by** | **Integer** | The ID of the user who created the Application cart item filter. | [optional] +**expression** | **Array<Object>** | Arbitrary additional JSON data associated with the Application cart item filter. | [optional] +**application_id** | **Integer** | The ID of the application that owns this entity. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ApplicationCIFExpression.new(id: 6, + created: 2020-06-10T09:05:27.993483Z, + cart_item_filter_id: 216, + created_by: 216, + expression: {expr=[filter, [., Session, CartItems], [[Item], [catch, false, [=, [., Item, Category], Kitchen]]]]}, + application_id: 322) +``` + + diff --git a/docs/ApplicationCampaignAnalytics.md b/docs/ApplicationCampaignAnalytics.md index b5fcd40..e980402 100644 --- a/docs/ApplicationCampaignAnalytics.md +++ b/docs/ApplicationCampaignAnalytics.md @@ -4,21 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**start_time** | **DateTime** | The start of the aggregation time frame in UTC. | [optional] -**end_time** | **DateTime** | The end of the aggregation time frame in UTC. | [optional] -**campaign_id** | **Integer** | The ID of the campaign. | [optional] -**campaign_name** | **String** | The name of the campaign. | [optional] -**campaign_tags** | **Array<String>** | A list of tags for the campaign. | [optional] -**campaign_state** | **String** | The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons. | [optional] [default to 'enabled'] -**campaign_active_ruleset_id** | **Integer** | The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] -**campaign_start_time** | **DateTime** | Date and time when the campaign becomes active. | [optional] -**campaign_end_time** | **DateTime** | Date and time when the campaign becomes inactive. | [optional] -**total_revenue** | [**ApplicationCampaignAnalyticsTotalRevenue**](ApplicationCampaignAnalyticsTotalRevenue.md) | | [optional] -**sessions_count** | [**ApplicationCampaignAnalyticsSessionsCount**](ApplicationCampaignAnalyticsSessionsCount.md) | | [optional] -**avg_items_per_session** | [**ApplicationCampaignAnalyticsAvgItemsPerSession**](ApplicationCampaignAnalyticsAvgItemsPerSession.md) | | [optional] -**avg_session_value** | [**ApplicationCampaignAnalyticsAvgSessionValue**](ApplicationCampaignAnalyticsAvgSessionValue.md) | | [optional] -**total_discounts** | [**ApplicationCampaignAnalyticsTotalDiscounts**](ApplicationCampaignAnalyticsTotalDiscounts.md) | | [optional] -**coupons_count** | [**ApplicationCampaignAnalyticsCouponsCount**](ApplicationCampaignAnalyticsCouponsCount.md) | | [optional] +**start_time** | **DateTime** | The start of the aggregation time frame in UTC. | +**end_time** | **DateTime** | The end of the aggregation time frame in UTC. | +**campaign_id** | **Integer** | The ID of the campaign. | +**campaign_name** | **String** | The name of the campaign. | +**campaign_tags** | **Array<String>** | A list of tags for the campaign. | +**campaign_state** | **String** | The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons. | +**total_revenue** | [**AnalyticsDataPointWithTrendAndInfluencedRate**](AnalyticsDataPointWithTrendAndInfluencedRate.md) | | [optional] +**sessions_count** | [**AnalyticsDataPointWithTrendAndInfluencedRate**](AnalyticsDataPointWithTrendAndInfluencedRate.md) | | [optional] +**avg_items_per_session** | [**AnalyticsDataPointWithTrendAndUplift**](AnalyticsDataPointWithTrendAndUplift.md) | | [optional] +**avg_session_value** | [**AnalyticsDataPointWithTrendAndUplift**](AnalyticsDataPointWithTrendAndUplift.md) | | [optional] +**total_discounts** | [**AnalyticsDataPointWithTrend**](AnalyticsDataPointWithTrend.md) | | [optional] +**coupons_count** | [**AnalyticsDataPointWithTrend**](AnalyticsDataPointWithTrend.md) | | [optional] ## Code Sample @@ -30,10 +27,7 @@ instance = TalonOne::ApplicationCampaignAnalytics.new(start_time: 2024-02-01T00: campaign_id: 1, campaign_name: Summer promotions, campaign_tags: [summer], - campaign_state: enabled, - campaign_active_ruleset_id: 2, - campaign_start_time: 2021-07-20T22:00Z, - campaign_end_time: 2021-10-01T02:00Z, + campaign_state: running, total_revenue: null, sessions_count: null, avg_items_per_session: null, diff --git a/docs/ApplicationCampaignStats.md b/docs/ApplicationCampaignStats.md index 512a158..8314ed3 100644 --- a/docs/ApplicationCampaignStats.md +++ b/docs/ApplicationCampaignStats.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**draft** | **Integer** | Number of draft campaigns. | **disabled** | **Integer** | Number of disabled campaigns. | **scheduled** | **Integer** | Number of scheduled campaigns. | **running** | **Integer** | Number of running campaigns. | @@ -16,8 +15,7 @@ Name | Type | Description | Notes ```ruby require 'TalonOne' -instance = TalonOne::ApplicationCampaignStats.new(draft: null, - disabled: null, +instance = TalonOne::ApplicationCampaignStats.new(disabled: null, scheduled: null, running: null, expired: null, diff --git a/docs/AsyncCouponDeletionJobResponse.md b/docs/AsyncCouponDeletionJobResponse.md new file mode 100644 index 0000000..f9baee5 --- /dev/null +++ b/docs/AsyncCouponDeletionJobResponse.md @@ -0,0 +1,17 @@ +# TalonOne::AsyncCouponDeletionJobResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::AsyncCouponDeletionJobResponse.new(id: 6) +``` + + diff --git a/docs/BaseLoyaltyProgram.md b/docs/BaseLoyaltyProgram.md index 146af47..342691d 100644 --- a/docs/BaseLoyaltyProgram.md +++ b/docs/BaseLoyaltyProgram.md @@ -12,10 +12,12 @@ Name | Type | Description | Notes **allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. | [optional] **users_per_card_limit** | **Integer** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **Boolean** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] -**tiers_expiration_policy** | **String** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] -**tiers_expire_in** | **String** | The amount of time after which the tier expires. 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. | [optional] -**tiers_downgrade_policy** | **String** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **program_join_policy** | **String** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] +**tiers_expiration_policy** | **String** | The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. | [optional] +**tier_cycle_start_date** | **DateTime** | Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. | [optional] +**tiers_expire_in** | **String** | The amount of time after which the tier expires and is reevaluated. 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. | [optional] +**tiers_downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] +**card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] ## Code Sample @@ -30,10 +32,12 @@ instance = TalonOne::BaseLoyaltyProgram.new(title: Point collection, allow_subledger: false, users_per_card_limit: 111, sandbox: true, + program_join_policy: null, tiers_expiration_policy: null, + tier_cycle_start_date: 2021-09-12T10:12:42Z, tiers_expire_in: 27W_U, tiers_downgrade_policy: null, - program_join_policy: null) + card_code_settings: null) ``` diff --git a/docs/BaseNotification.md b/docs/BaseNotification.md index 425eb01..6e690b7 100644 --- a/docs/BaseNotification.md +++ b/docs/BaseNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**policy** | [**Object**](.md) | | +**policy** | [**Object**](.md) | Indicates which notification properties to apply. | **enabled** | **Boolean** | Indicates whether the notification is activated. | [optional] [default to true] **webhook** | [**BaseNotificationWebhook**](BaseNotificationWebhook.md) | | **id** | **Integer** | Unique ID for this entity. | diff --git a/docs/BaseNotificationEntity.md b/docs/BaseNotificationEntity.md index ea7c022..011a6e4 100644 --- a/docs/BaseNotificationEntity.md +++ b/docs/BaseNotificationEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**policy** | [**Object**](.md) | | +**policy** | [**Object**](.md) | Indicates which notification properties to apply. | **enabled** | **Boolean** | Indicates whether the notification is activated. | [optional] [default to true] ## Code Sample diff --git a/docs/Campaign.md b/docs/Campaign.md index 369b2bf..04e6555 100644 --- a/docs/Campaign.md +++ b/docs/Campaign.md @@ -45,6 +45,13 @@ Name | Type | Description | Notes **updated_by** | **String** | Name of the user who last updated this campaign if available. | [optional] **template_id** | **Integer** | The ID of the Campaign Template this Campaign was created from. | [optional] **frontend_state** | **String** | A campaign state described exactly as in the Campaign Manager. | +**stores_imported** | **Boolean** | Indicates whether the linked stores were imported via a CSV file. | +**active_revision_id** | **Integer** | ID of the revision that was last activated on this campaign. | [optional] +**active_revision_version_id** | **Integer** | ID of the revision version that is active on the campaign. | [optional] +**version** | **Integer** | Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. | [optional] +**current_revision_id** | **Integer** | ID of the revision currently being modified for the campaign. | [optional] +**current_revision_version_id** | **Integer** | ID of the latest version applied on the current revision. | [optional] +**stage_revision** | **Boolean** | Flag for determining whether we use current revision when sending requests with staging API key. | [optional] [default to false] ## Code Sample @@ -91,7 +98,14 @@ instance = TalonOne::Campaign.new(id: 4, created_by: John Doe, updated_by: Jane Doe, template_id: 3, - frontend_state: running) + frontend_state: running, + stores_imported: true, + active_revision_id: 6, + active_revision_version_id: 6, + version: 6, + current_revision_id: 6, + current_revision_version_id: 6, + stage_revision: false) ``` diff --git a/docs/CampaignCollectionEditedNotification.md b/docs/CampaignCollectionEditedNotification.md new file mode 100644 index 0000000..988ee1b --- /dev/null +++ b/docs/CampaignCollectionEditedNotification.md @@ -0,0 +1,21 @@ +# TalonOne::CampaignCollectionEditedNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign** | [**Campaign**](Campaign.md) | | +**ruleset** | [**Ruleset**](Ruleset.md) | | [optional] +**collection** | [**CollectionWithoutPayload**](CollectionWithoutPayload.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CampaignCollectionEditedNotification.new(campaign: null, + ruleset: null, + collection: null) +``` + + diff --git a/docs/CampaignNotificationPolicy.md b/docs/CampaignNotificationPolicy.md index e01db48..9201d43 100644 --- a/docs/CampaignNotificationPolicy.md +++ b/docs/CampaignNotificationPolicy.md @@ -5,13 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Notification name. | +**batching_enabled** | **Boolean** | Indicates whether batching is activated. | [optional] [default to true] ## Code Sample ```ruby require 'TalonOne' -instance = TalonOne::CampaignNotificationPolicy.new(name: Christmas Sale) +instance = TalonOne::CampaignNotificationPolicy.new(name: Christmas Sale, + batching_enabled: false) ``` diff --git a/docs/CampaignStateChangedNotification.md b/docs/CampaignStateChangedNotification.md index c671de5..74737f6 100644 --- a/docs/CampaignStateChangedNotification.md +++ b/docs/CampaignStateChangedNotification.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **campaign** | [**Campaign**](Campaign.md) | | -**old_state** | **String** | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | -**new_state** | **String** | The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | +**old_state** | **String** | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived'] | +**new_state** | **String** | The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived'] | **ruleset** | [**Ruleset**](Ruleset.md) | | [optional] ## Code Sample diff --git a/docs/CampaignStoreBudget.md b/docs/CampaignStoreBudget.md new file mode 100644 index 0000000..ba5a708 --- /dev/null +++ b/docs/CampaignStoreBudget.md @@ -0,0 +1,25 @@ +# TalonOne::CampaignStoreBudget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Internal ID of this entity. | +**created** | **DateTime** | The time this entity was created. | +**campaign_id** | **Integer** | The ID of the campaign that owns this entity. | +**store_id** | **Integer** | The ID of the store. | +**limits** | [**Array<LimitConfig>**](LimitConfig.md) | The set of budget limits for stores linked to the campaign. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CampaignStoreBudget.new(id: 6, + created: 2020-06-10T09:05:27.993483Z, + campaign_id: 322, + store_id: null, + limits: null) +``` + + diff --git a/docs/CampaignVersions.md b/docs/CampaignVersions.md new file mode 100644 index 0000000..d641383 --- /dev/null +++ b/docs/CampaignVersions.md @@ -0,0 +1,27 @@ +# TalonOne::CampaignVersions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_revision_id** | **Integer** | ID of the revision that was last activated on this campaign. | [optional] +**active_revision_version_id** | **Integer** | ID of the revision version that is active on the campaign. | [optional] +**version** | **Integer** | Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. | [optional] +**current_revision_id** | **Integer** | ID of the revision currently being modified for the campaign. | [optional] +**current_revision_version_id** | **Integer** | ID of the latest version applied on the current revision. | [optional] +**stage_revision** | **Boolean** | Flag for determining whether we use current revision when sending requests with staging API key. | [optional] [default to false] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CampaignVersions.new(active_revision_id: 6, + active_revision_version_id: 6, + version: 6, + current_revision_id: 6, + current_revision_version_id: 6, + stage_revision: false) +``` + + diff --git a/docs/CardAddedDeductedPointsNotificationPolicy.md b/docs/CardAddedDeductedPointsNotificationPolicy.md new file mode 100644 index 0000000..027c78e --- /dev/null +++ b/docs/CardAddedDeductedPointsNotificationPolicy.md @@ -0,0 +1,19 @@ +# TalonOne::CardAddedDeductedPointsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Notification name. | +**scopes** | **Array<String>** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CardAddedDeductedPointsNotificationPolicy.new(name: Christmas Sale, + scopes: null) +``` + + diff --git a/docs/CartItem.md b/docs/CartItem.md index 97c7135..e6fec6f 100644 --- a/docs/CartItem.md +++ b/docs/CartItem.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **width** | **Float** | Width of item in mm. | [optional] **length** | **Float** | Length of item in mm. | [optional] **position** | **Float** | Position of the Cart Item in the Cart (calculated internally). | [optional] -**attributes** | [**Object**](.md) | Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. | [optional] +**attributes** | [**Object**](.md) | Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. **Note:** Any previously defined attributes that you do not include in the array will be removed. | [optional] **additional_costs** | [**Hash<String, AdditionalCost>**](AdditionalCost.md) | Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] **catalog_item_id** | **Integer** | The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog). | [optional] diff --git a/docs/CodeGeneratorSettings.md b/docs/CodeGeneratorSettings.md index 8015886..bfc7dec 100644 --- a/docs/CodeGeneratorSettings.md +++ b/docs/CodeGeneratorSettings.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **valid_characters** | **Array<String>** | List of characters used to generate the random parts of a code. | -**coupon_pattern** | **String** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | +**coupon_pattern** | **String** | The pattern used to generate codes, such as coupon codes, referral codes, and loyalty cards. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | ## Code Sample diff --git a/docs/Coupon.md b/docs/Coupon.md index ec34b67..19ef9e5 100644 --- a/docs/Coupon.md +++ b/docs/Coupon.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **usage_counter** | **Integer** | The number of times the coupon has been successfully redeemed. | **discount_counter** | **Float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] diff --git a/docs/CouponConstraints.md b/docs/CouponConstraints.md index bd1cc55..06c3966 100644 --- a/docs/CouponConstraints.md +++ b/docs/CouponConstraints.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] ## Code Sample diff --git a/docs/CouponCreationJob.md b/docs/CouponCreationJob.md index be71c9f..473c988 100644 --- a/docs/CouponCreationJob.md +++ b/docs/CouponCreationJob.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **number_of_coupons** | **Integer** | The number of new coupon codes to generate for the campaign. | **coupon_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **attributes** | [**Object**](.md) | Arbitrary properties associated with coupons. | diff --git a/docs/CouponDeletionFilters.md b/docs/CouponDeletionFilters.md new file mode 100644 index 0000000..fda9f4f --- /dev/null +++ b/docs/CouponDeletionFilters.md @@ -0,0 +1,43 @@ +# TalonOne::CouponDeletionFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_before** | **DateTime** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon 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 coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] +**starts_after** | **DateTime** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] +**starts_before** | **DateTime** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] +**valid** | **String** | - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future. - `validFuture`: Matches coupons in which the start date is set and in the future. | [optional] +**usable** | **Boolean** | - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. | [optional] +**redeemed** | **Boolean** | - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter. | [optional] +**recipient_integration_id** | **String** | Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. | [optional] +**exact_match** | **Boolean** | Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] +**value** | **String** | Filter results by the coupon code | [optional] [default to 'false'] +**batch_id** | **String** | Filter results by batches of coupons | [optional] +**referral_id** | **Integer** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] +**expires_after** | **DateTime** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] +**expires_before** | **DateTime** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CouponDeletionFilters.new(created_before: null, + created_after: null, + starts_after: null, + starts_before: null, + valid: null, + usable: null, + redeemed: null, + recipient_integration_id: null, + exact_match: null, + value: null, + batch_id: null, + referral_id: null, + expires_after: null, + expires_before: null) +``` + + diff --git a/docs/CouponDeletionJob.md b/docs/CouponDeletionJob.md new file mode 100644 index 0000000..5ca7433 --- /dev/null +++ b/docs/CouponDeletionJob.md @@ -0,0 +1,39 @@ +# TalonOne::CouponDeletionJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Internal ID of this entity. | +**created** | **DateTime** | The time this entity was created. | +**application_id** | **Integer** | The ID of the application that owns this entity. | +**account_id** | **Integer** | The ID of the account that owns this entity. | +**filters** | [**CouponDeletionFilters**](CouponDeletionFilters.md) | | +**status** | **String** | The current status of this request. Possible values: - `not_ready` - `pending` - `completed` - `failed` | +**deleted_amount** | **Integer** | The number of coupon codes that were already deleted for this request. | [optional] +**fail_count** | **Integer** | The number of times this job failed. | +**errors** | **Array<String>** | An array of individual problems encountered during the request. | +**created_by** | **Integer** | ID of the user who created this effect. | +**communicated** | **Boolean** | Indicates whether the user that created this job was notified of its final state. | +**campaign_i_ds** | **Array<Integer>** | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::CouponDeletionJob.new(id: 6, + created: 2020-06-10T09:05:27.993483Z, + application_id: 322, + account_id: 3886, + filters: null, + status: pending, + deleted_amount: 1000000, + fail_count: 10, + errors: [Connection to database was reset, failed to delete codes], + created_by: 1, + communicated: false, + campaign_i_ds: null) +``` + + diff --git a/docs/CustomerSessionV2.md b/docs/CustomerSessionV2.md index ea84a88..d8a016b 100644 --- a/docs/CustomerSessionV2.md +++ b/docs/CustomerSessionV2.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **profile_id** | **String** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | **store_integration_id** | **String** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluable_campaign_ids** | **Array<Integer>** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] -**coupon_codes** | **Array<String>** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] -**referral_code** | **String** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] +**coupon_codes** | **Array<String>** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. | [optional] +**referral_code** | **String** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. | [optional] **loyalty_cards** | **Array<String>** | Identifier of a loyalty card. | [optional] **state** | **String** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [default to 'open'] **cart_items** | [**Array<CartItem>**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | diff --git a/docs/Effect.md b/docs/Effect.md index 845733f..d5efa2b 100644 --- a/docs/Effect.md +++ b/docs/Effect.md @@ -12,6 +12,10 @@ Name | Type | Description | Notes **triggered_by_coupon** | **Integer** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggered_for_catalog_item** | **Integer** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] **condition_index** | **Integer** | The index of the condition that was triggered. | [optional] +**evaluation_group_id** | **Integer** | The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). | [optional] +**evaluation_group_mode** | **String** | The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). | [optional] +**campaign_revision_id** | **Integer** | The revision ID of the campaign that was used when triggering the effect. | [optional] +**campaign_revision_version_id** | **Integer** | The revision version ID of the campaign that was used when triggering the effect. | [optional] **props** | [**Object**](.md) | The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | ## Code Sample @@ -27,6 +31,10 @@ instance = TalonOne::Effect.new(campaign_id: 244, triggered_by_coupon: 4928, triggered_for_catalog_item: 786, condition_index: 786, + evaluation_group_id: 3, + evaluation_group_mode: stackable, + campaign_revision_id: 1, + campaign_revision_version_id: 5, props: null) ``` diff --git a/docs/EffectEntity.md b/docs/EffectEntity.md index bfa4827..fc86a91 100644 --- a/docs/EffectEntity.md +++ b/docs/EffectEntity.md @@ -12,6 +12,10 @@ Name | Type | Description | Notes **triggered_by_coupon** | **Integer** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggered_for_catalog_item** | **Integer** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] **condition_index** | **Integer** | The index of the condition that was triggered. | [optional] +**evaluation_group_id** | **Integer** | The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). | [optional] +**evaluation_group_mode** | **String** | The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). | [optional] +**campaign_revision_id** | **Integer** | The revision ID of the campaign that was used when triggering the effect. | [optional] +**campaign_revision_version_id** | **Integer** | The revision version ID of the campaign that was used when triggering the effect. | [optional] ## Code Sample @@ -25,7 +29,11 @@ instance = TalonOne::EffectEntity.new(campaign_id: 244, effect_type: rejectCoupon, triggered_by_coupon: 4928, triggered_for_catalog_item: 786, - condition_index: 786) + condition_index: 786, + evaluation_group_id: 3, + evaluation_group_mode: stackable, + campaign_revision_id: 1, + campaign_revision_version_id: 5) ``` diff --git a/docs/Environment.md b/docs/Environment.md index 25f7a2a..b1244d9 100644 --- a/docs/Environment.md +++ b/docs/Environment.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **additional_costs** | [**Array<AccountAdditionalCost>**](AccountAdditionalCost.md) | The additional costs that the application is subscribed to. | [optional] **audiences** | [**Array<Audience>**](Audience.md) | The audiences contained in the account which the application belongs to. | [optional] **collections** | [**Array<Collection>**](Collection.md) | The account-level collections that the application is subscribed to. | [optional] +**application_cart_item_filters** | [**Array<ApplicationCIF>**](ApplicationCIF.md) | The cart item filters belonging to the Application. | [optional] ## Code Sample @@ -37,7 +38,8 @@ instance = TalonOne::Environment.new(id: 6, attributes: null, additional_costs: null, audiences: null, - collections: null) + collections: null, + application_cart_item_filters: null) ``` diff --git a/docs/Event.md b/docs/Event.md index 695b15a..793bfec 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **attributes** | [**Object**](.md) | Arbitrary additional JSON data associated with the event. | **session_id** | **String** | The ID of the session that this event occurred in. | [optional] **effects** | **Array<Object>** | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | -**ledger_entries** | [**Array<LedgerEntry>**](LedgerEntry.md) | Ledger entries for the event. | +**ledger_entries** | [**Array<LedgerEntry>**](LedgerEntry.md) | Ledger entries for the event. | [optional] **meta** | [**Meta**](Meta.md) | | [optional] ## Code Sample diff --git a/docs/GenerateCampaignDescription.md b/docs/GenerateCampaignDescription.md new file mode 100644 index 0000000..9e0d671 --- /dev/null +++ b/docs/GenerateCampaignDescription.md @@ -0,0 +1,19 @@ +# TalonOne::GenerateCampaignDescription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_id** | **Integer** | ID of the campaign. | +**currency** | **String** | Currency for the campaign. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateCampaignDescription.new(campaign_id: null, + currency: null) +``` + + diff --git a/docs/GenerateCampaignTags.md b/docs/GenerateCampaignTags.md new file mode 100644 index 0000000..91632b3 --- /dev/null +++ b/docs/GenerateCampaignTags.md @@ -0,0 +1,17 @@ +# TalonOne::GenerateCampaignTags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_id** | **Integer** | ID of the campaign. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateCampaignTags.new(campaign_id: null) +``` + + diff --git a/docs/GenerateItemFilterDescription.md b/docs/GenerateItemFilterDescription.md new file mode 100644 index 0000000..d7a553d --- /dev/null +++ b/docs/GenerateItemFilterDescription.md @@ -0,0 +1,17 @@ +# TalonOne::GenerateItemFilterDescription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_filter** | **Array<Object>** | An array of item filter Talang expressions. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateItemFilterDescription.new(item_filter: [filter, [., Session, CartItems], [[Item], [catch, false, [and, [!=, [., Item, Attributes, c_productType], egiftcard]]]]]) +``` + + diff --git a/docs/GenerateLoyaltyCard.md b/docs/GenerateLoyaltyCard.md new file mode 100644 index 0000000..c4de3c9 --- /dev/null +++ b/docs/GenerateLoyaltyCard.md @@ -0,0 +1,19 @@ +# TalonOne::GenerateLoyaltyCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **String** | Status of the loyalty card. | [optional] [default to 'active'] +**customer_profile_ids** | **Array<String>** | Integration IDs of the customer profiles linked to the card. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateLoyaltyCard.new(status: active, + customer_profile_ids: [R195412, G244519]) +``` + + diff --git a/docs/GenerateRuleTitle.md b/docs/GenerateRuleTitle.md new file mode 100644 index 0000000..ff012ce --- /dev/null +++ b/docs/GenerateRuleTitle.md @@ -0,0 +1,19 @@ +# TalonOne::GenerateRuleTitle + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule** | [**GenerateRuleTitleRule**](GenerateRuleTitleRule.md) | | +**currency** | **String** | Currency for the campaign. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateRuleTitle.new(rule: null, + currency: null) +``` + + diff --git a/docs/GenerateRuleTitleRule.md b/docs/GenerateRuleTitleRule.md new file mode 100644 index 0000000..88218fc --- /dev/null +++ b/docs/GenerateRuleTitleRule.md @@ -0,0 +1,19 @@ +# TalonOne::GenerateRuleTitleRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effects** | **Array<Object>** | An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. | [optional] +**condition** | **Array<Object>** | A Talang expression that will be evaluated in the context of the given event. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::GenerateRuleTitleRule.new(effects: [catch, [noop], [setDiscount, 10% off, [*, [., Session, Total], [/, 10, 100]]]], + condition: [and, [couponValid]]) +``` + + diff --git a/docs/IncreaseAchievementProgressEffectProps.md b/docs/IncreaseAchievementProgressEffectProps.md index 972e70e..d066fe3 100644 --- a/docs/IncreaseAchievementProgressEffectProps.md +++ b/docs/IncreaseAchievementProgressEffectProps.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **progress_tracker_id** | **Integer** | The internal ID of the achievement progress tracker. | [optional] **delta** | **Float** | The value by which the customer's current progress in the achievement is increased. | **value** | **Float** | The current progress of the customer in the achievement. | -**target** | **Float** | The required number of actions or the transactional milestone to complete the achievement. | +**target** | **Float** | The target value to complete the achievement. | **is_just_completed** | **Boolean** | Indicates if the customer has completed the achievement in the current session. | ## Code Sample diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index a63b649..c1fb09c 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**delete_audience_v2**](IntegrationApi.md#delete_audience_v2) | **DELETE** /v2/audiences/{audienceId} | Delete audience [**delete_coupon_reservation**](IntegrationApi.md#delete_coupon_reservation) | **DELETE** /v1/coupon_reservations/{couponValue} | Delete coupon reservations [**delete_customer_data**](IntegrationApi.md#delete_customer_data) | **DELETE** /v1/customer_data/{integrationId} | Delete customer's personal data +[**generate_loyalty_card**](IntegrationApi.md#generate_loyalty_card) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card [**get_customer_inventory**](IntegrationApi.md#get_customer_inventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | List customer data [**get_customer_session**](IntegrationApi.md#get_customer_session) | **GET** /v2/customer_sessions/{customerSessionId} | Get customer session [**get_loyalty_balances**](IntegrationApi.md#get_loyalty_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points @@ -471,6 +472,62 @@ nil (empty response body) - **Accept**: application/json +## generate_loyalty_card + +> LoyaltyCard generate_loyalty_card(loyalty_program_id, body) + +Generate loyalty card + +Generate a loyalty card in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview). To link the card to one or more customer profiles, use the `customerProfileIds` parameter in the request body. **Note:** - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's `usersPerCardLimit`. To find the program's limit, use the [Get loyalty program](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgram) endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: api_key_v1 + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::IntegrationApi.new +loyalty_program_id = 56 # Integer | 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. +body = TalonOne::GenerateLoyaltyCard.new # GenerateLoyaltyCard | body + +begin + #Generate loyalty card + result = api_instance.generate_loyalty_card(loyalty_program_id, body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling IntegrationApi->generate_loyalty_card: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyalty_program_id** | **Integer**| 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. | + **body** | [**GenerateLoyaltyCard**](GenerateLoyaltyCard.md)| body | + +### Return type + +[**LoyaltyCard**](LoyaltyCard.md) + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## get_customer_inventory > CustomerInventory get_customer_inventory(integration_id, opts) @@ -595,7 +652,7 @@ Name | Type | Description | Notes ## get_loyalty_balances -> LoyaltyBalances get_loyalty_balances(loyalty_program_id, integration_id, opts) +> LoyaltyBalancesWithTiers get_loyalty_balances(loyalty_program_id, integration_id, opts) Get customer's loyalty points @@ -619,7 +676,9 @@ loyalty_program_id = 56 # Integer | Identifier of the profile-based loyalty prog integration_id = 'integration_id_example' # String | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. opts = { end_date: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **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. - subledger_id: 'subledger_id_example' # String | The ID of the subledger by which we filter the data. + subledger_id: 'subledger_id_example', # String | The ID of the subledger by which we filter the data. + include_tiers: false, # Boolean | Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. + include_projected_tier: false # Boolean | Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. } begin @@ -640,10 +699,12 @@ Name | Type | Description | Notes **integration_id** | **String**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | **end_date** | **DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **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] **subledger_id** | **String**| The ID of the subledger by which we filter the data. | [optional] + **include_tiers** | **Boolean**| Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. | [optional] [default to false] + **include_projected_tier** | **Boolean**| Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. | [optional] [default to false] ### Return type -[**LoyaltyBalances**](LoyaltyBalances.md) +[**LoyaltyBalancesWithTiers**](LoyaltyBalancesWithTiers.md) ### Authorization @@ -1221,7 +1282,7 @@ Name | Type | Description | Notes Sync cart item catalog -Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Adding several items to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Editing the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ```
Editing the attributes of several items in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing several items from the catalog
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
+Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: You can perform only one type of action in a single sync request. Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Adding multiple items to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Updating the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ```
Updating the attributes of multiple items in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing multiple items from the catalog
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
### Example @@ -1640,7 +1701,7 @@ api_instance = TalonOne::IntegrationApi.new customer_session_id = 'customer_session_id_example' # String | 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#operation/getApplicationSessions) endpoint. body = TalonOne::IntegrationRequest.new # IntegrationRequest | body opts = { - dry: true, # Boolean | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). + dry: true, # Boolean | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). now: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. } @@ -1660,7 +1721,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customer_session_id** | **String**| 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#operation/getApplicationSessions) endpoint. | **body** | [**IntegrationRequest**](IntegrationRequest.md)| body | - **dry** | **Boolean**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). | [optional] + **dry** | **Boolean**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). | [optional] **now** | **DateTime**| A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. | [optional] ### Return type diff --git a/docs/IntegrationCoupon.md b/docs/IntegrationCoupon.md index 5edbce7..dc939d5 100644 --- a/docs/IntegrationCoupon.md +++ b/docs/IntegrationCoupon.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **usage_counter** | **Integer** | The number of times the coupon has been successfully redeemed. | **discount_counter** | **Float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] diff --git a/docs/InventoryCoupon.md b/docs/InventoryCoupon.md index da6b19c..1579d2f 100644 --- a/docs/InventoryCoupon.md +++ b/docs/InventoryCoupon.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **usage_counter** | **Integer** | The number of times the coupon has been successfully redeemed. | **discount_counter** | **Float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] diff --git a/docs/InventoryReferral.md b/docs/InventoryReferral.md index 7b9aca1..30dfa05 100644 --- a/docs/InventoryReferral.md +++ b/docs/InventoryReferral.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **Integer** | Internal ID of this entity. | **created** | **DateTime** | The time this entity was created. | **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaign_id** | **Integer** | ID of the campaign from which the referral received the referral code. | **advocate_profile_integration_id** | **String** | The Integration ID of the Advocate's Profile. | diff --git a/docs/LoyaltyBalanceWithTier.md b/docs/LoyaltyBalanceWithTier.md new file mode 100644 index 0000000..97dc321 --- /dev/null +++ b/docs/LoyaltyBalanceWithTier.md @@ -0,0 +1,31 @@ +# TalonOne::LoyaltyBalanceWithTier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_points** | **Float** | Total amount of points awarded to this customer and available to spend. | [optional] +**pending_points** | **Float** | Total amount of points awarded to this customer but not available until their start date. | [optional] +**spent_points** | **Float** | Total amount of points already spent by this customer. | [optional] +**expired_points** | **Float** | Total amount of points awarded but never redeemed. They cannot be used anymore. | [optional] +**current_tier** | [**Tier**](Tier.md) | | [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** | **String** | The name of the tier consecutive to the current tier. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::LoyaltyBalanceWithTier.new(active_points: 286.0, + pending_points: 50.0, + spent_points: 150.0, + expired_points: 286.0, + current_tier: null, + projected_tier: null, + points_to_next_tier: 20.0, + next_tier_name: silver) +``` + + diff --git a/docs/LoyaltyBalancesWithTiers.md b/docs/LoyaltyBalancesWithTiers.md new file mode 100644 index 0000000..f6ff70e --- /dev/null +++ b/docs/LoyaltyBalancesWithTiers.md @@ -0,0 +1,19 @@ +# TalonOne::LoyaltyBalancesWithTiers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balance** | [**LoyaltyBalanceWithTier**](LoyaltyBalanceWithTier.md) | | [optional] +**subledger_balances** | [**Hash<String, LoyaltyBalanceWithTier>**](LoyaltyBalanceWithTier.md) | Map of the loyalty balances of the subledgers of a ledger. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::LoyaltyBalancesWithTiers.new(balance: null, + subledger_balances: {"mysubledger":{"activePoints":286,"pendingPoints":50,"spentPoints":150,"expiredPoints":25}}) +``` + + diff --git a/docs/LoyaltyCard.md b/docs/LoyaltyCard.md index 8a48c00..381e3e5 100644 --- a/docs/LoyaltyCard.md +++ b/docs/LoyaltyCard.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **id** | **Integer** | Internal ID of this entity. | **created** | **DateTime** | The time this entity was created. | **program_id** | **Integer** | The ID of the loyalty program that owns this entity. | -**status** | **String** | Status of the loyalty card. Can be one of: ['active', 'inactive'] | +**status** | **String** | Status of the loyalty card. Can be `active` or `inactive`. | +**block_reason** | **String** | Reason for transferring and blocking the loyalty card. | [optional] **identifier** | **String** | The alphanumeric identifier of the loyalty card. | **users_per_card_limit** | **Integer** | The max amount of customer profiles that can be linked to the card. 0 means unlimited. | **profiles** | [**Array<LoyaltyCardProfileRegistration>**](LoyaltyCardProfileRegistration.md) | Integration IDs of the customers profiles linked to the card. | [optional] @@ -16,6 +17,7 @@ Name | Type | Description | Notes **modified** | **DateTime** | Timestamp of the most recent update of the loyalty card. | [optional] **old_card_identifier** | **String** | The alphanumeric identifier of the loyalty card. | [optional] **new_card_identifier** | **String** | The alphanumeric identifier of the loyalty card. | [optional] +**batch_id** | **String** | The ID of the batch in which the loyalty card was created. | [optional] ## Code Sample @@ -26,6 +28,7 @@ instance = TalonOne::LoyaltyCard.new(id: 6, created: 2020-06-10T09:05:27.993483Z, program_id: 125, status: active, + block_reason: Current card lost. Customer needs a new card., identifier: summer-loyalty-card-0543, users_per_card_limit: 111, profiles: null, @@ -33,7 +36,8 @@ instance = TalonOne::LoyaltyCard.new(id: 6, subledgers: null, modified: 2021-09-12T10:12:42Z, old_card_identifier: summer-loyalty-card-0543, - new_card_identifier: summer-loyalty-card-0543) + new_card_identifier: summer-loyalty-card-0543, + batch_id: wdefpov) ``` diff --git a/docs/LoyaltyCardBatch.md b/docs/LoyaltyCardBatch.md new file mode 100644 index 0000000..fcec5e0 --- /dev/null +++ b/docs/LoyaltyCardBatch.md @@ -0,0 +1,21 @@ +# TalonOne::LoyaltyCardBatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_cards** | **Integer** | Number of loyalty cards in the batch. | +**batch_id** | **String** | ID of the loyalty card batch. | [optional] +**status** | **String** | Status of the loyalty cards in the batch. | [optional] [default to 'active'] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::LoyaltyCardBatch.new(number_of_cards: 5000, + batch_id: hwernpjz, + status: active) +``` + + diff --git a/docs/LoyaltyCardBatchResponse.md b/docs/LoyaltyCardBatchResponse.md new file mode 100644 index 0000000..94315b9 --- /dev/null +++ b/docs/LoyaltyCardBatchResponse.md @@ -0,0 +1,19 @@ +# TalonOne::LoyaltyCardBatchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_cards_generated** | **Integer** | Number of loyalty cards in the batch. | +**batch_id** | **String** | ID of the loyalty card batch. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::LoyaltyCardBatchResponse.new(number_of_cards_generated: 5000, + batch_id: hwernpjz) +``` + + diff --git a/docs/LoyaltyProgram.md b/docs/LoyaltyProgram.md index 0204423..8e15e58 100644 --- a/docs/LoyaltyProgram.md +++ b/docs/LoyaltyProgram.md @@ -14,18 +14,22 @@ Name | Type | Description | Notes **allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. | **users_per_card_limit** | **Integer** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **Boolean** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | -**tiers_expiration_policy** | **String** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] -**tiers_expire_in** | **String** | The amount of time after which the tier expires. 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. | [optional] -**tiers_downgrade_policy** | **String** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **program_join_policy** | **String** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] +**tiers_expiration_policy** | **String** | The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. | [optional] +**tier_cycle_start_date** | **DateTime** | Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. | [optional] +**tiers_expire_in** | **String** | The amount of time after which the tier expires and is reevaluated. 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. | [optional] +**tiers_downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] +**card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **account_id** | **Integer** | The ID of the Talon.One account that owns this program. | **name** | **String** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**Array<LoyaltyTier>**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **String** | A string containing an IANA timezone descriptor. | **card_based** | **Boolean** | Defines the type of loyalty program: - `true`: the program is a card-based. - `false`: the program is profile-based. | [default to false] **can_update_tiers** | **Boolean** | `True` if the tier definitions can be updated. | [optional] [default to false] -**can_update_join_policy** | **Boolean** | Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`. | [optional] +**can_update_join_policy** | **Boolean** | `True` if the program join policy can be updated. | [optional] +**can_update_tier_expiration_policy** | **Boolean** | `True` if the tier expiration policy can be updated. | [optional] **can_upgrade_to_advanced_tiers** | **Boolean** | `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. | [optional] [default to false] +**can_update_subledgers** | **Boolean** | `True` if the `allowSubledger` property can be updated in the loyalty program. | [optional] [default to false] ## Code Sample @@ -42,10 +46,12 @@ instance = TalonOne::LoyaltyProgram.new(id: null, allow_subledger: false, users_per_card_limit: 111, sandbox: true, + program_join_policy: null, tiers_expiration_policy: null, + tier_cycle_start_date: 2021-09-12T10:12:42Z, tiers_expire_in: 27W_U, tiers_downgrade_policy: null, - program_join_policy: null, + card_code_settings: null, account_id: 1, name: my_program, tiers: [{name=Gold, minPoints=300, id=3, created=2021-06-10T09:05:27.993483Z, programID=139}, {name=Silver, minPoints=200, id=2, created=2021-06-10T09:04:59.355258Z, programId=139}, {name=Bronze, minPoints=100, id=1, created=2021-06-10T09:04:39.355258Z, programId=139}], @@ -53,7 +59,9 @@ instance = TalonOne::LoyaltyProgram.new(id: null, card_based: true, can_update_tiers: true, can_update_join_policy: true, - can_upgrade_to_advanced_tiers: true) + can_update_tier_expiration_policy: true, + can_upgrade_to_advanced_tiers: true, + can_update_subledgers: true) ``` diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index 53b12ac..a4501a5 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* Method | HTTP request | Description ------------- | ------------- | ------------- -[**activate_user_by_email**](ManagementApi.md#activate_user_by_email) | **POST** /v1/users/activate | Activate user by email address +[**activate_user_by_email**](ManagementApi.md#activate_user_by_email) | **POST** /v1/users/activate | Enable user by email address [**add_loyalty_card_points**](ManagementApi.md#add_loyalty_card_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card [**add_loyalty_points**](ManagementApi.md#add_loyalty_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile [**copy_campaign_to_applications**](ManagementApi.md#copy_campaign_to_applications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application @@ -12,17 +12,19 @@ Method | HTTP request | Description [**create_achievement**](ManagementApi.md#create_achievement) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | Create achievement [**create_additional_cost**](ManagementApi.md#create_additional_cost) | **POST** /v1/additional_costs | Create additional cost [**create_attribute**](ManagementApi.md#create_attribute) | **POST** /v1/attributes | Create custom attribute +[**create_batch_loyalty_cards**](ManagementApi.md#create_batch_loyalty_cards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/cards/batch | Create loyalty cards [**create_campaign_from_template**](ManagementApi.md#create_campaign_from_template) | **POST** /v1/applications/{applicationId}/create_campaign_from_template | Create campaign from campaign template [**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_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 [**create_invite_v2**](ManagementApi.md#create_invite_v2) | **POST** /v2/invites | Invite user [**create_password_recovery_email**](ManagementApi.md#create_password_recovery_email) | **POST** /v1/password_recovery_emails | Request a password reset [**create_session**](ManagementApi.md#create_session) | **POST** /v1/sessions | Create session [**create_store**](ManagementApi.md#create_store) | **POST** /v1/applications/{applicationId}/stores | Create store -[**deactivate_user_by_email**](ManagementApi.md#deactivate_user_by_email) | **POST** /v1/users/deactivate | Deactivate user by email address +[**deactivate_user_by_email**](ManagementApi.md#deactivate_user_by_email) | **POST** /v1/users/deactivate | Disable user by email address [**deduct_loyalty_card_points**](ManagementApi.md#deduct_loyalty_card_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card [**delete_account_collection**](ManagementApi.md#delete_account_collection) | **DELETE** /v1/collections/{collectionId} | Delete account-level collection [**delete_achievement**](ManagementApi.md#delete_achievement) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Delete achievement @@ -36,9 +38,11 @@ Method | HTTP request | Description [**delete_user**](ManagementApi.md#delete_user) | **DELETE** /v1/users/{userId} | Delete user [**delete_user_by_email**](ManagementApi.md#delete_user_by_email) | **POST** /v1/users/delete | Delete user by email address [**destroy_session**](ManagementApi.md#destroy_session) | **DELETE** /v1/sessions | Destroy session +[**disconnect_campaign_stores**](ManagementApi.md#disconnect_campaign_stores) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores [**export_account_collection_items**](ManagementApi.md#export_account_collection_items) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items [**export_achievements**](ManagementApi.md#export_achievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data [**export_audiences_memberships**](ManagementApi.md#export_audiences_memberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members +[**export_campaign_stores**](ManagementApi.md#export_campaign_stores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores [**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 @@ -48,6 +52,7 @@ Method | HTTP request | Description [**export_loyalty_balances**](ManagementApi.md#export_loyalty_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances | Export customer loyalty balances [**export_loyalty_card_balances**](ManagementApi.md#export_loyalty_card_balances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs [**export_loyalty_card_ledger**](ManagementApi.md#export_loyalty_card_ledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log +[**export_loyalty_cards**](ManagementApi.md#export_loyalty_cards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards [**export_loyalty_ledger**](ManagementApi.md#export_loyalty_ledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs [**export_pool_giveaways**](ManagementApi.md#export_pool_giveaways) | **GET** /v1/giveaways/pools/{poolId}/export | Export giveaway codes of a giveaway pool [**export_referrals**](ManagementApi.md#export_referrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals @@ -117,6 +122,7 @@ Method | HTTP request | Description [**import_account_collection**](ManagementApi.md#import_account_collection) | **POST** /v1/collections/{collectionId}/import | Import data into existing account-level collection [**import_allowed_list**](ManagementApi.md#import_allowed_list) | **POST** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute [**import_audiences_memberships**](ManagementApi.md#import_audiences_memberships) | **POST** /v1/audiences/{audienceId}/memberships/import | Import audience members +[**import_campaign_stores**](ManagementApi.md#import_campaign_stores) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/import | Import stores [**import_collection**](ManagementApi.md#import_collection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data into existing campaign-level collection [**import_coupons**](ManagementApi.md#import_coupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons [**import_loyalty_cards**](ManagementApi.md#import_loyalty_cards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards @@ -133,11 +139,21 @@ Method | HTTP request | Description [**list_collections_in_application**](ManagementApi.md#list_collections_in_application) | **GET** /v1/applications/{applicationId}/collections | List collections in Application [**list_stores**](ManagementApi.md#list_stores) | **GET** /v1/applications/{applicationId}/stores | List stores [**notification_activation**](ManagementApi.md#notification_activation) | **PUT** /v1/notifications/{notificationId}/activation | Activate or deactivate notification +[**okta_event_handler_challenge**](ManagementApi.md#okta_event_handler_challenge) | **GET** /v1/provisioning/okta | Validate Okta API ownership [**post_added_deducted_points_notification**](ManagementApi.md#post_added_deducted_points_notification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points | Create notification about added or deducted loyalty points [**post_catalogs_strikethrough_notification**](ManagementApi.md#post_catalogs_strikethrough_notification) | **POST** /v1/applications/{applicationId}/catalogs/notifications/strikethrough | Create strikethrough notification [**post_pending_points_notification**](ManagementApi.md#post_pending_points_notification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points | Create notification about pending loyalty points [**remove_loyalty_points**](ManagementApi.md#remove_loyalty_points) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile [**reset_password**](ManagementApi.md#reset_password) | **POST** /v1/reset_password | Reset password +[**scim_create_user**](ManagementApi.md#scim_create_user) | **POST** /v1/provisioning/scim/Users | Create SCIM user +[**scim_delete_user**](ManagementApi.md#scim_delete_user) | **DELETE** /v1/provisioning/scim/Users/{userId} | Delete SCIM user +[**scim_get_resource_types**](ManagementApi.md#scim_get_resource_types) | **GET** /v1/provisioning/scim/ResourceTypes | List supported SCIM resource types +[**scim_get_schemas**](ManagementApi.md#scim_get_schemas) | **GET** /v1/provisioning/scim/Schemas | List supported SCIM schemas +[**scim_get_service_provider_config**](ManagementApi.md#scim_get_service_provider_config) | **GET** /v1/provisioning/scim/ServiceProviderConfig | Get SCIM service provider configuration +[**scim_get_user**](ManagementApi.md#scim_get_user) | **GET** /v1/provisioning/scim/Users/{userId} | Get SCIM user +[**scim_get_users**](ManagementApi.md#scim_get_users) | **GET** /v1/provisioning/scim/Users | List SCIM users +[**scim_patch_user**](ManagementApi.md#scim_patch_user) | **PATCH** /v1/provisioning/scim/Users/{userId} | Update SCIM user attributes +[**scim_replace_user_attributes**](ManagementApi.md#scim_replace_user_attributes) | **PUT** /v1/provisioning/scim/Users/{userId} | Update SCIM user [**search_coupons_advanced_application_wide_without_total_count**](ManagementApi.md#search_coupons_advanced_application_wide_without_total_count) | **POST** /v1/applications/{applicationId}/coupons_search_advanced/no_total | List coupons that match the given attributes (without total count) [**search_coupons_advanced_without_total_count**](ManagementApi.md#search_coupons_advanced_without_total_count) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total | List coupons that match the given attributes in campaign (without total count) [**transfer_loyalty_card**](ManagementApi.md#transfer_loyalty_card) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer | Transfer card data @@ -161,9 +177,9 @@ Method | HTTP request | Description > activate_user_by_email(body) -Activate user by email address +Enable user by email address -Activate a deactivated user by their email address. +Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. ### Example @@ -187,7 +203,7 @@ api_instance = TalonOne::ManagementApi.new body = TalonOne::ActivateUserRequest.new # ActivateUserRequest | body begin - #Activate user by email address + #Enable user by email address api_instance.activate_user_by_email(body) rescue TalonOne::ApiError => e puts "Exception when calling ManagementApi->activate_user_by_email: #{e}" @@ -642,6 +658,67 @@ Name | Type | Description | Notes - **Accept**: application/json +## create_batch_loyalty_cards + +> LoyaltyCardBatchResponse create_batch_loyalty_cards(loyalty_program_id, body) + +Create loyalty cards + +Create a batch of loyalty cards in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. **Important:** - The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes. - Trying to create more than 20,000 loyalty cards in a single request returns an error message with a `400` status code. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +loyalty_program_id = 56 # Integer | 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. +body = TalonOne::LoyaltyCardBatch.new # LoyaltyCardBatch | body + +begin + #Create loyalty cards + result = api_instance.create_batch_loyalty_cards(loyalty_program_id, body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->create_batch_loyalty_cards: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyalty_program_id** | **Integer**| 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. | + **body** | [**LoyaltyCardBatch**](LoyaltyCardBatch.md)| body | + +### Return type + +[**LoyaltyCardBatchResponse**](LoyaltyCardBatchResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## create_campaign_from_template > CreateTemplateCampaignResponse create_campaign_from_template(application_id, body) @@ -896,6 +973,69 @@ Name | Type | Description | Notes - **Accept**: application/json +## create_coupons_deletion_job + +> AsyncCouponDeletionJobResponse create_coupons_deletion_job(application_id, campaign_id, body) + +Creates a coupon deletion job + +This endpoint handles creating a job to delete coupons asynchronously. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +application_id = 56 # Integer | The ID of the Application. It is displayed in your Talon.One deployment URL. +campaign_id = 56 # Integer | The ID of the campaign. It is displayed in your Talon.One deployment URL. +body = TalonOne::NewCouponDeletionJob.new # NewCouponDeletionJob | body + +begin + #Creates a coupon deletion job + result = api_instance.create_coupons_deletion_job(application_id, campaign_id, body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->create_coupons_deletion_job: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **Integer**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaign_id** | **Integer**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **body** | [**NewCouponDeletionJob**](NewCouponDeletionJob.md)| body | + +### Return type + +[**AsyncCouponDeletionJobResponse**](AsyncCouponDeletionJobResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## create_coupons_for_multiple_recipients > InlineResponse2008 create_coupons_for_multiple_recipients(application_id, campaign_id, body, opts) @@ -1264,9 +1404,9 @@ Name | Type | Description | Notes > deactivate_user_by_email(body) -Deactivate user by email address +Disable user by email address -Deactivate a specific user by their email address. +[Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. ### Example @@ -1290,7 +1430,7 @@ api_instance = TalonOne::ManagementApi.new body = TalonOne::DeactivateUserRequest.new # DeactivateUserRequest | body begin - #Deactivate user by email address + #Disable user by email address api_instance.deactivate_user_by_email(body) rescue TalonOne::ApiError => e puts "Exception when calling ManagementApi->deactivate_user_by_email: #{e}" @@ -1717,10 +1857,10 @@ opts = { value: 'value_example', # String | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. created_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - starts_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - starts_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - expires_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - expires_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + starts_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + starts_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + expires_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + expires_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. valid: 'valid_example', # String | - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. batch_id: 'batch_id_example', # String | Filter results by batches of coupons usable: 'usable_example', # String | - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. @@ -1747,10 +1887,10 @@ Name | Type | Description | Notes **value** | **String**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **created_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon 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 coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] - **starts_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] - **starts_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] - **expires_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] - **expires_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **starts_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **starts_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **expires_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **expires_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] **valid** | **String**| - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. | [optional] **batch_id** | **String**| Filter results by batches of coupons | [optional] **usable** | **String**| - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. | [optional] @@ -2018,7 +2158,7 @@ nil (empty response body) Delete user by email address -Delete a specific user by their email address. +[Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address. ### Example @@ -2124,6 +2264,66 @@ nil (empty response body) - **Accept**: Not defined +## disconnect_campaign_stores + +> disconnect_campaign_stores(application_id, campaign_id) + +Disconnect stores + +Disconnect the stores linked to a specific campaign. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +application_id = 56 # Integer | The ID of the Application. It is displayed in your Talon.One deployment URL. +campaign_id = 56 # Integer | The ID of the campaign. It is displayed in your Talon.One deployment URL. + +begin + #Disconnect stores + api_instance.disconnect_campaign_stores(application_id, campaign_id) +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->disconnect_campaign_stores: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **Integer**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaign_id** | **Integer**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + +### Return type + +nil (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## export_account_collection_items > String export_account_collection_items(collection_id) @@ -2305,6 +2505,67 @@ Name | Type | Description | Notes - **Accept**: application/csv +## export_campaign_stores + +> String export_campaign_stores(application_id, campaign_id) + +Export stores + +Download a CSV file containing the stores linked to a specific campaign. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following column: - `store_integration_id`: The identifier of the store. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +application_id = 56 # Integer | The ID of the Application. It is displayed in your Talon.One deployment URL. +campaign_id = 56 # Integer | The ID of the campaign. It is displayed in your Talon.One deployment URL. + +begin + #Export stores + result = api_instance.export_campaign_stores(application_id, campaign_id) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->export_campaign_stores: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **Integer**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaign_id** | **Integer**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + +### Return type + +**String** + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/csv + + ## export_collection_items > String export_collection_items(application_id, campaign_id, collection_id) @@ -2409,7 +2670,7 @@ opts = { batch_id: 'batch_id_example', # String | Filter results by batches of coupons exact_match: false, # Boolean | Filter results to an exact case-insensitive matching against the coupon code. date_format: 'date_format_example', # String | Determines the format of dates in the export document. - campaign_state: 'campaign_state_example', # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + campaign_state: 'campaign_state_example', # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. values_only: false # Boolean | Filter results to only return the coupon codes (`value` column) without the associated coupon data. } @@ -2440,7 +2701,7 @@ Name | Type | Description | Notes **batch_id** | **String**| Filter results by batches of coupons | [optional] **exact_match** | **Boolean**| Filter results to an exact case-insensitive matching against the coupon code. | [optional] [default to false] **date_format** | **String**| Determines the format of dates in the export document. | [optional] - **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] + **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. | [optional] **values_only** | **Boolean**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [optional] [default to false] ### Return type @@ -2534,7 +2795,7 @@ Name | Type | Description | Notes Export customers' tier data -Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. +Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported. ### Example @@ -2623,8 +2884,8 @@ api_instance = TalonOne::ManagementApi.new application_id = 56 # Integer | The ID of the Application. It is displayed in your Talon.One deployment URL. opts = { campaign_id: 3.4, # Float | Filter results by campaign. - created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - created_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. + created_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. date_format: 'date_format_example' # String | Determines the format of dates in the export document. } @@ -2644,8 +2905,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **application_id** | **Integer**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaign_id** | **Float**| Filter results by campaign. | [optional] - **created_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon 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 coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **created_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. 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. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] **date_format** | **String**| Determines the format of dates in the export document. | [optional] ### Return type @@ -2920,13 +3181,13 @@ Name | Type | Description | Notes - **Accept**: application/csv -## export_loyalty_ledger +## export_loyalty_cards -> String export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts) +> String export_loyalty_cards(loyalty_program_id, opts) -Export customer's transaction logs +Export loyalty cards -Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. +Download a CSV file containing the loyalty cards from a specified loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in. ### Example @@ -2947,20 +3208,17 @@ TalonOne.configure do |config| end api_instance = TalonOne::ManagementApi.new -range_start = DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Only return results from after this timestamp. **Note:** - This 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. -range_end = DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Only return results from before this timestamp. **Note:** - This 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. -loyalty_program_id = 'loyalty_program_id_example' # String | The identifier for the loyalty program. -integration_id = 'integration_id_example' # String | The identifier of the profile. +loyalty_program_id = 56 # Integer | 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. opts = { - date_format: 'date_format_example' # String | Determines the format of dates in the export document. + batch_id: 'batch_id_example' # String | Filter results by loyalty card batch ID. } begin - #Export customer's transaction logs - result = api_instance.export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts) + #Export loyalty cards + result = api_instance.export_loyalty_cards(loyalty_program_id, opts) p result rescue TalonOne::ApiError => e - puts "Exception when calling ManagementApi->export_loyalty_ledger: #{e}" + puts "Exception when calling ManagementApi->export_loyalty_cards: #{e}" end ``` @@ -2969,11 +3227,8 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **range_start** | **DateTime**| Only return results from after this timestamp. **Note:** - This 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. | - **range_end** | **DateTime**| Only return results from before this timestamp. **Note:** - This 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. | - **loyalty_program_id** | **String**| The identifier for the loyalty program. | - **integration_id** | **String**| The identifier of the profile. | - **date_format** | **String**| Determines the format of dates in the export document. | [optional] + **loyalty_program_id** | **Integer**| 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. | + **batch_id** | **String**| Filter results by loyalty card batch ID. | [optional] ### Return type @@ -2989,13 +3244,13 @@ Name | Type | Description | Notes - **Accept**: application/csv -## export_pool_giveaways +## export_loyalty_ledger -> String export_pool_giveaways(pool_id, opts) +> String export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts) -Export giveaway codes of a giveaway pool +Export customer's transaction logs -Download a CSV file containing the giveaway codes of a specific giveaway pool. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `id`: The internal ID of the giveaway. - `poolid`: The internal ID of the giveaway pool. - `code`: The giveaway code. - `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). - `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). - `attributes`: Any custom attributes associated with the giveaway code (can be empty). - `used`: An indication of whether the giveaway is already awarded. - `importid`: The ID of the import which created the giveaway. - `created`: The creation time of the giveaway code. - `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist. +Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. ### Example @@ -3016,18 +3271,20 @@ TalonOne.configure do |config| end api_instance = TalonOne::ManagementApi.new -pool_id = 56 # Integer | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. +range_start = DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Only return results from after this timestamp. **Note:** - This 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. +range_end = DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Only return results from before this timestamp. **Note:** - This 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. +loyalty_program_id = 'loyalty_program_id_example' # String | The identifier for the loyalty program. +integration_id = 'integration_id_example' # String | The identifier of the profile. opts = { - created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. - created_after: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. + date_format: 'date_format_example' # String | Determines the format of dates in the export document. } begin - #Export giveaway codes of a giveaway pool - result = api_instance.export_pool_giveaways(pool_id, opts) + #Export customer's transaction logs + result = api_instance.export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts) p result rescue TalonOne::ApiError => e - puts "Exception when calling ManagementApi->export_pool_giveaways: #{e}" + puts "Exception when calling ManagementApi->export_loyalty_ledger: #{e}" end ``` @@ -3036,8 +3293,75 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pool_id** | **Integer**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | - **created_before** | **DateTime**| Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. | [optional] + **range_start** | **DateTime**| Only return results from after this timestamp. **Note:** - This 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. | + **range_end** | **DateTime**| Only return results from before this timestamp. **Note:** - This 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. | + **loyalty_program_id** | **String**| The identifier for the loyalty program. | + **integration_id** | **String**| The identifier of the profile. | + **date_format** | **String**| Determines the format of dates in the export document. | [optional] + +### Return type + +**String** + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/csv + + +## export_pool_giveaways + +> String export_pool_giveaways(pool_id, opts) + +Export giveaway codes of a giveaway pool + +Download a CSV file containing the giveaway codes of a specific giveaway pool. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `id`: The internal ID of the giveaway. - `poolid`: The internal ID of the giveaway pool. - `code`: The giveaway code. - `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). - `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). - `attributes`: Any custom attributes associated with the giveaway code (can be empty). - `used`: An indication of whether the giveaway is already awarded. - `importid`: The ID of the import which created the giveaway. - `created`: The creation time of the giveaway code. - `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +pool_id = 56 # Integer | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. +opts = { + created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. + created_after: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. +} + +begin + #Export giveaway codes of a giveaway pool + result = api_instance.export_pool_giveaways(pool_id, opts) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->export_pool_giveaways: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pool_id** | **Integer**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | + **created_before** | **DateTime**| Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. | [optional] **created_after** | **DateTime**| Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. | [optional] ### Return type @@ -4886,7 +5210,7 @@ opts = { page_size: 1000, # Integer | The number of items in the response. skip: 56, # Integer | The number of items to skip when paging through large result sets. sort: 'sort_example', # String | 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:** This parameter works only with numeric fields. - campaign_state: 'campaign_state_example' # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + campaign_state: 'campaign_state_example' # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. } begin @@ -4908,7 +5232,7 @@ Name | Type | Description | Notes **page_size** | **Integer**| The number of items in the response. | [optional] [default to 1000] **skip** | **Integer**| The number of items to skip when paging through large result sets. | [optional] **sort** | **String**| 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:** This parameter works only with numeric fields. | [optional] - **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] + **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. | [optional] ### Return type @@ -5153,7 +5477,7 @@ opts = { page_size: 1000, # Integer | The number of items in the response. skip: 56, # Integer | The number of items to skip when paging through large result sets. sort: 'sort_example', # String | 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:** This parameter works only with numeric fields. - campaign_state: 'campaign_state_example', # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + campaign_state: 'campaign_state_example', # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. name: 'name_example', # String | Filter results performing case-insensitive matching against the name of the campaign. tags: 'tags_example', # String | Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. @@ -5181,7 +5505,7 @@ Name | Type | Description | Notes **page_size** | **Integer**| The number of items in the response. | [optional] [default to 1000] **skip** | **Integer**| The number of items to skip when paging through large result sets. | [optional] **sort** | **String**| 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:** This parameter works only with numeric fields. | [optional] - **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] + **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. | [optional] **name** | **String**| Filter results performing case-insensitive matching against the name of the campaign. | [optional] **tags** | **String**| Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values | [optional] **created_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] @@ -5451,10 +5775,16 @@ opts = { created_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. valid: 'valid_example', # String | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. usable: 'usable_example', # String | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. + redeemed: 'redeemed_example', # String | - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. referral_id: 56, # Integer | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. recipient_integration_id: 'recipient_integration_id_example', # String | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field batch_id: 'batch_id_example', # String | Filter results by batches of coupons - exact_match: false # Boolean | Filter results to an exact case-insensitive matching against the coupon code + exact_match: false, # Boolean | Filter results to an exact case-insensitive matching against the coupon code + expires_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + expires_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + starts_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + starts_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + values_only: false # Boolean | Filter results to only return the coupon codes (`value` column) without the associated coupon data. } begin @@ -5481,10 +5811,16 @@ Name | Type | Description | Notes **created_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] **valid** | **String**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **usable** | **String**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] + **redeemed** | **String**| - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. | [optional] **referral_id** | **Integer**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] **recipient_integration_id** | **String**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] **batch_id** | **String**| Filter results by batches of coupons | [optional] **exact_match** | **Boolean**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] + **expires_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **expires_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **starts_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **starts_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] + **values_only** | **Boolean**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [optional] [default to false] ### Return type @@ -6285,8 +6621,9 @@ opts = { page_size: 1000, # Integer | The number of items in the response. skip: 56, # Integer | The number of items to skip when paging through large result sets. sort: 'sort_example', # String | 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:** This parameter works only with numeric fields. - identifier: 'identifier_example', # String | Optional query parameter to search cards by identifier. - profile_id: 56 # Integer | Filter by the profile ID. + identifier: 'identifier_example', # String | The card code by which to filter loyalty cards in the response. + profile_id: 56, # Integer | Filter results by customer profile ID. + batch_id: 'batch_id_example' # String | Filter results by loyalty card batch ID. } begin @@ -6307,8 +6644,9 @@ Name | Type | Description | Notes **page_size** | **Integer**| The number of items in the response. | [optional] [default to 1000] **skip** | **Integer**| The number of items to skip when paging through large result sets. | [optional] **sort** | **String**| 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:** This parameter works only with numeric fields. | [optional] - **identifier** | **String**| Optional query parameter to search cards by identifier. | [optional] - **profile_id** | **Integer**| Filter by the profile ID. | [optional] + **identifier** | **String**| The card code by which to filter loyalty cards in the response. | [optional] + **profile_id** | **Integer**| Filter results by customer profile ID. | [optional] + **batch_id** | **String**| Filter results by loyalty card batch ID. | [optional] ### Return type @@ -7331,7 +7669,7 @@ end api_instance = TalonOne::ManagementApi.new opts = { - application_ids: 'application_ids_example', # String | Filter by one or more Application IDs, separated by a comma. + application_ids: 'application_ids_example', # String | Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. sort: 'sort_example', # String | 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:** This parameter works only with numeric fields. page_size: 1000, # Integer | The number of items in the response. skip: 56, # Integer | The number of items to skip when paging through large result sets. @@ -7355,7 +7693,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **application_ids** | **String**| Filter by one or more Application IDs, separated by a comma. | [optional] + **application_ids** | **String**| Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. | [optional] **sort** | **String**| 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:** This parameter works only with numeric fields. | [optional] **page_size** | **Integer**| The number of items in the response. | [optional] [default to 1000] **skip** | **Integer**| The number of items to skip when paging through large result sets. | [optional] @@ -7567,6 +7905,71 @@ Name | Type | Description | Notes - **Accept**: application/json +## import_campaign_stores + +> Import import_campaign_stores(application_id, campaign_id, opts) + +Import stores + +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. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +application_id = 56 # Integer | The ID of the Application. It is displayed in your Talon.One deployment URL. +campaign_id = 56 # Integer | The ID of the campaign. It is displayed in your Talon.One deployment URL. +opts = { + up_file: 'up_file_example' # String | The file containing the data that is being imported. +} + +begin + #Import stores + result = api_instance.import_campaign_stores(application_id, campaign_id, opts) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->import_campaign_stores: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **Integer**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaign_id** | **Integer**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **up_file** | **String**| The file containing the data that is being imported. | [optional] + +### Return type + +[**Import**](Import.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + ## import_collection > Import import_collection(application_id, campaign_id, collection_id, opts) @@ -7770,7 +8173,7 @@ Name | Type | Description | Notes Import customers into loyalty tiers -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. 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 500MB. **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 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 500MB. **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 ``` ### Example @@ -8024,7 +8427,7 @@ Name | Type | Description | Notes Invite user from identity provider -Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. +[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. ### Example @@ -8621,6 +9024,60 @@ nil (empty response body) - **Accept**: Not defined +## okta_event_handler_challenge + +> okta_event_handler_challenge + +Validate Okta API ownership + +Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new + +begin + #Validate Okta API ownership + api_instance.okta_event_handler_challenge +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->okta_event_handler_challenge: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +nil (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + ## post_added_deducted_points_notification > BaseNotification post_added_deducted_points_notification(loyalty_program_id, body) @@ -8925,6 +9382,524 @@ Name | Type | Description | Notes - **Accept**: application/json +## scim_create_user + +> ScimUser scim_create_user(body) + +Create SCIM user + +Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +body = TalonOne::ScimNewUser.new # ScimNewUser | body + +begin + #Create SCIM user + result = api_instance.scim_create_user(body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_create_user: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ScimNewUser**](ScimNewUser.md)| body | + +### Return type + +[**ScimUser**](ScimUser.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## scim_delete_user + +> scim_delete_user(user_id) + +Delete SCIM user + +Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +user_id = 56 # Integer | The ID of the user. + +begin + #Delete SCIM user + api_instance.scim_delete_user(user_id) +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_delete_user: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **Integer**| The ID of the user. | + +### Return type + +nil (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## scim_get_resource_types + +> ScimResourceTypesListResponse scim_get_resource_types + +List supported SCIM resource types + +Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new + +begin + #List supported SCIM resource types + result = api_instance.scim_get_resource_types + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_get_resource_types: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ScimResourceTypesListResponse**](ScimResourceTypesListResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## scim_get_schemas + +> ScimSchemasListResponse scim_get_schemas + +List supported SCIM schemas + +Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new + +begin + #List supported SCIM schemas + result = api_instance.scim_get_schemas + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_get_schemas: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ScimSchemasListResponse**](ScimSchemasListResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## scim_get_service_provider_config + +> ScimServiceProviderConfigResponse scim_get_service_provider_config + +Get SCIM service provider configuration + +Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new + +begin + #Get SCIM service provider configuration + result = api_instance.scim_get_service_provider_config + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_get_service_provider_config: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ScimServiceProviderConfigResponse**](ScimServiceProviderConfigResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## scim_get_user + +> ScimUser scim_get_user(user_id) + +Get SCIM user + +Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +user_id = 56 # Integer | The ID of the user. + +begin + #Get SCIM user + result = api_instance.scim_get_user(user_id) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_get_user: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **Integer**| The ID of the user. | + +### Return type + +[**ScimUser**](ScimUser.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## scim_get_users + +> ScimUsersListResponse scim_get_users + +List SCIM users + +Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new + +begin + #List SCIM users + result = api_instance.scim_get_users + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_get_users: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ScimUsersListResponse**](ScimUsersListResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## scim_patch_user + +> ScimUser scim_patch_user(user_id, body) + +Update SCIM user attributes + +Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +user_id = 56 # Integer | The ID of the user. +body = TalonOne::ScimPatchRequest.new # ScimPatchRequest | body + +begin + #Update SCIM user attributes + result = api_instance.scim_patch_user(user_id, body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_patch_user: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **Integer**| The ID of the user. | + **body** | [**ScimPatchRequest**](ScimPatchRequest.md)| body | + +### Return type + +[**ScimUser**](ScimUser.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## scim_replace_user_attributes + +> ScimUser scim_replace_user_attributes(user_id, body) + +Update SCIM user + +Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload. + +### Example + +```ruby +# load the gem +require 'talon_one' +# setup authorization +TalonOne.configure do |config| + # Configure API key authorization: management_key + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' + + # Configure API key authorization: manager_auth + config.api_key['Authorization'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['Authorization'] = 'Bearer' +end + +api_instance = TalonOne::ManagementApi.new +user_id = 56 # Integer | The ID of the user. +body = TalonOne::ScimNewUser.new # ScimNewUser | body + +begin + #Update SCIM user + result = api_instance.scim_replace_user_attributes(user_id, body) + p result +rescue TalonOne::ApiError => e + puts "Exception when calling ManagementApi->scim_replace_user_attributes: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **Integer**| The ID of the user. | + **body** | [**ScimNewUser**](ScimNewUser.md)| body | + +### Return type + +[**ScimUser**](ScimUser.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## search_coupons_advanced_application_wide_without_total_count > InlineResponse2009 search_coupons_advanced_application_wide_without_total_count(application_id, body, opts) @@ -8967,7 +9942,7 @@ opts = { recipient_integration_id: 'recipient_integration_id_example', # String | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field batch_id: 'batch_id_example', # String | Filter results by batches of coupons exact_match: false, # Boolean | Filter results to an exact case-insensitive matching against the coupon code - campaign_state: 'campaign_state_example' # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + campaign_state: 'campaign_state_example' # String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. } begin @@ -8998,7 +9973,7 @@ Name | Type | Description | Notes **recipient_integration_id** | **String**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] **batch_id** | **String**| Filter results by batches of coupons | [optional] **exact_match** | **Boolean**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] - **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] + **campaign_state** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. | [optional] ### Return type @@ -9547,7 +10522,7 @@ Name | Type | Description | Notes Update coupon -Update the specified coupon.

Important

With this PUT endpoint only, any property you do not explicitly set in your request will be set to null.

+Update the specified coupon.

Important

With this PUT endpoint alone, if you do not explicitly set a value for the startDate, expiryDate, and recipientIntegrationId properties in your request, it is automatically set to null.

### Example diff --git a/docs/MessageLogResponse.md b/docs/MessageLogResponse.md index 4788400..27919c4 100644 --- a/docs/MessageLogResponse.md +++ b/docs/MessageLogResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **DateTime** | Timestamp when the response was received. | -**response** | **String** | Raw response data. | -**status** | **Integer** | HTTP status code of the response. | +**created_at** | **DateTime** | Timestamp when the response was received. | [optional] +**response** | **String** | Raw response data. | [optional] +**status** | **Integer** | HTTP status code of the response. | [optional] ## Code Sample diff --git a/docs/NewAppWideCouponDeletionJob.md b/docs/NewAppWideCouponDeletionJob.md new file mode 100644 index 0000000..d5ff345 --- /dev/null +++ b/docs/NewAppWideCouponDeletionJob.md @@ -0,0 +1,19 @@ +# TalonOne::NewAppWideCouponDeletionJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**CouponDeletionFilters**](CouponDeletionFilters.md) | | +**campaignids** | **Array<Integer>** | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::NewAppWideCouponDeletionJob.new(filters: null, + campaignids: null) +``` + + diff --git a/docs/NewApplication.md b/docs/NewApplication.md index 6e18506..5ab475f 100644 --- a/docs/NewApplication.md +++ b/docs/NewApplication.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **enable_partial_discounts** | **Boolean** | Indicates if this Application supports partial discounts. | [optional] **default_discount_additional_cost_per_item_scope** | **String** | The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect. | [optional] **key** | **String** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits). | [optional] +**enable_campaign_state_management** | **Boolean** | Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. | [optional] ## Code Sample @@ -39,7 +40,8 @@ instance = TalonOne::NewApplication.new(name: My Application, sandbox: null, enable_partial_discounts: false, default_discount_additional_cost_per_item_scope: null, - key: null) + key: null, + enable_campaign_state_management: false) ``` diff --git a/docs/NewApplicationCIF.md b/docs/NewApplicationCIF.md new file mode 100644 index 0000000..c5e473d --- /dev/null +++ b/docs/NewApplicationCIF.md @@ -0,0 +1,27 @@ +# TalonOne::NewApplicationCIF + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The name of the Application cart item filter used in API requests. | +**description** | **String** | A short description of the Application cart item filter. | [optional] +**active_expression_id** | **Integer** | The ID of the expression that the Application cart item filter uses. | [optional] +**modified_by** | **Integer** | The ID of the user who last updated the Application cart item filter. | [optional] +**created_by** | **Integer** | The ID of the user who created the Application cart item filter. | [optional] +**modified** | **DateTime** | Timestamp of the most recent update to the Application cart item filter. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::NewApplicationCIF.new(name: Filter items by product, + description: This filter allows filtering by shoes, + active_expression_id: 1, + modified_by: 334, + created_by: 216, + modified: null) +``` + + diff --git a/docs/NewApplicationCIFExpression.md b/docs/NewApplicationCIFExpression.md new file mode 100644 index 0000000..93ec81b --- /dev/null +++ b/docs/NewApplicationCIFExpression.md @@ -0,0 +1,21 @@ +# TalonOne::NewApplicationCIFExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cart_item_filter_id** | **Integer** | The ID of the Application cart item filter. | [optional] +**created_by** | **Integer** | The ID of the user who created the Application cart item filter. | [optional] +**expression** | **Array<Object>** | Arbitrary additional JSON data associated with the Application cart item filter. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::NewApplicationCIFExpression.new(cart_item_filter_id: 216, + created_by: 216, + expression: {expr=[filter, [., Session, CartItems], [[Item], [catch, false, [=, [., Item, Category], Kitchen]]]]}) +``` + + diff --git a/docs/NewBaseNotification.md b/docs/NewBaseNotification.md index 465c420..f6a2aad 100644 --- a/docs/NewBaseNotification.md +++ b/docs/NewBaseNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**policy** | [**Object**](.md) | | +**policy** | [**Object**](.md) | Indicates which notification properties to apply. | **enabled** | **Boolean** | Indicates whether the notification is activated. | [optional] [default to true] **webhook** | [**NewNotificationWebhook**](NewNotificationWebhook.md) | | diff --git a/docs/NewCouponCreationJob.md b/docs/NewCouponCreationJob.md index fa2677c..5877a98 100644 --- a/docs/NewCouponCreationJob.md +++ b/docs/NewCouponCreationJob.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **number_of_coupons** | **Integer** | The number of new coupon codes to generate for the campaign. | **coupon_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **attributes** | [**Object**](.md) | Arbitrary properties associated with coupons. | diff --git a/docs/NewCouponDeletionJob.md b/docs/NewCouponDeletionJob.md new file mode 100644 index 0000000..b19f55d --- /dev/null +++ b/docs/NewCouponDeletionJob.md @@ -0,0 +1,17 @@ +# TalonOne::NewCouponDeletionJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**CouponDeletionFilters**](CouponDeletionFilters.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::NewCouponDeletionJob.new(filters: null) +``` + + diff --git a/docs/NewCoupons.md b/docs/NewCoupons.md index df7eb3f..d1aa2d2 100644 --- a/docs/NewCoupons.md +++ b/docs/NewCoupons.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **number_of_coupons** | **Integer** | The number of new coupon codes to generate for the campaign. Must be at least 1. | **unique_prefix** | **String** | **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#operation/createCouponsAsync) endpoint. | [optional] diff --git a/docs/NewCouponsForMultipleRecipients.md b/docs/NewCouponsForMultipleRecipients.md index 3736ec8..d3bd36c 100644 --- a/docs/NewCouponsForMultipleRecipients.md +++ b/docs/NewCouponsForMultipleRecipients.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **attributes** | [**Object**](.md) | Arbitrary properties associated with this item. | [optional] **recipients_integration_ids** | **Array<String>** | The integration IDs for recipients. | **valid_characters** | **Array<String>** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] diff --git a/docs/NewCustomerSessionV2.md b/docs/NewCustomerSessionV2.md index f5c4810..f69c5d4 100644 --- a/docs/NewCustomerSessionV2.md +++ b/docs/NewCustomerSessionV2.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **profile_id** | **String** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] **store_integration_id** | **String** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluable_campaign_ids** | **Array<Integer>** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] -**coupon_codes** | **Array<String>** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] -**referral_code** | **String** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] +**coupon_codes** | **Array<String>** | Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. | [optional] +**referral_code** | **String** | Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. | [optional] **loyalty_cards** | **Array<String>** | Identifier of a loyalty card. | [optional] **state** | **String** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [optional] [default to 'open'] **cart_items** | [**Array<CartItem>**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional] diff --git a/docs/NewLoyaltyProgram.md b/docs/NewLoyaltyProgram.md index a297ac6..bc1fa5f 100644 --- a/docs/NewLoyaltyProgram.md +++ b/docs/NewLoyaltyProgram.md @@ -12,10 +12,12 @@ Name | Type | Description | Notes **allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. | **users_per_card_limit** | **Integer** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **Boolean** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | -**tiers_expiration_policy** | **String** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] -**tiers_expire_in** | **String** | The amount of time after which the tier expires. 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. | [optional] -**tiers_downgrade_policy** | **String** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **program_join_policy** | **String** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] +**tiers_expiration_policy** | **String** | The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. | [optional] +**tier_cycle_start_date** | **DateTime** | Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. | [optional] +**tiers_expire_in** | **String** | The amount of time after which the tier expires and is reevaluated. 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. | [optional] +**tiers_downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] +**card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **name** | **String** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**Array<NewLoyaltyTier>**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **String** | A string containing an IANA timezone descriptor. | @@ -34,10 +36,12 @@ instance = TalonOne::NewLoyaltyProgram.new(title: Point collection, allow_subledger: false, users_per_card_limit: 111, sandbox: true, + program_join_policy: null, tiers_expiration_policy: null, + tier_cycle_start_date: 2021-09-12T10:12:42Z, tiers_expire_in: 27W_U, tiers_downgrade_policy: null, - program_join_policy: null, + card_code_settings: null, name: GeneralPointCollection, tiers: null, timezone: null, diff --git a/docs/NewOutgoingIntegrationWebhook.md b/docs/NewOutgoingIntegrationWebhook.md index 6083a12..ee1833d 100644 --- a/docs/NewOutgoingIntegrationWebhook.md +++ b/docs/NewOutgoingIntegrationWebhook.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **String** | Webhook title. | +**description** | **String** | A description of the webhook. | [optional] **application_ids** | **Array<Integer>** | IDs of the Applications to which a webhook must be linked. | ## Code Sample @@ -13,6 +14,7 @@ Name | Type | Description | Notes require 'TalonOne' instance = TalonOne::NewOutgoingIntegrationWebhook.new(title: Send email to customer via Braze, + description: A webhook to send a coupon to the user., application_ids: [1, 2, 3]) ``` diff --git a/docs/NewReferral.md b/docs/NewReferral.md index c85b194..5f2c7e8 100644 --- a/docs/NewReferral.md +++ b/docs/NewReferral.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | [optional] **campaign_id** | **Integer** | ID of the campaign from which the referral received the referral code. | **advocate_profile_integration_id** | **String** | The Integration ID of the Advocate's Profile. | diff --git a/docs/NewReferralsForMultipleAdvocates.md b/docs/NewReferralsForMultipleAdvocates.md index 920d9d2..ba50b26 100644 --- a/docs/NewReferralsForMultipleAdvocates.md +++ b/docs/NewReferralsForMultipleAdvocates.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaign_id** | **Integer** | The ID of the campaign from which the referral received the referral code. | **advocate_profile_integration_ids** | **Array<String>** | An array containing all the respective advocate profiles. | diff --git a/docs/NewRevisionVersion.md b/docs/NewRevisionVersion.md new file mode 100644 index 0000000..73818ff --- /dev/null +++ b/docs/NewRevisionVersion.md @@ -0,0 +1,37 @@ +# TalonOne::NewRevisionVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | A user-facing name for this campaign. | [optional] +**start_time** | **DateTime** | Timestamp when the campaign will become active. | [optional] +**end_time** | **DateTime** | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**Object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**description** | **String** | A detailed description of the campaign. | [optional] +**active_ruleset_id** | **Integer** | The ID of the ruleset this campaign template will use. | [optional] +**tags** | **Array<String>** | A list of tags for the campaign template. | [optional] +**coupon_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referral_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**Array<LimitConfig>**](LimitConfig.md) | The set of limits that will operate for this campaign version. | [optional] +**features** | **Array<String>** | A list of features for the campaign template. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::NewRevisionVersion.new(name: Summer promotions, + start_time: 2021-07-20T22:00Z, + end_time: 2021-09-22T22:00Z, + attributes: null, + description: Campaign for all summer 2021 promotions, + active_ruleset_id: 5, + tags: null, + coupon_settings: null, + referral_settings: null, + limits: null, + features: null) +``` + + diff --git a/docs/NewWebhook.md b/docs/NewWebhook.md index fbe5498..3078775 100644 --- a/docs/NewWebhook.md +++ b/docs/NewWebhook.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. | **title** | **String** | Name or title for this webhook. | +**description** | **String** | A description of the webhook. | [optional] **verb** | **String** | API method for this webhook. | **url** | **String** | API URL (supports templating using parameters) for this webhook. | **headers** | **Array<String>** | List of API HTTP headers for this webhook. | @@ -20,6 +21,7 @@ require 'TalonOne' instance = TalonOne::NewWebhook.new(application_ids: null, title: Send message, + description: A webhook to send a coupon to the user., verb: POST, url: www.my-company.com/my-endpoint-name, headers: [{"Authorization": "Basic bmF2ZWVua3VtYXIU="}, {"Content-Type": "application/json"}], diff --git a/docs/OktaEvent.md b/docs/OktaEvent.md new file mode 100644 index 0000000..d3ffd45 --- /dev/null +++ b/docs/OktaEvent.md @@ -0,0 +1,19 @@ +# TalonOne::OktaEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **String** | Event type defining an action. | +**target** | [**Array<OktaEventTarget>**](OktaEventTarget.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::OktaEvent.new(event_type: application.user_membership.add, + target: null) +``` + + diff --git a/docs/OktaEventPayload.md b/docs/OktaEventPayload.md new file mode 100644 index 0000000..6ff2419 --- /dev/null +++ b/docs/OktaEventPayload.md @@ -0,0 +1,17 @@ +# TalonOne::OktaEventPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OktaEventPayloadData**](OktaEventPayloadData.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::OktaEventPayload.new(data: null) +``` + + diff --git a/docs/OktaEventPayloadData.md b/docs/OktaEventPayloadData.md new file mode 100644 index 0000000..965f82f --- /dev/null +++ b/docs/OktaEventPayloadData.md @@ -0,0 +1,17 @@ +# TalonOne::OktaEventPayloadData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**Array<OktaEvent>**](OktaEvent.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::OktaEventPayloadData.new(events: null) +``` + + diff --git a/docs/OktaEventTarget.md b/docs/OktaEventTarget.md new file mode 100644 index 0000000..4502566 --- /dev/null +++ b/docs/OktaEventTarget.md @@ -0,0 +1,21 @@ +# TalonOne::OktaEventTarget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | Type of the event target. | +**alternate_id** | **String** | Identifier of the event target, depending on its type. | +**display_name** | **String** | Display name of the event target. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::OktaEventTarget.new(type: AppUser, + alternate_id: john.doe@example.com, + display_name: John Doe) +``` + + diff --git a/docs/ProjectedTier.md b/docs/ProjectedTier.md new file mode 100644 index 0000000..4f81991 --- /dev/null +++ b/docs/ProjectedTier.md @@ -0,0 +1,21 @@ +# TalonOne::ProjectedTier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projected_active_points** | **Float** | The active points of the customer when their current tier expires. | +**stay_in_tier_points** | **Float** | The number of points the customer needs to stay in the current tier. **Note**: This is included in the response when the customer is projected to be downgraded. | [optional] +**projected_tier_name** | **String** | The name of the tier the user will enter once their current tier expires. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ProjectedTier.new(projected_active_points: 198.0, + stay_in_tier_points: 2.0, + projected_tier_name: Tier 1) +``` + + diff --git a/docs/Referral.md b/docs/Referral.md index acfc294..a45bad7 100644 --- a/docs/Referral.md +++ b/docs/Referral.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **Integer** | Internal ID of this entity. | **created** | **DateTime** | The time this entity was created. | **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaign_id** | **Integer** | ID of the campaign from which the referral received the referral code. | **advocate_profile_integration_id** | **String** | The Integration ID of the Advocate's Profile. | diff --git a/docs/ReferralConstraints.md b/docs/ReferralConstraints.md index b2e37fb..03e1670 100644 --- a/docs/ReferralConstraints.md +++ b/docs/ReferralConstraints.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | [optional] ## Code Sample diff --git a/docs/RejectCouponEffectProps.md b/docs/RejectCouponEffectProps.md index 5be813e..eb0286e 100644 --- a/docs/RejectCouponEffectProps.md +++ b/docs/RejectCouponEffectProps.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **condition_index** | **Integer** | The index of the condition that caused the rejection of the coupon. | [optional] **effect_index** | **Integer** | The index of the effect that caused the rejection of the coupon. | [optional] **details** | **String** | More details about the failure. | [optional] +**campaign_exclusion_reason** | **String** | The reason why the campaign was not applied. | [optional] ## Code Sample @@ -19,7 +20,8 @@ instance = TalonOne::RejectCouponEffectProps.new(value: null, rejection_reason: null, condition_index: null, effect_index: null, - details: null) + details: null, + campaign_exclusion_reason: CampaignGaveLowerDiscount) ``` diff --git a/docs/RejectReferralEffectProps.md b/docs/RejectReferralEffectProps.md index 6e4853b..9f75978 100644 --- a/docs/RejectReferralEffectProps.md +++ b/docs/RejectReferralEffectProps.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **condition_index** | **Integer** | The index of the condition that caused the rejection of the referral. | [optional] **effect_index** | **Integer** | The index of the effect that caused the rejection of the referral. | [optional] **details** | **String** | More details about the failure. | [optional] +**campaign_exclusion_reason** | **String** | The reason why the campaign was not applied. | [optional] ## Code Sample @@ -19,7 +20,8 @@ instance = TalonOne::RejectReferralEffectProps.new(value: null, rejection_reason: null, condition_index: null, effect_index: null, - details: null) + details: null, + campaign_exclusion_reason: CampaignGaveLowerDiscount) ``` diff --git a/docs/Revision.md b/docs/Revision.md new file mode 100644 index 0000000..fa0ff89 --- /dev/null +++ b/docs/Revision.md @@ -0,0 +1,35 @@ +# TalonOne::Revision + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | +**activate_at** | **DateTime** | | [optional] +**account_id** | **Integer** | | +**application_id** | **Integer** | | +**campaign_id** | **Integer** | | +**created** | **DateTime** | | +**created_by** | **Integer** | | +**activated_at** | **DateTime** | | [optional] +**activated_by** | **Integer** | | [optional] +**current_version** | [**RevisionVersion**](RevisionVersion.md) | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::Revision.new(id: 6, + activate_at: null, + account_id: null, + application_id: null, + campaign_id: null, + created: null, + created_by: null, + activated_at: null, + activated_by: null, + current_version: null) +``` + + diff --git a/docs/RevisionActivation.md b/docs/RevisionActivation.md new file mode 100644 index 0000000..26f950b --- /dev/null +++ b/docs/RevisionActivation.md @@ -0,0 +1,17 @@ +# TalonOne::RevisionActivation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activate_at** | **DateTime** | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::RevisionActivation.new(activate_at: null) +``` + + diff --git a/docs/RevisionVersion.md b/docs/RevisionVersion.md new file mode 100644 index 0000000..d1ef6a2 --- /dev/null +++ b/docs/RevisionVersion.md @@ -0,0 +1,53 @@ +# TalonOne::RevisionVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | +**account_id** | **Integer** | | +**application_id** | **Integer** | | +**campaign_id** | **Integer** | | +**created** | **DateTime** | | +**created_by** | **Integer** | | +**revision_id** | **Integer** | | +**version** | **Integer** | | +**name** | **String** | A user-facing name for this campaign. | [optional] +**start_time** | **DateTime** | Timestamp when the campaign will become active. | [optional] +**end_time** | **DateTime** | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**Object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**description** | **String** | A detailed description of the campaign. | [optional] +**active_ruleset_id** | **Integer** | The ID of the ruleset this campaign template will use. | [optional] +**tags** | **Array<String>** | A list of tags for the campaign template. | [optional] +**coupon_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referral_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**Array<LimitConfig>**](LimitConfig.md) | The set of limits that will operate for this campaign version. | [optional] +**features** | **Array<String>** | A list of features for the campaign template. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::RevisionVersion.new(id: 6, + account_id: null, + application_id: null, + campaign_id: null, + created: null, + created_by: null, + revision_id: null, + version: null, + name: Summer promotions, + start_time: 2021-07-20T22:00Z, + end_time: 2021-09-22T22:00Z, + attributes: null, + description: Campaign for all summer 2021 promotions, + active_ruleset_id: 5, + tags: null, + coupon_settings: null, + referral_settings: null, + limits: null, + features: null) +``` + + diff --git a/docs/RollbackIncreasedAchievementProgressEffectProps.md b/docs/RollbackIncreasedAchievementProgressEffectProps.md new file mode 100644 index 0000000..9f1430c --- /dev/null +++ b/docs/RollbackIncreasedAchievementProgressEffectProps.md @@ -0,0 +1,27 @@ +# TalonOne::RollbackIncreasedAchievementProgressEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**achievement_id** | **Integer** | The internal ID of the achievement. | +**achievement_name** | **String** | The name of the achievement. | +**progress_tracker_id** | **Integer** | The internal ID of the achievement progress tracker. | +**decrease_progress_by** | **Float** | The value by which the customer's current progress in the achievement is decreased. | +**current_progress** | **Float** | The current progress of the customer in the achievement. | +**target** | **Float** | The target value to complete the achievement. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::RollbackIncreasedAchievementProgressEffectProps.new(achievement_id: 10, + achievement_name: FreeCoffee10Orders, + progress_tracker_id: null, + decrease_progress_by: null, + current_progress: null, + target: null) +``` + + diff --git a/docs/RuleFailureReason.md b/docs/RuleFailureReason.md index 0fa2b71..0ec679b 100644 --- a/docs/RuleFailureReason.md +++ b/docs/RuleFailureReason.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **condition_index** | **Integer** | The index of the condition that failed. | [optional] **effect_index** | **Integer** | The index of the effect that failed. | [optional] **details** | **String** | More details about the failure. | [optional] +**evaluation_group_id** | **Integer** | The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). | [optional] +**evaluation_group_mode** | **String** | The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign- | [optional] ## Code Sample @@ -33,7 +35,9 @@ instance = TalonOne::RuleFailureReason.new(campaign_id: null, rule_name: null, condition_index: null, effect_index: null, - details: null) + details: null, + evaluation_group_id: 3, + evaluation_group_mode: stackable) ``` diff --git a/docs/SSOConfig.md b/docs/SSOConfig.md index 691d1a3..ef877a2 100644 --- a/docs/SSOConfig.md +++ b/docs/SSOConfig.md @@ -5,13 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enforced** | **Boolean** | An indication of whether single sign-on is enforced for the account. When enforced, users cannot use their email and password to sign in to Talon.One. It is not possible to change this to `false` after it is set to `true`. | +**new_acs_url** | **String** | Assertion Consumer Service (ACS) URL for setting up a new SAML connection with an identity provider like Okta or Microsoft Entra ID. | [optional] ## Code Sample ```ruby require 'TalonOne' -instance = TalonOne::SSOConfig.new(enforced: true) +instance = TalonOne::SSOConfig.new(enforced: true, + new_acs_url: https://yourdeployment.talon.one/v1/saml_connections/5/saml_callback) ``` diff --git a/docs/ScimBaseUser.md b/docs/ScimBaseUser.md new file mode 100644 index 0000000..3831a06 --- /dev/null +++ b/docs/ScimBaseUser.md @@ -0,0 +1,23 @@ +# TalonOne::ScimBaseUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Status of the user. | [optional] +**display_name** | **String** | Display name of the user. | [optional] +**user_name** | **String** | Unique identifier of the user. This is usually an email address. | [optional] +**name** | [**ScimBaseUserName**](ScimBaseUserName.md) | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimBaseUser.new(active: true, + display_name: John Doe, + user_name: john.doe@example.com, + name: null) +``` + + diff --git a/docs/ScimBaseUserName.md b/docs/ScimBaseUserName.md new file mode 100644 index 0000000..98ae900 --- /dev/null +++ b/docs/ScimBaseUserName.md @@ -0,0 +1,17 @@ +# TalonOne::ScimBaseUserName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**formatted** | **String** | The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimBaseUserName.new(formatted: Mr. John J Doe) +``` + + diff --git a/docs/ScimNewUser.md b/docs/ScimNewUser.md new file mode 100644 index 0000000..0cdf991 --- /dev/null +++ b/docs/ScimNewUser.md @@ -0,0 +1,23 @@ +# TalonOne::ScimNewUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Status of the user. | [optional] +**display_name** | **String** | Display name of the user. | [optional] +**user_name** | **String** | Unique identifier of the user. This is usually an email address. | [optional] +**name** | [**ScimBaseUserName**](ScimBaseUserName.md) | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimNewUser.new(active: true, + display_name: John Doe, + user_name: john.doe@example.com, + name: null) +``` + + diff --git a/docs/ScimPatchOperation.md b/docs/ScimPatchOperation.md new file mode 100644 index 0000000..eb2eba1 --- /dev/null +++ b/docs/ScimPatchOperation.md @@ -0,0 +1,21 @@ +# TalonOne::ScimPatchOperation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**op** | **String** | The method that should be used in the operation. | +**path** | **String** | The path specifying the attribute that should be updated. | [optional] +**value** | **String** | The value that should be updated. Required if `op` is `add` or `replace`. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimPatchOperation.new(op: null, + path: null, + value: null) +``` + + diff --git a/docs/ScimPatchRequest.md b/docs/ScimPatchRequest.md new file mode 100644 index 0000000..1fe4149 --- /dev/null +++ b/docs/ScimPatchRequest.md @@ -0,0 +1,19 @@ +# TalonOne::ScimPatchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schemas** | **Array<String>** | SCIM schema for the given resource. | [optional] +**operations** | [**Array<ScimPatchOperation>**](ScimPatchOperation.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimPatchRequest.new(schemas: null, + operations: null) +``` + + diff --git a/docs/ScimResource.md b/docs/ScimResource.md new file mode 100644 index 0000000..4bc8b09 --- /dev/null +++ b/docs/ScimResource.md @@ -0,0 +1,21 @@ +# TalonOne::ScimResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | ID of the resource. | [optional] +**name** | **String** | Name of the resource. | [optional] +**description** | **String** | Human-readable description of the resource. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimResource.new(id: null, + name: null, + description: null) +``` + + diff --git a/docs/ScimResourceTypesListResponse.md b/docs/ScimResourceTypesListResponse.md new file mode 100644 index 0000000..17bd48b --- /dev/null +++ b/docs/ScimResourceTypesListResponse.md @@ -0,0 +1,17 @@ +# TalonOne::ScimResourceTypesListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**Array<ScimResource>**](ScimResource.md) | | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimResourceTypesListResponse.new(resources: null) +``` + + diff --git a/docs/ScimSchemaResource.md b/docs/ScimSchemaResource.md new file mode 100644 index 0000000..8e26c0c --- /dev/null +++ b/docs/ScimSchemaResource.md @@ -0,0 +1,23 @@ +# TalonOne::ScimSchemaResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | ID of the resource. | [optional] +**name** | **String** | Name of the resource. | [optional] +**description** | **String** | Human-readable description of the schema resource. | [optional] +**attributes** | **Array<Object>** | | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimSchemaResource.new(id: null, + name: null, + description: null, + attributes: null) +``` + + diff --git a/docs/ScimSchemasListResponse.md b/docs/ScimSchemasListResponse.md new file mode 100644 index 0000000..07d019a --- /dev/null +++ b/docs/ScimSchemasListResponse.md @@ -0,0 +1,21 @@ +# TalonOne::ScimSchemasListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**Array<ScimSchemaResource>**](ScimSchemaResource.md) | | +**schemas** | **Array<String>** | SCIM schema for the given resource. | [optional] +**total_results** | **Integer** | Number of total results in the response. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimSchemasListResponse.new(resources: null, + schemas: null, + total_results: null) +``` + + diff --git a/docs/ScimServiceProviderConfigResponse.md b/docs/ScimServiceProviderConfigResponse.md new file mode 100644 index 0000000..8f70321 --- /dev/null +++ b/docs/ScimServiceProviderConfigResponse.md @@ -0,0 +1,27 @@ +# TalonOne::ScimServiceProviderConfigResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulk** | [**ScimServiceProviderConfigResponseBulk**](ScimServiceProviderConfigResponseBulk.md) | | [optional] +**change_password** | [**ScimServiceProviderConfigResponseChangePassword**](ScimServiceProviderConfigResponseChangePassword.md) | | [optional] +**documentation_uri** | **String** | The URI that points to the SCIM service provider's documentation, providing further details about the service's capabilities and usage. | [optional] +**filter** | [**ScimServiceProviderConfigResponseFilter**](ScimServiceProviderConfigResponseFilter.md) | | [optional] +**patch** | [**ScimServiceProviderConfigResponsePatch**](ScimServiceProviderConfigResponsePatch.md) | | [optional] +**schemas** | **Array<String>** | A list of SCIM schemas that define the structure and data types supported by the service provider. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimServiceProviderConfigResponse.new(bulk: null, + change_password: null, + documentation_uri: null, + filter: null, + patch: null, + schemas: null) +``` + + diff --git a/docs/ScimServiceProviderConfigResponseBulk.md b/docs/ScimServiceProviderConfigResponseBulk.md new file mode 100644 index 0000000..608154a --- /dev/null +++ b/docs/ScimServiceProviderConfigResponseBulk.md @@ -0,0 +1,21 @@ +# TalonOne::ScimServiceProviderConfigResponseBulk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_operations** | **Integer** | The maximum number of individual operations that can be included in a single bulk request. | [optional] +**max_payload_size** | **Integer** | The maximum size, in bytes, of the entire payload for a bulk operation request. | [optional] +**supported** | **Boolean** | Indicates whether the SCIM service provider supports bulk operations. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimServiceProviderConfigResponseBulk.new(max_operations: null, + max_payload_size: null, + supported: null) +``` + + diff --git a/docs/ScimServiceProviderConfigResponseChangePassword.md b/docs/ScimServiceProviderConfigResponseChangePassword.md new file mode 100644 index 0000000..f67a504 --- /dev/null +++ b/docs/ScimServiceProviderConfigResponseChangePassword.md @@ -0,0 +1,17 @@ +# TalonOne::ScimServiceProviderConfigResponseChangePassword + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supported** | **Boolean** | Indicates whether the service provider supports password changes via the SCIM API. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimServiceProviderConfigResponseChangePassword.new(supported: null) +``` + + diff --git a/docs/ScimServiceProviderConfigResponseFilter.md b/docs/ScimServiceProviderConfigResponseFilter.md new file mode 100644 index 0000000..72c64bd --- /dev/null +++ b/docs/ScimServiceProviderConfigResponseFilter.md @@ -0,0 +1,19 @@ +# TalonOne::ScimServiceProviderConfigResponseFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_results** | **Integer** | The maximum number of resources that can be returned in a single filtered query response. | [optional] +**supported** | **Boolean** | Indicates whether the SCIM service provider supports filtering operations. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimServiceProviderConfigResponseFilter.new(max_results: null, + supported: null) +``` + + diff --git a/docs/ScimServiceProviderConfigResponsePatch.md b/docs/ScimServiceProviderConfigResponsePatch.md new file mode 100644 index 0000000..77583d7 --- /dev/null +++ b/docs/ScimServiceProviderConfigResponsePatch.md @@ -0,0 +1,17 @@ +# TalonOne::ScimServiceProviderConfigResponsePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supported** | **Boolean** | Indicates whether the service provider supports patch operations for modifying resources. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimServiceProviderConfigResponsePatch.new(supported: null) +``` + + diff --git a/docs/ScimUser.md b/docs/ScimUser.md new file mode 100644 index 0000000..edf432e --- /dev/null +++ b/docs/ScimUser.md @@ -0,0 +1,25 @@ +# TalonOne::ScimUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Status of the user. | [optional] +**display_name** | **String** | Display name of the user. | [optional] +**user_name** | **String** | Unique identifier of the user. This is usually an email address. | [optional] +**name** | [**ScimBaseUserName**](ScimBaseUserName.md) | | [optional] +**id** | **String** | ID of the user. | + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimUser.new(active: true, + display_name: John Doe, + user_name: john.doe@example.com, + name: null, + id: 359) +``` + + diff --git a/docs/ScimUsersListResponse.md b/docs/ScimUsersListResponse.md new file mode 100644 index 0000000..3213a18 --- /dev/null +++ b/docs/ScimUsersListResponse.md @@ -0,0 +1,21 @@ +# TalonOne::ScimUsersListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**Array<ScimUser>**](ScimUser.md) | | +**schemas** | **Array<String>** | SCIM schema for the given resource. | [optional] +**total_results** | **Integer** | Number of total results in the response. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::ScimUsersListResponse.new(resources: null, + schemas: null, + total_results: null) +``` + + diff --git a/docs/Tier.md b/docs/Tier.md index d49f33b..125e518 100644 --- a/docs/Tier.md +++ b/docs/Tier.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Integer** | The internal ID of the tier. | **name** | **String** | The name of the tier. | +**start_date** | **DateTime** | Date and time when the customer moved to this tier. This value uses the loyalty program's time zone setting. | [optional] **expiry_date** | **DateTime** | Date when tier level expires in the RFC3339 format (in the Loyalty Program's timezone). | [optional] -**downgrade_policy** | **String** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] +**downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] ## Code Sample @@ -16,6 +17,7 @@ require 'TalonOne' instance = TalonOne::Tier.new(id: 11, name: bronze, + start_date: null, expiry_date: null, downgrade_policy: null) ``` diff --git a/docs/TransferLoyaltyCard.md b/docs/TransferLoyaltyCard.md index 0ac2417..16248f5 100644 --- a/docs/TransferLoyaltyCard.md +++ b/docs/TransferLoyaltyCard.md @@ -5,13 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **new_card_identifier** | **String** | The alphanumeric identifier of the loyalty card. | +**block_reason** | **String** | Reason for transferring and blocking the loyalty card. | [optional] ## Code Sample ```ruby require 'TalonOne' -instance = TalonOne::TransferLoyaltyCard.new(new_card_identifier: summer-loyalty-card-0543) +instance = TalonOne::TransferLoyaltyCard.new(new_card_identifier: summer-loyalty-card-0543, + block_reason: Current card lost. Customer needs a new card.) ``` diff --git a/docs/UpdateApplication.md b/docs/UpdateApplication.md index 78a26c8..b1c717f 100644 --- a/docs/UpdateApplication.md +++ b/docs/UpdateApplication.md @@ -19,6 +19,8 @@ Name | Type | Description | Notes **enable_partial_discounts** | **Boolean** | Indicates if this Application supports partial discounts. | [optional] **default_discount_additional_cost_per_item_scope** | **String** | The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect. | [optional] **default_evaluation_group_id** | **Integer** | The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. | [optional] +**default_cart_item_filter_id** | **Integer** | The ID of the default Cart-Item-Filter for this application. | [optional] +**enable_campaign_state_management** | **Boolean** | Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. | [optional] ## Code Sample @@ -39,7 +41,9 @@ instance = TalonOne::UpdateApplication.new(name: My Application, sandbox: true, enable_partial_discounts: false, default_discount_additional_cost_per_item_scope: price, - default_evaluation_group_id: 3) + default_evaluation_group_id: 3, + default_cart_item_filter_id: 3, + enable_campaign_state_management: false) ``` diff --git a/docs/UpdateApplicationCIF.md b/docs/UpdateApplicationCIF.md new file mode 100644 index 0000000..624dc7c --- /dev/null +++ b/docs/UpdateApplicationCIF.md @@ -0,0 +1,23 @@ +# TalonOne::UpdateApplicationCIF + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | A short description of the Application cart item filter. | [optional] +**active_expression_id** | **Integer** | The ID of the expression that the Application cart item filter uses. | [optional] +**modified_by** | **Integer** | The ID of the user who last updated the Application cart item filter. | [optional] +**modified** | **DateTime** | Timestamp of the most recent update to the Application cart item filter. | [optional] + +## Code Sample + +```ruby +require 'TalonOne' + +instance = TalonOne::UpdateApplicationCIF.new(description: This filter allows filtering by shoes, + active_expression_id: 1, + modified_by: 334, + modified: null) +``` + + diff --git a/docs/UpdateCampaign.md b/docs/UpdateCampaign.md index 881efce..c66628f 100644 --- a/docs/UpdateCampaign.md +++ b/docs/UpdateCampaign.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **campaign_groups** | **Array<Integer>** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to. | [optional] **evaluation_group_id** | **Integer** | The ID of the campaign evaluation group the campaign belongs to. | [optional] **type** | **String** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] -**linked_store_ids** | **Array<Integer>** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] +**linked_store_ids** | **Array<Integer>** | A list of store IDs that you want to link to the campaign. **Note:** - Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. - If you linked stores to the campaign by uploading a CSV file, you cannot use this property and it should be empty. - Use of this property is limited to 50 stores. To link more than 50 stores, upload them via a CSV file. | [optional] ## Code Sample diff --git a/docs/UpdateCoupon.md b/docs/UpdateCoupon.md index 4e5076b..239c5e3 100644 --- a/docs/UpdateCoupon.md +++ b/docs/UpdateCoupon.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **recipient_integration_id** | **String** | The integration ID for this coupon's beneficiary's profile. | [optional] **attributes** | [**Object**](.md) | Arbitrary properties associated with this item. | [optional] diff --git a/docs/UpdateCouponBatch.md b/docs/UpdateCouponBatch.md index 7b37b09..652733a 100644 --- a/docs/UpdateCouponBatch.md +++ b/docs/UpdateCouponBatch.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] **reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional] **start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional] **attributes** | [**Object**](.md) | Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value. | [optional] **batch_id** | **String** | The ID of the batch the coupon(s) belong to. | [optional] diff --git a/docs/UpdateLoyaltyCard.md b/docs/UpdateLoyaltyCard.md index ff86d29..7f71bc4 100644 --- a/docs/UpdateLoyaltyCard.md +++ b/docs/UpdateLoyaltyCard.md @@ -4,14 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **String** | Status of the loyalty card. Can be one of: ['active', 'inactive'] | +**status** | **String** | Status of the loyalty card. Can be `active` or `inactive`. | +**block_reason** | **String** | Reason for transferring and blocking the loyalty card. | [optional] ## Code Sample ```ruby require 'TalonOne' -instance = TalonOne::UpdateLoyaltyCard.new(status: active) +instance = TalonOne::UpdateLoyaltyCard.new(status: active, + block_reason: Current card lost. Customer needs a new card.) ``` diff --git a/docs/UpdateLoyaltyProgram.md b/docs/UpdateLoyaltyProgram.md index e7b6585..a7aabb4 100644 --- a/docs/UpdateLoyaltyProgram.md +++ b/docs/UpdateLoyaltyProgram.md @@ -12,10 +12,12 @@ Name | Type | Description | Notes **allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. | [optional] **users_per_card_limit** | **Integer** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **Boolean** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] -**tiers_expiration_policy** | **String** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] -**tiers_expire_in** | **String** | The amount of time after which the tier expires. 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. | [optional] -**tiers_downgrade_policy** | **String** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **program_join_policy** | **String** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] +**tiers_expiration_policy** | **String** | The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. | [optional] +**tier_cycle_start_date** | **DateTime** | Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. | [optional] +**tiers_expire_in** | **String** | The amount of time after which the tier expires and is reevaluated. 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. | [optional] +**tiers_downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] +**card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **tiers** | [**Array<NewLoyaltyTier>**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] ## Code Sample @@ -31,10 +33,12 @@ instance = TalonOne::UpdateLoyaltyProgram.new(title: Point collection, allow_subledger: false, users_per_card_limit: 111, sandbox: true, + program_join_policy: null, tiers_expiration_policy: null, + tier_cycle_start_date: 2021-09-12T10:12:42Z, tiers_expire_in: 27W_U, tiers_downgrade_policy: null, - program_join_policy: null, + card_code_settings: null, tiers: null) ``` diff --git a/docs/UpdateReferral.md b/docs/UpdateReferral.md index 6c9dd3c..add2c92 100644 --- a/docs/UpdateReferral.md +++ b/docs/UpdateReferral.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **friend_profile_integration_id** | **String** | An optional Integration ID of the Friend's Profile. | [optional] **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. | [optional] **attributes** | [**Object**](.md) | Arbitrary properties associated with this item. | [optional] diff --git a/docs/UpdateReferralBatch.md b/docs/UpdateReferralBatch.md index f2f0552..9029164 100644 --- a/docs/UpdateReferralBatch.md +++ b/docs/UpdateReferralBatch.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **attributes** | [**Object**](.md) | Arbitrary properties associated with this item. | [optional] **batch_id** | **String** | The id of the batch the referral belongs to. | **start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional] -**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional] **usage_limit** | **Integer** | The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. | [optional] ## Code Sample diff --git a/docs/User.md b/docs/User.md index 5b7fb45..324ee26 100644 --- a/docs/User.md +++ b/docs/User.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **last_signed_in** | **DateTime** | Timestamp when the user last signed in to Talon.One. | [optional] **last_accessed** | **DateTime** | Timestamp of the user's last activity after signing in to Talon.One. | [optional] **latest_feed_timestamp** | **DateTime** | Timestamp when the user was notified for feed. | [optional] +**additional_attributes** | [**Object**](.md) | Additional user attributes, created and used by external identity providers. | [optional] ## Code Sample @@ -41,7 +42,8 @@ instance = TalonOne::User.new(id: 6, application_notification_subscriptions: null, last_signed_in: 2021-09-12T10:12:42Z, last_accessed: 2021-09-12T10:14:42Z, - latest_feed_timestamp: 2020-06-01T00:00Z) + latest_feed_timestamp: 2020-06-01T00:00Z, + additional_attributes: null) ``` diff --git a/docs/Webhook.md b/docs/Webhook.md index a277dbf..cecf6d5 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **modified** | **DateTime** | The time this entity was last modified. | **application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. | **title** | **String** | Name or title for this webhook. | +**description** | **String** | A description of the webhook. | [optional] **verb** | **String** | API method for this webhook. | **url** | **String** | API URL (supports templating using parameters) for this webhook. | **headers** | **Array<String>** | List of API HTTP headers for this webhook. | @@ -26,6 +27,7 @@ instance = TalonOne::Webhook.new(id: 6, modified: 2021-09-12T10:12:42Z, application_ids: null, title: Send message, + description: A webhook to send a coupon to the user., verb: POST, url: www.my-company.com/my-endpoint-name, headers: [{"Authorization": "Basic bmF2ZWVua3VtYXIU="}, {"Content-Type": "application/json"}], diff --git a/docs/WebhookWithOutgoingIntegrationDetails.md b/docs/WebhookWithOutgoingIntegrationDetails.md index 8ad4f5c..587deb0 100644 --- a/docs/WebhookWithOutgoingIntegrationDetails.md +++ b/docs/WebhookWithOutgoingIntegrationDetails.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **modified** | **DateTime** | The time this entity was last modified. | **application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. | **title** | **String** | Name or title for this webhook. | +**description** | **String** | A description of the webhook. | [optional] **verb** | **String** | API method for this webhook. | **url** | **String** | API URL (supports templating using parameters) for this webhook. | **headers** | **Array<String>** | List of API HTTP headers for this webhook. | @@ -29,6 +30,7 @@ instance = TalonOne::WebhookWithOutgoingIntegrationDetails.new(id: 6, modified: 2021-09-12T10:12:42Z, application_ids: null, title: Send message, + description: A webhook to send a coupon to the user., verb: POST, url: www.my-company.com/my-endpoint-name, headers: [{"Authorization": "Basic bmF2ZWVua3VtYXIU="}, {"Content-Type": "application/json"}], diff --git a/lib/talon_one.rb b/lib/talon_one.rb index 1810ef2..9d9dd8b 100644 --- a/lib/talon_one.rb +++ b/lib/talon_one.rb @@ -44,21 +44,17 @@ require 'talon_one/models/added_deducted_points_notification_policy' require 'talon_one/models/additional_campaign_properties' require 'talon_one/models/additional_cost' +require 'talon_one/models/analytics_data_point' +require 'talon_one/models/analytics_data_point_with_trend' +require 'talon_one/models/analytics_data_point_with_trend_and_influenced_rate' +require 'talon_one/models/analytics_data_point_with_trend_and_uplift' require 'talon_one/models/application' require 'talon_one/models/application_api_key' require 'talon_one/models/application_analytics_data_point' -require 'talon_one/models/application_analytics_data_point_avg_items_per_session' -require 'talon_one/models/application_analytics_data_point_avg_session_value' -require 'talon_one/models/application_analytics_data_point_sessions_count' -require 'talon_one/models/application_analytics_data_point_total_revenue' require 'talon_one/models/application_api_health' +require 'talon_one/models/application_cif' +require 'talon_one/models/application_cif_expression' require 'talon_one/models/application_campaign_analytics' -require 'talon_one/models/application_campaign_analytics_avg_items_per_session' -require 'talon_one/models/application_campaign_analytics_avg_session_value' -require 'talon_one/models/application_campaign_analytics_coupons_count' -require 'talon_one/models/application_campaign_analytics_sessions_count' -require 'talon_one/models/application_campaign_analytics_total_discounts' -require 'talon_one/models/application_campaign_analytics_total_revenue' require 'talon_one/models/application_campaign_stats' require 'talon_one/models/application_customer' require 'talon_one/models/application_customer_entity' @@ -70,6 +66,7 @@ require 'talon_one/models/application_session_entity' require 'talon_one/models/application_store_entity' require 'talon_one/models/async_coupon_creation_response' +require 'talon_one/models/async_coupon_deletion_job_response' require 'talon_one/models/attribute' require 'talon_one/models/attributes_mandatory' require 'talon_one/models/attributes_settings' @@ -95,6 +92,7 @@ require 'talon_one/models/campaign_analytics' require 'talon_one/models/campaign_budget' require 'talon_one/models/campaign_collection' +require 'talon_one/models/campaign_collection_edited_notification' require 'talon_one/models/campaign_collection_without_payload' require 'talon_one/models/campaign_copy' require 'talon_one/models/campaign_created_notification' @@ -115,9 +113,12 @@ require 'talon_one/models/campaign_set_leaf_node' require 'talon_one/models/campaign_set_node' require 'talon_one/models/campaign_state_changed_notification' +require 'talon_one/models/campaign_store_budget' require 'talon_one/models/campaign_template' require 'talon_one/models/campaign_template_collection' require 'talon_one/models/campaign_template_params' +require 'talon_one/models/campaign_versions' +require 'talon_one/models/card_added_deducted_points_notification_policy' require 'talon_one/models/card_expiring_points_notification_policy' require 'talon_one/models/card_expiring_points_notification_trigger' require 'talon_one/models/card_ledger_points_entry_integration_api' @@ -141,6 +142,8 @@ require 'talon_one/models/coupon_constraints' require 'talon_one/models/coupon_created_effect_props' require 'talon_one/models/coupon_creation_job' +require 'talon_one/models/coupon_deletion_filters' +require 'talon_one/models/coupon_deletion_job' require 'talon_one/models/coupon_limit_configs' require 'talon_one/models/coupon_rejection_reason' require 'talon_one/models/coupon_reservations' @@ -194,6 +197,12 @@ require 'talon_one/models/features_feed' require 'talon_one/models/func_arg_def' require 'talon_one/models/function_def' +require 'talon_one/models/generate_campaign_description' +require 'talon_one/models/generate_campaign_tags' +require 'talon_one/models/generate_item_filter_description' +require 'talon_one/models/generate_loyalty_card' +require 'talon_one/models/generate_rule_title' +require 'talon_one/models/generate_rule_title_rule' require 'talon_one/models/get_integration_coupon_request' require 'talon_one/models/giveaway' require 'talon_one/models/giveaways_pool' @@ -273,9 +282,13 @@ require 'talon_one/models/login_params' require 'talon_one/models/loyalty' require 'talon_one/models/loyalty_balance' +require 'talon_one/models/loyalty_balance_with_tier' require 'talon_one/models/loyalty_balances' +require 'talon_one/models/loyalty_balances_with_tiers' require 'talon_one/models/loyalty_card' require 'talon_one/models/loyalty_card_balances' +require 'talon_one/models/loyalty_card_batch' +require 'talon_one/models/loyalty_card_batch_response' require 'talon_one/models/loyalty_card_profile_registration' require 'talon_one/models/loyalty_card_registration' require 'talon_one/models/loyalty_dashboard_data' @@ -288,7 +301,6 @@ require 'talon_one/models/loyalty_program_balance' require 'talon_one/models/loyalty_program_entity' require 'talon_one/models/loyalty_program_ledgers' -require 'talon_one/models/loyalty_program_subledgers' require 'talon_one/models/loyalty_program_transaction' require 'talon_one/models/loyalty_sub_ledger' require 'talon_one/models/loyalty_tier' @@ -313,8 +325,11 @@ require 'talon_one/models/new_account' require 'talon_one/models/new_account_sign_up' require 'talon_one/models/new_additional_cost' +require 'talon_one/models/new_app_wide_coupon_deletion_job' require 'talon_one/models/new_application' require 'talon_one/models/new_application_api_key' +require 'talon_one/models/new_application_cif' +require 'talon_one/models/new_application_cif_expression' require 'talon_one/models/new_attribute' require 'talon_one/models/new_audience' require 'talon_one/models/new_base_notification' @@ -327,6 +342,7 @@ require 'talon_one/models/new_catalog' require 'talon_one/models/new_collection' require 'talon_one/models/new_coupon_creation_job' +require 'talon_one/models/new_coupon_deletion_job' require 'talon_one/models/new_coupons' require 'talon_one/models/new_coupons_for_multiple_recipients' require 'talon_one/models/new_custom_effect' @@ -353,6 +369,7 @@ require 'talon_one/models/new_referral' require 'talon_one/models/new_referrals_for_multiple_advocates' require 'talon_one/models/new_return' +require 'talon_one/models/new_revision_version' require 'talon_one/models/new_role' require 'talon_one/models/new_role_v2' require 'talon_one/models/new_ruleset' @@ -365,6 +382,10 @@ require 'talon_one/models/notification_activation' require 'talon_one/models/notification_list_item' require 'talon_one/models/notification_test' +require 'talon_one/models/okta_event' +require 'talon_one/models/okta_event_payload' +require 'talon_one/models/okta_event_payload_data' +require 'talon_one/models/okta_event_target' require 'talon_one/models/one_time_code' require 'talon_one/models/outgoing_integration_braze_policy' require 'talon_one/models/outgoing_integration_clever_tap_policy' @@ -382,6 +403,7 @@ require 'talon_one/models/picklist' require 'talon_one/models/product' require 'talon_one/models/profile_audiences_changes' +require 'talon_one/models/projected_tier' require 'talon_one/models/redeem_referral_effect_props' require 'talon_one/models/referral' require 'talon_one/models/referral_constraints' @@ -396,6 +418,9 @@ require 'talon_one/models/reserve_coupon_effect_props' require 'talon_one/models/return_integration_request' require 'talon_one/models/returned_cart_item' +require 'talon_one/models/revision' +require 'talon_one/models/revision_activation' +require 'talon_one/models/revision_version' require 'talon_one/models/role' require 'talon_one/models/role_assign' require 'talon_one/models/role_membership' @@ -409,6 +434,7 @@ require 'talon_one/models/rollback_coupon_effect_props' require 'talon_one/models/rollback_deducted_loyalty_points_effect_props' require 'talon_one/models/rollback_discount_effect_props' +require 'talon_one/models/rollback_increased_achievement_progress_effect_props' require 'talon_one/models/rollback_referral_effect_props' require 'talon_one/models/rule' require 'talon_one/models/rule_failure_reason' @@ -418,6 +444,22 @@ require 'talon_one/models/saml_connection_internal' require 'talon_one/models/saml_connection_metadata' require 'talon_one/models/saml_login_endpoint' +require 'talon_one/models/scim_base_user' +require 'talon_one/models/scim_base_user_name' +require 'talon_one/models/scim_new_user' +require 'talon_one/models/scim_patch_operation' +require 'talon_one/models/scim_patch_request' +require 'talon_one/models/scim_resource' +require 'talon_one/models/scim_resource_types_list_response' +require 'talon_one/models/scim_schema_resource' +require 'talon_one/models/scim_schemas_list_response' +require 'talon_one/models/scim_service_provider_config_response' +require 'talon_one/models/scim_service_provider_config_response_bulk' +require 'talon_one/models/scim_service_provider_config_response_change_password' +require 'talon_one/models/scim_service_provider_config_response_filter' +require 'talon_one/models/scim_service_provider_config_response_patch' +require 'talon_one/models/scim_user' +require 'talon_one/models/scim_users_list_response' require 'talon_one/models/session' require 'talon_one/models/set_discount_effect_props' require 'talon_one/models/set_discount_per_additional_cost_effect_props' @@ -452,6 +494,7 @@ require 'talon_one/models/update_achievement' require 'talon_one/models/update_application' require 'talon_one/models/update_application_api_key' +require 'talon_one/models/update_application_cif' require 'talon_one/models/update_attribute_effect_props' require 'talon_one/models/update_audience' require 'talon_one/models/update_campaign' diff --git a/lib/talon_one/api/integration_api.rb b/lib/talon_one/api/integration_api.rb index 40922fe..059f741 100644 --- a/lib/talon_one/api/integration_api.rb +++ b/lib/talon_one/api/integration_api.rb @@ -540,6 +540,76 @@ def delete_customer_data_with_http_info(integration_id, opts = {}) return data, status_code, headers end + # Generate loyalty card + # Generate a loyalty card in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview). To link the card to one or more customer profiles, use the `customerProfileIds` parameter in the request body. **Note:** - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's `usersPerCardLimit`. To find the program's limit, use the [Get loyalty program](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgram) endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier. + # @param loyalty_program_id [Integer] 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. + # @param body [GenerateLoyaltyCard] body + # @param [Hash] opts the optional parameters + # @return [LoyaltyCard] + def generate_loyalty_card(loyalty_program_id, body, opts = {}) + data, _status_code, _headers = generate_loyalty_card_with_http_info(loyalty_program_id, body, opts) + data + end + + # Generate loyalty card + # Generate a loyalty card in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview). To link the card to one or more customer profiles, use the `customerProfileIds` parameter in the request body. **Note:** - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's `usersPerCardLimit`. To find the program's limit, use the [Get loyalty program](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgram) endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier. + # @param loyalty_program_id [Integer] 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. + # @param body [GenerateLoyaltyCard] body + # @param [Hash] opts the optional parameters + # @return [Array<(LoyaltyCard, Integer, Hash)>] LoyaltyCard data, response status code and response headers + def generate_loyalty_card_with_http_info(loyalty_program_id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IntegrationApi.generate_loyalty_card ...' + end + # verify the required parameter 'loyalty_program_id' is set + if @api_client.config.client_side_validation && loyalty_program_id.nil? + fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.generate_loyalty_card" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.generate_loyalty_card" + end + # resource path + local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'LoyaltyCard' + + # auth_names + auth_names = opts[:auth_names] || ['api_key_v1'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IntegrationApi#generate_loyalty_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List customer data # Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons. # @param integration_id [String] The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. @@ -689,7 +759,9 @@ def get_customer_session_with_http_info(customer_session_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **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. # @option opts [String] :subledger_id The ID of the subledger by which we filter the data. - # @return [LoyaltyBalances] + # @option opts [Boolean] :include_tiers Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. (default to false) + # @option opts [Boolean] :include_projected_tier Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. (default to false) + # @return [LoyaltyBalancesWithTiers] def get_loyalty_balances(loyalty_program_id, integration_id, opts = {}) data, _status_code, _headers = get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts) data @@ -702,7 +774,9 @@ def get_loyalty_balances(loyalty_program_id, integration_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **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. # @option opts [String] :subledger_id The ID of the subledger by which we filter the data. - # @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers + # @option opts [Boolean] :include_tiers Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. + # @option opts [Boolean] :include_projected_tier Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. + # @return [Array<(LoyaltyBalancesWithTiers, Integer, Hash)>] LoyaltyBalancesWithTiers data, response status code and response headers def get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_balances ...' @@ -722,6 +796,8 @@ def get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts query_params = opts[:query_params] || {} query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil? + query_params[:'includeTiers'] = opts[:'include_tiers'] if !opts[:'include_tiers'].nil? + query_params[:'includeProjectedTier'] = opts[:'include_projected_tier'] if !opts[:'include_projected_tier'].nil? # header parameters header_params = opts[:header_params] || {} @@ -735,7 +811,7 @@ def get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts post_body = opts[:body] # return_type - return_type = opts[:return_type] || 'LoyaltyBalances' + return_type = opts[:return_type] || 'LoyaltyBalancesWithTiers' # auth_names auth_names = opts[:auth_names] || ['api_key_v1'] @@ -1500,7 +1576,7 @@ def return_cart_items_with_http_info(customer_session_id, body, opts = {}) end # Sync cart item catalog - # Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Adding several items to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Editing the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ```
Editing the attributes of several items in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing several items from the catalog
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
+ # Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: You can perform only one type of action in a single sync request. Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Adding multiple items to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ```
Updating the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ```
Updating the attributes of multiple items in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing multiple items from the catalog
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
# @param catalog_id [Integer] The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. # @param body [CatalogSyncRequest] body # @param [Hash] opts the optional parameters @@ -1511,7 +1587,7 @@ def sync_catalog(catalog_id, body, opts = {}) end # Sync cart item catalog - # Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding several items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing several items from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> + # Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: You can perform only one type of action in a single sync request. Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding multiple items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Updating the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Updating the attributes of multiple items in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing multiple items from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> # @param catalog_id [Integer] The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. # @param body [CatalogSyncRequest] body # @param [Hash] opts the optional parameters @@ -1991,7 +2067,7 @@ def update_customer_profiles_v2_with_http_info(body, opts = {}) # @param customer_session_id [String] 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#operation/getApplicationSessions) endpoint. # @param body [IntegrationRequest] body # @param [Hash] opts the optional parameters - # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). + # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). # @option opts [DateTime] :now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. # @return [IntegrationStateV2] def update_customer_session_v2(customer_session_id, body, opts = {}) @@ -2004,7 +2080,7 @@ def update_customer_session_v2(customer_session_id, body, opts = {}) # @param customer_session_id [String] 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#operation/getApplicationSessions) endpoint. # @param body [IntegrationRequest] body # @param [Hash] opts the optional parameters - # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). + # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). # @option opts [DateTime] :now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. # @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers def update_customer_session_v2_with_http_info(customer_session_id, body, opts = {}) diff --git a/lib/talon_one/api/management_api.rb b/lib/talon_one/api/management_api.rb index f790d45..74564fa 100644 --- a/lib/talon_one/api/management_api.rb +++ b/lib/talon_one/api/management_api.rb @@ -19,8 +19,8 @@ class ManagementApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Activate user by email address - # Activate a deactivated user by their email address. + # Enable user by email address + # Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body [ActivateUserRequest] body # @param [Hash] opts the optional parameters # @return [nil] @@ -29,8 +29,8 @@ def activate_user_by_email(body, opts = {}) nil end - # Activate user by email address - # Activate a deactivated user by their email address. + # Enable user by email address + # Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body [ActivateUserRequest] body # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -581,6 +581,76 @@ def create_attribute_with_http_info(body, opts = {}) return data, status_code, headers end + # Create loyalty cards + # Create a batch of loyalty cards in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. **Important:** - The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes. - Trying to create more than 20,000 loyalty cards in a single request returns an error message with a `400` status code. + # @param loyalty_program_id [Integer] 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. + # @param body [LoyaltyCardBatch] body + # @param [Hash] opts the optional parameters + # @return [LoyaltyCardBatchResponse] + def create_batch_loyalty_cards(loyalty_program_id, body, opts = {}) + data, _status_code, _headers = create_batch_loyalty_cards_with_http_info(loyalty_program_id, body, opts) + data + end + + # Create loyalty cards + # Create a batch of loyalty cards in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. **Important:** - The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes. - Trying to create more than 20,000 loyalty cards in a single request returns an error message with a `400` status code. + # @param loyalty_program_id [Integer] 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. + # @param body [LoyaltyCardBatch] body + # @param [Hash] opts the optional parameters + # @return [Array<(LoyaltyCardBatchResponse, Integer, Hash)>] LoyaltyCardBatchResponse data, response status code and response headers + def create_batch_loyalty_cards_with_http_info(loyalty_program_id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.create_batch_loyalty_cards ...' + end + # verify the required parameter 'loyalty_program_id' is set + if @api_client.config.client_side_validation && loyalty_program_id.nil? + fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.create_batch_loyalty_cards" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_batch_loyalty_cards" + end + # resource path + local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/batch'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'LoyaltyCardBatchResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#create_batch_loyalty_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create campaign from campaign template # Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](https://docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically. # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -882,6 +952,82 @@ def create_coupons_async_with_http_info(application_id, campaign_id, body, opts return data, status_code, headers end + # Creates a coupon deletion job + # This endpoint handles creating a job to delete coupons asynchronously. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param body [NewCouponDeletionJob] body + # @param [Hash] opts the optional parameters + # @return [AsyncCouponDeletionJobResponse] + def create_coupons_deletion_job(application_id, campaign_id, body, opts = {}) + data, _status_code, _headers = create_coupons_deletion_job_with_http_info(application_id, campaign_id, body, opts) + data + end + + # Creates a coupon deletion job + # This endpoint handles creating a job to delete coupons asynchronously. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param body [NewCouponDeletionJob] body + # @param [Hash] opts the optional parameters + # @return [Array<(AsyncCouponDeletionJobResponse, Integer, Hash)>] AsyncCouponDeletionJobResponse data, response status code and response headers + def create_coupons_deletion_job_with_http_info(application_id, campaign_id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.create_coupons_deletion_job ...' + end + # verify the required parameter 'application_id' is set + if @api_client.config.client_side_validation && application_id.nil? + fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.create_coupons_deletion_job" + end + # verify the required parameter 'campaign_id' is set + if @api_client.config.client_side_validation && campaign_id.nil? + fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.create_coupons_deletion_job" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_coupons_deletion_job" + end + # resource path + local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'AsyncCouponDeletionJobResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#create_coupons_deletion_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create coupons for multiple recipients # Create coupons according to some pattern for up to 1000 recipients. # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -1287,8 +1433,8 @@ def create_store_with_http_info(application_id, body, opts = {}) return data, status_code, headers end - # Deactivate user by email address - # Deactivate a specific user by their email address. + # Disable user by email address + # [Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body [DeactivateUserRequest] body # @param [Hash] opts the optional parameters # @return [nil] @@ -1297,8 +1443,8 @@ def deactivate_user_by_email(body, opts = {}) nil end - # Deactivate user by email address - # Deactivate a specific user by their email address. + # Disable user by email address + # [Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body [DeactivateUserRequest] body # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -1785,10 +1931,10 @@ def delete_coupon_with_http_info(application_id, campaign_id, coupon_id, opts = # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [String] :usable - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. @@ -1809,10 +1955,10 @@ def delete_coupons(application_id, campaign_id, opts = {}) # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [String] :usable - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. @@ -2163,7 +2309,7 @@ def delete_user_with_http_info(user_id, opts = {}) end # Delete user by email address - # Delete a specific user by their email address. + # [Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address. # @param body [DeleteUserRequest] body # @param [Hash] opts the optional parameters # @return [nil] @@ -2173,7 +2319,7 @@ def delete_user_by_email(body, opts = {}) end # Delete user by email address - # Delete a specific user by their email address. + # [Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address. # @param body [DeleteUserRequest] body # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -2278,6 +2424,74 @@ def destroy_session_with_http_info(opts = {}) return data, status_code, headers end + # Disconnect stores + # Disconnect the stores linked to a specific campaign. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [nil] + def disconnect_campaign_stores(application_id, campaign_id, opts = {}) + disconnect_campaign_stores_with_http_info(application_id, campaign_id, opts) + nil + end + + # Disconnect stores + # Disconnect the stores linked to a specific campaign. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def disconnect_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.disconnect_campaign_stores ...' + end + # verify the required parameter 'application_id' is set + if @api_client.config.client_side_validation && application_id.nil? + fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.disconnect_campaign_stores" + end + # verify the required parameter 'campaign_id' is set + if @api_client.config.client_side_validation && campaign_id.nil? + fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.disconnect_campaign_stores" + end + # resource path + local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#disconnect_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Export account-level collection's items # Download a CSV file containing items from a given account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param collection_id [Integer] The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. @@ -2476,6 +2690,74 @@ def export_audiences_memberships_with_http_info(audience_id, opts = {}) return data, status_code, headers end + # Export stores + # Download a CSV file containing the stores linked to a specific campaign. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following column: - `store_integration_id`: The identifier of the store. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [String] + def export_campaign_stores(application_id, campaign_id, opts = {}) + data, _status_code, _headers = export_campaign_stores_with_http_info(application_id, campaign_id, opts) + data + end + + # Export stores + # Download a CSV file containing the stores linked to a specific campaign. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following column: - `store_integration_id`: The identifier of the store. + # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def export_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.export_campaign_stores ...' + end + # verify the required parameter 'application_id' is set + if @api_client.config.client_side_validation && application_id.nil? + fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.export_campaign_stores" + end + # verify the required parameter 'campaign_id' is set + if @api_client.config.client_side_validation && campaign_id.nil? + fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.export_campaign_stores" + end + # resource path + local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/export'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/csv']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'String' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#export_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Export campaign-level collection's items # Download a CSV file containing items from a given campaign-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -2566,7 +2848,7 @@ def export_collection_items_with_http_info(application_id, campaign_id, collecti # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code. (default to false) # @option opts [String] :date_format Determines the format of dates in the export document. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. (default to false) # @return [String] def export_coupons(application_id, opts = {}) @@ -2590,7 +2872,7 @@ def export_coupons(application_id, opts = {}) # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code. # @option opts [String] :date_format Determines the format of dates in the export document. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def export_coupons_with_http_info(application_id, opts = {}) @@ -2613,7 +2895,7 @@ def export_coupons_with_http_info(application_id, opts = {}) if @api_client.config.client_side_validation && opts[:'date_format'] && !allowable_values.include?(opts[:'date_format']) fail ArgumentError, "invalid value for \"date_format\", must be one of #{allowable_values}" end - allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"] + allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired"] if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state']) fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}" end @@ -2756,7 +3038,7 @@ def export_customer_sessions_with_http_info(application_id, opts = {}) end # Export customers' tier data - # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. + # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported. # @param loyalty_program_id [String] The identifier for the loyalty program. # @param [Hash] opts the optional parameters # @option opts [Array] :subledger_ids An array of subledgers IDs to filter the export by. @@ -2768,7 +3050,7 @@ def export_customers_tiers(loyalty_program_id, opts = {}) end # Export customers' tier data - # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. + # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported. # @param loyalty_program_id [String] The identifier for the loyalty program. # @param [Hash] opts the optional parameters # @option opts [Array] :subledger_ids An array of subledgers IDs to filter the export by. @@ -2828,8 +3110,8 @@ def export_customers_tiers_with_http_info(loyalty_program_id, opts = {}) # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. - # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] def export_effects(application_id, opts = {}) @@ -2842,8 +3124,8 @@ def export_effects(application_id, opts = {}) # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. - # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :date_format Determines the format of dates in the export document. # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def export_effects_with_http_info(application_id, opts = {}) @@ -3189,47 +3471,112 @@ def export_loyalty_card_ledger_with_http_info(loyalty_program_id, loyalty_card_i return data, status_code, headers end - # Export customer's transaction logs - # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. - # @param range_start [DateTime] Only return results from after this timestamp. **Note:** - This 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. - # @param range_end [DateTime] Only return results from before this timestamp. **Note:** - This 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. - # @param loyalty_program_id [String] The identifier for the loyalty program. - # @param integration_id [String] The identifier of the profile. + # Export loyalty cards + # Download a CSV file containing the loyalty cards from a specified loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in. + # @param loyalty_program_id [Integer] 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. # @param [Hash] opts the optional parameters - # @option opts [String] :date_format Determines the format of dates in the export document. + # @option opts [String] :batch_id Filter results by loyalty card batch ID. # @return [String] - def export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts = {}) - data, _status_code, _headers = export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts) + def export_loyalty_cards(loyalty_program_id, opts = {}) + data, _status_code, _headers = export_loyalty_cards_with_http_info(loyalty_program_id, opts) data end - # Export customer's transaction logs - # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. - # @param range_start [DateTime] Only return results from after this timestamp. **Note:** - This 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. - # @param range_end [DateTime] Only return results from before this timestamp. **Note:** - This 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. - # @param loyalty_program_id [String] The identifier for the loyalty program. - # @param integration_id [String] The identifier of the profile. + # Export loyalty cards + # Download a CSV file containing the loyalty cards from a specified loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in. + # @param loyalty_program_id [Integer] 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. # @param [Hash] opts the optional parameters - # @option opts [String] :date_format Determines the format of dates in the export document. + # @option opts [String] :batch_id Filter results by loyalty card batch ID. # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers - def export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts = {}) + def export_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_ledger ...' - end - # verify the required parameter 'range_start' is set - if @api_client.config.client_side_validation && range_start.nil? - fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.export_loyalty_ledger" - end - # verify the required parameter 'range_end' is set - if @api_client.config.client_side_validation && range_end.nil? - fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.export_loyalty_ledger" + @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_cards ...' end # verify the required parameter 'loyalty_program_id' is set if @api_client.config.client_side_validation && loyalty_program_id.nil? - fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_ledger" + fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_cards" end - # verify the required parameter 'integration_id' is set - if @api_client.config.client_side_validation && integration_id.nil? + # resource path + local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/export'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/csv']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'String' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#export_loyalty_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Export customer's transaction logs + # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. + # @param range_start [DateTime] Only return results from after this timestamp. **Note:** - This 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. + # @param range_end [DateTime] Only return results from before this timestamp. **Note:** - This 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. + # @param loyalty_program_id [String] The identifier for the loyalty program. + # @param integration_id [String] The identifier of the profile. + # @param [Hash] opts the optional parameters + # @option opts [String] :date_format Determines the format of dates in the export document. + # @return [String] + def export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts = {}) + data, _status_code, _headers = export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts) + data + end + + # Export customer's transaction logs + # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. + # @param range_start [DateTime] Only return results from after this timestamp. **Note:** - This 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. + # @param range_end [DateTime] Only return results from before this timestamp. **Note:** - This 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. + # @param loyalty_program_id [String] The identifier for the loyalty program. + # @param integration_id [String] The identifier of the profile. + # @param [Hash] opts the optional parameters + # @option opts [String] :date_format Determines the format of dates in the export document. + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_ledger ...' + end + # verify the required parameter 'range_start' is set + if @api_client.config.client_side_validation && range_start.nil? + fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.export_loyalty_ledger" + end + # verify the required parameter 'range_end' is set + if @api_client.config.client_side_validation && range_end.nil? + fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.export_loyalty_ledger" + end + # verify the required parameter 'loyalty_program_id' is set + if @api_client.config.client_side_validation && loyalty_program_id.nil? + fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_ledger" + end + # verify the required parameter 'integration_id' is set + if @api_client.config.client_side_validation && integration_id.nil? fail ArgumentError, "Missing the required parameter 'integration_id' when calling ManagementApi.export_loyalty_ledger" end allowable_values = ["excel", "ISO8601"] @@ -5465,7 +5812,7 @@ def get_campaign_analytics_with_http_info(application_id, campaign_id, range_sta # @option opts [Integer] :page_size The number of items in the response. (default to 1000) # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [InlineResponse2006] def get_campaign_by_attributes(application_id, body, opts = {}) data, _status_code, _headers = get_campaign_by_attributes_with_http_info(application_id, body, opts) @@ -5480,7 +5827,7 @@ def get_campaign_by_attributes(application_id, body, opts = {}) # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers def get_campaign_by_attributes_with_http_info(application_id, body, opts = {}) if @api_client.config.debugging @@ -5502,7 +5849,7 @@ def get_campaign_by_attributes_with_http_info(application_id, body, opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaign_by_attributes, must be greater than or equal to 1.' end - allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"] + allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired"] if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state']) fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}" end @@ -5725,7 +6072,7 @@ def get_campaign_templates_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaign_templates, must be greater than or equal to 1.' end - allowable_values = ["enabled", "disabled", "draft"] + allowable_values = ["draft", "enabled", "disabled"] if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state']) fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}" end @@ -5782,7 +6129,7 @@ def get_campaign_templates_with_http_info(opts = {}) # @option opts [Integer] :page_size The number of items in the response. (default to 1000) # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. # @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. @@ -5803,7 +6150,7 @@ def get_campaigns(application_id, opts = {}) # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. # @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. @@ -5828,7 +6175,7 @@ def get_campaigns_with_http_info(application_id, opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaigns, must be greater than or equal to 1.' end - allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"] + allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired"] if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state']) fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}" end @@ -6142,10 +6489,16 @@ def get_collection_items_with_http_info(collection_id, opts = {}) # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. + # @option opts [String] :redeemed - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. (default to false) # @return [InlineResponse2009] def get_coupons_without_total_count(application_id, campaign_id, opts = {}) data, _status_code, _headers = get_coupons_without_total_count_with_http_info(application_id, campaign_id, opts) @@ -6165,10 +6518,16 @@ def get_coupons_without_total_count(application_id, campaign_id, opts = {}) # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. + # @option opts [String] :redeemed - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers def get_coupons_without_total_count_with_http_info(application_id, campaign_id, opts = {}) if @api_client.config.debugging @@ -6198,6 +6557,10 @@ def get_coupons_without_total_count_with_http_info(application_id, campaign_id, if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable']) fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}" end + allowable_values = ["true", "false"] + if @api_client.config.client_side_validation && opts[:'redeemed'] && !allowable_values.include?(opts[:'redeemed']) + fail ArgumentError, "invalid value for \"redeemed\", must be one of #{allowable_values}" + end # resource path local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) @@ -6211,10 +6574,16 @@ def get_coupons_without_total_count_with_http_info(application_id, campaign_id, query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil? query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil? query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil? + query_params[:'redeemed'] = opts[:'redeemed'] if !opts[:'redeemed'].nil? query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil? query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil? query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil? query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil? + query_params[:'expiresBefore'] = opts[:'expires_before'] if !opts[:'expires_before'].nil? + query_params[:'expiresAfter'] = opts[:'expires_after'] if !opts[:'expires_after'].nil? + query_params[:'startsBefore'] = opts[:'starts_before'] if !opts[:'starts_before'].nil? + query_params[:'startsAfter'] = opts[:'starts_after'] if !opts[:'starts_after'].nil? + query_params[:'valuesOnly'] = opts[:'values_only'] if !opts[:'values_only'].nil? # header parameters header_params = opts[:header_params] || {} @@ -7175,8 +7544,9 @@ def get_loyalty_card_transaction_logs_with_http_info(loyalty_program_id, loyalty # @option opts [Integer] :page_size The number of items in the response. (default to 1000) # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :identifier Optional query parameter to search cards by identifier. - # @option opts [Integer] :profile_id Filter by the profile ID. + # @option opts [String] :identifier The card code by which to filter loyalty cards in the response. + # @option opts [Integer] :profile_id Filter results by customer profile ID. + # @option opts [String] :batch_id Filter results by loyalty card batch ID. # @return [InlineResponse20015] def get_loyalty_cards(loyalty_program_id, opts = {}) data, _status_code, _headers = get_loyalty_cards_with_http_info(loyalty_program_id, opts) @@ -7190,8 +7560,9 @@ def get_loyalty_cards(loyalty_program_id, opts = {}) # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :identifier Optional query parameter to search cards by identifier. - # @option opts [Integer] :profile_id Filter by the profile ID. + # @option opts [String] :identifier The card code by which to filter loyalty cards in the response. + # @option opts [Integer] :profile_id Filter results by customer profile ID. + # @option opts [String] :batch_id Filter results by loyalty card batch ID. # @return [Array<(InlineResponse20015, Integer, Hash)>] InlineResponse20015 data, response status code and response headers def get_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) if @api_client.config.debugging @@ -7227,6 +7598,7 @@ def get_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil? query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? + query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil? # header parameters header_params = opts[:header_params] || {} @@ -8390,7 +8762,7 @@ def get_webhook_logs_with_http_info(opts = {}) # List webhooks # List all webhooks. # @param [Hash] opts the optional parameters - # @option opts [String] :application_ids Filter by one or more Application IDs, separated by a comma. + # @option opts [String] :application_ids Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. # @option opts [String] :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:** This parameter works only with numeric fields. # @option opts [Integer] :page_size The number of items in the response. (default to 1000) # @option opts [Integer] :skip The number of items to skip when paging through large result sets. @@ -8407,7 +8779,7 @@ def get_webhooks(opts = {}) # List webhooks # List all webhooks. # @param [Hash] opts the optional parameters - # @option opts [String] :application_ids Filter by one or more Application IDs, separated by a comma. + # @option opts [String] :application_ids Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. # @option opts [String] :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:** This parameter works only with numeric fields. # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. @@ -8684,6 +9056,79 @@ def import_audiences_memberships_with_http_info(audience_id, opts = {}) return data, status_code, headers end + # Import stores + # 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 [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @option opts [String] :up_file The file containing the data that is being imported. + # @return [Import] + def import_campaign_stores(application_id, campaign_id, opts = {}) + data, _status_code, _headers = import_campaign_stores_with_http_info(application_id, campaign_id, opts) + data + end + + # Import stores + # 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 [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @option opts [String] :up_file The file containing the data that is being imported. + # @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers + def import_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.import_campaign_stores ...' + end + # verify the required parameter 'application_id' is set + if @api_client.config.client_side_validation && application_id.nil? + fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.import_campaign_stores" + end + # verify the required parameter 'campaign_id' is set + if @api_client.config.client_side_validation && campaign_id.nil? + fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.import_campaign_stores" + end + # resource path + local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/import'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + + # form parameters + form_params = opts[:form_params] || {} + form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil? + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'Import' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#import_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Import data into existing campaign-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 Addidas 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 [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -8907,7 +9352,7 @@ def import_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) end # Import customers into loyalty tiers - # 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. 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 500MB. **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 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 500MB. **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 [Integer] 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. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file containing the data that is being imported. @@ -8918,7 +9363,7 @@ def import_loyalty_customers_tiers(loyalty_program_id, opts = {}) end # Import customers into loyalty tiers - # 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. 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 500MB. **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 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 500MB. **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 [Integer] 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. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file containing the data that is being imported. @@ -9181,7 +9626,7 @@ def import_referrals_with_http_info(application_id, campaign_id, opts = {}) end # Invite user from identity provider - # Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + # [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 body [NewExternalInvitation] body # @param [Hash] opts the optional parameters # @return [nil] @@ -9191,7 +9636,7 @@ def invite_user_external(body, opts = {}) end # Invite user from identity provider - # Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + # [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 body [NewExternalInvitation] body # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -9885,6 +10330,60 @@ def notification_activation_with_http_info(notification_id, body, opts = {}) return data, status_code, headers end + # Validate Okta API ownership + # Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta. + # @param [Hash] opts the optional parameters + # @return [nil] + def okta_event_handler_challenge(opts = {}) + okta_event_handler_challenge_with_http_info(opts) + nil + end + + # Validate Okta API ownership + # Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def okta_event_handler_challenge_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.okta_event_handler_challenge ...' + end + # resource path + local_var_path = '/v1/provisioning/okta' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#okta_event_handler_challenge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create notification about added or deducted loyalty points # Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). # @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. @@ -10235,6 +10734,556 @@ def reset_password_with_http_info(body, opts = {}) return data, status_code, headers end + # Create SCIM user + # Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param body [ScimNewUser] body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + def scim_create_user(body, opts = {}) + data, _status_code, _headers = scim_create_user_with_http_info(body, opts) + data + end + + # Create SCIM user + # Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param body [ScimNewUser] body + # @param [Hash] opts the optional parameters + # @return [Array<(ScimUser, Integer, Hash)>] ScimUser data, response status code and response headers + def scim_create_user_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_create_user ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.scim_create_user" + end + # resource path + local_var_path = '/v1/provisioning/scim/Users' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'ScimUser' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete SCIM user + # Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id [Integer] The ID of the user. + # @param [Hash] opts the optional parameters + # @return [nil] + def scim_delete_user(user_id, opts = {}) + scim_delete_user_with_http_info(user_id, opts) + nil + end + + # Delete SCIM user + # Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id [Integer] The ID of the user. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def scim_delete_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_delete_user ...' + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling ManagementApi.scim_delete_user" + end + # resource path + local_var_path = '/v1/provisioning/scim/Users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List supported SCIM resource types + # Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [ScimResourceTypesListResponse] + def scim_get_resource_types(opts = {}) + data, _status_code, _headers = scim_get_resource_types_with_http_info(opts) + data + end + + # List supported SCIM resource types + # Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [Array<(ScimResourceTypesListResponse, Integer, Hash)>] ScimResourceTypesListResponse data, response status code and response headers + def scim_get_resource_types_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_resource_types ...' + end + # resource path + local_var_path = '/v1/provisioning/scim/ResourceTypes' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ScimResourceTypesListResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_get_resource_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List supported SCIM schemas + # Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [ScimSchemasListResponse] + def scim_get_schemas(opts = {}) + data, _status_code, _headers = scim_get_schemas_with_http_info(opts) + data + end + + # List supported SCIM schemas + # Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [Array<(ScimSchemasListResponse, Integer, Hash)>] ScimSchemasListResponse data, response status code and response headers + def scim_get_schemas_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_schemas ...' + end + # resource path + local_var_path = '/v1/provisioning/scim/Schemas' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ScimSchemasListResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_get_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get SCIM service provider configuration + # Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings. + # @param [Hash] opts the optional parameters + # @return [ScimServiceProviderConfigResponse] + def scim_get_service_provider_config(opts = {}) + data, _status_code, _headers = scim_get_service_provider_config_with_http_info(opts) + data + end + + # Get SCIM service provider configuration + # Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings. + # @param [Hash] opts the optional parameters + # @return [Array<(ScimServiceProviderConfigResponse, Integer, Hash)>] ScimServiceProviderConfigResponse data, response status code and response headers + def scim_get_service_provider_config_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_service_provider_config ...' + end + # resource path + local_var_path = '/v1/provisioning/scim/ServiceProviderConfig' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ScimServiceProviderConfigResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_get_service_provider_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get SCIM user + # Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id [Integer] The ID of the user. + # @param [Hash] opts the optional parameters + # @return [ScimUser] + def scim_get_user(user_id, opts = {}) + data, _status_code, _headers = scim_get_user_with_http_info(user_id, opts) + data + end + + # Get SCIM user + # Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id [Integer] The ID of the user. + # @param [Hash] opts the optional parameters + # @return [Array<(ScimUser, Integer, Hash)>] ScimUser data, response status code and response headers + def scim_get_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_user ...' + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling ManagementApi.scim_get_user" + end + # resource path + local_var_path = '/v1/provisioning/scim/Users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ScimUser' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List SCIM users + # Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + # @param [Hash] opts the optional parameters + # @return [ScimUsersListResponse] + def scim_get_users(opts = {}) + data, _status_code, _headers = scim_get_users_with_http_info(opts) + data + end + + # List SCIM users + # Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + # @param [Hash] opts the optional parameters + # @return [Array<(ScimUsersListResponse, Integer, Hash)>] ScimUsersListResponse data, response status code and response headers + def scim_get_users_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_users ...' + end + # resource path + local_var_path = '/v1/provisioning/scim/Users' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ScimUsersListResponse' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update SCIM user attributes + # Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged. + # @param user_id [Integer] The ID of the user. + # @param body [ScimPatchRequest] body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + def scim_patch_user(user_id, body, opts = {}) + data, _status_code, _headers = scim_patch_user_with_http_info(user_id, body, opts) + data + end + + # Update SCIM user attributes + # Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged. + # @param user_id [Integer] The ID of the user. + # @param body [ScimPatchRequest] body + # @param [Hash] opts the optional parameters + # @return [Array<(ScimUser, Integer, Hash)>] ScimUser data, response status code and response headers + def scim_patch_user_with_http_info(user_id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_patch_user ...' + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling ManagementApi.scim_patch_user" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.scim_patch_user" + end + # resource path + local_var_path = '/v1/provisioning/scim/Users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'ScimUser' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_patch_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update SCIM user + # Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload. + # @param user_id [Integer] The ID of the user. + # @param body [ScimNewUser] body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + def scim_replace_user_attributes(user_id, body, opts = {}) + data, _status_code, _headers = scim_replace_user_attributes_with_http_info(user_id, body, opts) + data + end + + # Update SCIM user + # Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload. + # @param user_id [Integer] The ID of the user. + # @param body [ScimNewUser] body + # @param [Hash] opts the optional parameters + # @return [Array<(ScimUser, Integer, Hash)>] ScimUser data, response status code and response headers + def scim_replace_user_attributes_with_http_info(user_id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ManagementApi.scim_replace_user_attributes ...' + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling ManagementApi.scim_replace_user_attributes" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.scim_replace_user_attributes" + end + # resource path + local_var_path = '/v1/provisioning/scim/Users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:return_type] || 'ScimUser' + + # auth_names + auth_names = opts[:auth_names] || ['management_key', 'manager_auth'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ManagementApi#scim_replace_user_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List coupons that match the given attributes (without total count) # List the coupons whose attributes match the query criteria in all the campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -10252,7 +11301,7 @@ def reset_password_with_http_info(body, opts = {}) # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [InlineResponse2009] def search_coupons_advanced_application_wide_without_total_count(application_id, body, opts = {}) data, _status_code, _headers = search_coupons_advanced_application_wide_without_total_count_with_http_info(application_id, body, opts) @@ -10276,7 +11325,7 @@ def search_coupons_advanced_application_wide_without_total_count(application_id, # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers def search_coupons_advanced_application_wide_without_total_count_with_http_info(application_id, body, opts = {}) if @api_client.config.debugging @@ -10306,7 +11355,7 @@ def search_coupons_advanced_application_wide_without_total_count_with_http_info( if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable']) fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}" end - allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"] + allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired"] if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state']) fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}" end @@ -11023,7 +12072,7 @@ def update_collection_with_http_info(application_id, campaign_id, collection_id, end # Update coupon - # Update the specified coupon.

Important

With this PUT endpoint only, any property you do not explicitly set in your request will be set to null.

+ # Update the specified coupon.

Important

With this PUT endpoint alone, if you do not explicitly set a value for the startDate, expiryDate, and recipientIntegrationId properties in your request, it is automatically set to null.

# @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param coupon_id [String] The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. @@ -11036,7 +12085,7 @@ def update_coupon(application_id, campaign_id, coupon_id, body, opts = {}) end # Update coupon - # Update the specified coupon. <div class=\"redoc-section\"> <p class=\"title\">Important</p> <p>With this PUT endpoint only, any property you do not explicitly set in your request will be set to <code>null</code>.</p> </div> + # Update the specified coupon. <div class=\"redoc-section\"> <p class=\"title\">Important</p> <p>With this <code>PUT</code> endpoint alone, if you do not explicitly set a value for the <code>startDate</code>, <code>expiryDate</code>, and <code>recipientIntegrationId</code> properties in your request, it is automatically set to <code>null</code>.</p> </div> # @param application_id [Integer] The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id [Integer] The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param coupon_id [String] The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. diff --git a/lib/talon_one/models/achievement_progress.rb b/lib/talon_one/models/achievement_progress.rb index 3ec0312..27af38d 100644 --- a/lib/talon_one/models/achievement_progress.rb +++ b/lib/talon_one/models/achievement_progress.rb @@ -23,6 +23,9 @@ class AchievementProgress # The display name of the achievement in the Campaign Manager. attr_accessor :title + # The description of the achievement in the Campaign Manager. + attr_accessor :description + # The ID of the campaign the achievement belongs to. attr_accessor :campaign_id @@ -72,6 +75,7 @@ def self.attribute_map :'achievement_id' => :'achievementId', :'name' => :'name', :'title' => :'title', + :'description' => :'description', :'campaign_id' => :'campaignId', :'status' => :'status', :'target' => :'target', @@ -88,6 +92,7 @@ def self.openapi_types :'achievement_id' => :'Integer', :'name' => :'String', :'title' => :'String', + :'description' => :'String', :'campaign_id' => :'Integer', :'status' => :'String', :'target' => :'Float', @@ -131,6 +136,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'campaign_id') self.campaign_id = attributes[:'campaign_id'] end @@ -189,6 +198,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "title", title cannot be nil.') end + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end @@ -221,6 +234,7 @@ def valid? return false if @name.to_s.length < 1 return false if @name !~ Regexp.new(/^[a-zA-Z]\w+$/) return false if @title.nil? + return false if @description.nil? return false if @campaign_id.nil? return false if @status.nil? status_validator = EnumAttributeValidator.new('String', ["inprogress", "completed", "expired"]) @@ -272,6 +286,7 @@ def ==(o) achievement_id == o.achievement_id && name == o.name && title == o.title && + description == o.description && campaign_id == o.campaign_id && status == o.status && target == o.target && @@ -290,7 +305,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [achievement_id, name, title, campaign_id, status, target, progress, start_date, completion_date, end_date].hash + [achievement_id, name, title, description, campaign_id, status, target, progress, start_date, completion_date, end_date].hash end # Builds the object from hash diff --git a/lib/talon_one/models/additional_campaign_properties.rb b/lib/talon_one/models/additional_campaign_properties.rb index 637d960..9a126f7 100644 --- a/lib/talon_one/models/additional_campaign_properties.rb +++ b/lib/talon_one/models/additional_campaign_properties.rb @@ -80,6 +80,9 @@ class AdditionalCampaignProperties # A campaign state described exactly as in the Campaign Manager. attr_accessor :frontend_state + # Indicates whether the linked stores were imported via a CSV file. + attr_accessor :stores_imported + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -126,7 +129,8 @@ def self.attribute_map :'created_by' => :'createdBy', :'updated_by' => :'updatedBy', :'template_id' => :'templateId', - :'frontend_state' => :'frontendState' + :'frontend_state' => :'frontendState', + :'stores_imported' => :'storesImported' } end @@ -154,7 +158,8 @@ def self.openapi_types :'created_by' => :'String', :'updated_by' => :'String', :'template_id' => :'Integer', - :'frontend_state' => :'String' + :'frontend_state' => :'String', + :'stores_imported' => :'Boolean' } end @@ -268,6 +273,10 @@ def initialize(attributes = {}) if attributes.key?(:'frontend_state') self.frontend_state = attributes[:'frontend_state'] end + + if attributes.key?(:'stores_imported') + self.stores_imported = attributes[:'stores_imported'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -282,6 +291,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "frontend_state", frontend_state cannot be nil.') end + if @stores_imported.nil? + invalid_properties.push('invalid value for "stores_imported", stores_imported cannot be nil.') + end + invalid_properties end @@ -290,15 +303,16 @@ def list_invalid_properties def valid? return false if @budgets.nil? return false if @frontend_state.nil? - frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) return false unless frontend_state_validator.valid?(@frontend_state) + return false if @stores_imported.nil? true end # Custom attribute writer method checking allowed values (enum). # @param [Object] frontend_state Object to be assigned def frontend_state=(frontend_state) - validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) unless validator.valid?(frontend_state) fail ArgumentError, "invalid value for \"frontend_state\", must be one of #{validator.allowable_values}." end @@ -331,7 +345,8 @@ def ==(o) created_by == o.created_by && updated_by == o.updated_by && template_id == o.template_id && - frontend_state == o.frontend_state + frontend_state == o.frontend_state && + stores_imported == o.stores_imported end # @see the `==` method @@ -343,7 +358,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state].hash + [budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state, stores_imported].hash end # Builds the object from hash diff --git a/lib/talon_one/models/analytics_data_point.rb b/lib/talon_one/models/analytics_data_point.rb new file mode 100644 index 0000000..704ea42 --- /dev/null +++ b/lib/talon_one/models/analytics_data_point.rb @@ -0,0 +1,225 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class AnalyticsDataPoint + attr_accessor :total + + attr_accessor :influenced + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total' => :'total', + :'influenced' => :'influenced' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'total' => :'Float', + :'influenced' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::AnalyticsDataPoint` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::AnalyticsDataPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + + if attributes.key?(:'influenced') + self.influenced = attributes[:'influenced'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @total.nil? + invalid_properties.push('invalid value for "total", total cannot be nil.') + end + + if @influenced.nil? + invalid_properties.push('invalid value for "influenced", influenced cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @total.nil? + return false if @influenced.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total == o.total && + influenced == o.influenced + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total, influenced].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/analytics_data_point_with_trend.rb b/lib/talon_one/models/analytics_data_point_with_trend.rb new file mode 100644 index 0000000..9d8f23c --- /dev/null +++ b/lib/talon_one/models/analytics_data_point_with_trend.rb @@ -0,0 +1,225 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class AnalyticsDataPointWithTrend + attr_accessor :value + + attr_accessor :trend + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'trend' => :'trend' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Float', + :'trend' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::AnalyticsDataPointWithTrend` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::AnalyticsDataPointWithTrend`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'trend') + self.trend = attributes[:'trend'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @trend.nil? + invalid_properties.push('invalid value for "trend", trend cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @value.nil? + return false if @trend.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + trend == o.trend + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value, trend].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb b/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb new file mode 100644 index 0000000..31f1dde --- /dev/null +++ b/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb @@ -0,0 +1,239 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class AnalyticsDataPointWithTrendAndInfluencedRate + attr_accessor :value + + attr_accessor :influenced_rate + + attr_accessor :trend + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'influenced_rate' => :'influencedRate', + :'trend' => :'trend' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Float', + :'influenced_rate' => :'Float', + :'trend' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'influenced_rate') + self.influenced_rate = attributes[:'influenced_rate'] + end + + if attributes.key?(:'trend') + self.trend = attributes[:'trend'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @influenced_rate.nil? + invalid_properties.push('invalid value for "influenced_rate", influenced_rate cannot be nil.') + end + + if @trend.nil? + invalid_properties.push('invalid value for "trend", trend cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @value.nil? + return false if @influenced_rate.nil? + return false if @trend.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + influenced_rate == o.influenced_rate && + trend == o.trend + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value, influenced_rate, trend].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb b/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb new file mode 100644 index 0000000..24cfcb6 --- /dev/null +++ b/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb @@ -0,0 +1,239 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class AnalyticsDataPointWithTrendAndUplift + attr_accessor :value + + attr_accessor :uplift + + attr_accessor :trend + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'uplift' => :'uplift', + :'trend' => :'trend' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Float', + :'uplift' => :'Float', + :'trend' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::AnalyticsDataPointWithTrendAndUplift` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::AnalyticsDataPointWithTrendAndUplift`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'uplift') + self.uplift = attributes[:'uplift'] + end + + if attributes.key?(:'trend') + self.trend = attributes[:'trend'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @uplift.nil? + invalid_properties.push('invalid value for "uplift", uplift cannot be nil.') + end + + if @trend.nil? + invalid_properties.push('invalid value for "trend", trend cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @value.nil? + return false if @uplift.nil? + return false if @trend.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + uplift == o.uplift && + trend == o.trend + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value, uplift, trend].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/application.rb b/lib/talon_one/models/application.rb index 9024f9e..a9246c8 100644 --- a/lib/talon_one/models/application.rb +++ b/lib/talon_one/models/application.rb @@ -71,6 +71,12 @@ class Application # The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. attr_accessor :default_evaluation_group_id + # The ID of the default Cart-Item-Filter for this application. + attr_accessor :default_cart_item_filter_id + + # Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. + attr_accessor :enable_campaign_state_management + # An array containing all the loyalty programs to which this application is subscribed. attr_accessor :loyalty_programs @@ -118,6 +124,8 @@ def self.attribute_map :'enable_partial_discounts' => :'enablePartialDiscounts', :'default_discount_additional_cost_per_item_scope' => :'defaultDiscountAdditionalCostPerItemScope', :'default_evaluation_group_id' => :'defaultEvaluationGroupId', + :'default_cart_item_filter_id' => :'defaultCartItemFilterId', + :'enable_campaign_state_management' => :'enableCampaignStateManagement', :'loyalty_programs' => :'loyaltyPrograms' } end @@ -144,6 +152,8 @@ def self.openapi_types :'enable_partial_discounts' => :'Boolean', :'default_discount_additional_cost_per_item_scope' => :'String', :'default_evaluation_group_id' => :'Integer', + :'default_cart_item_filter_id' => :'Integer', + :'enable_campaign_state_management' => :'Boolean', :'loyalty_programs' => :'Array' } end @@ -247,6 +257,14 @@ def initialize(attributes = {}) self.default_evaluation_group_id = attributes[:'default_evaluation_group_id'] end + if attributes.key?(:'default_cart_item_filter_id') + self.default_cart_item_filter_id = attributes[:'default_cart_item_filter_id'] + end + + if attributes.key?(:'enable_campaign_state_management') + self.enable_campaign_state_management = attributes[:'enable_campaign_state_management'] + end + if attributes.key?(:'loyalty_programs') if (value = attributes[:'loyalty_programs']).is_a?(Array) self.loyalty_programs = value @@ -424,6 +442,8 @@ def ==(o) enable_partial_discounts == o.enable_partial_discounts && default_discount_additional_cost_per_item_scope == o.default_discount_additional_cost_per_item_scope && default_evaluation_group_id == o.default_evaluation_group_id && + default_cart_item_filter_id == o.default_cart_item_filter_id && + enable_campaign_state_management == o.enable_campaign_state_management && loyalty_programs == o.loyalty_programs end @@ -436,7 +456,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id, loyalty_programs].hash + [id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id, default_cart_item_filter_id, enable_campaign_state_management, loyalty_programs].hash end # Builds the object from hash diff --git a/lib/talon_one/models/application_analytics_data_point.rb b/lib/talon_one/models/application_analytics_data_point.rb index 6f07018..5494eb2 100644 --- a/lib/talon_one/models/application_analytics_data_point.rb +++ b/lib/talon_one/models/application_analytics_data_point.rb @@ -53,10 +53,10 @@ def self.openapi_types { :'start_time' => :'DateTime', :'end_time' => :'DateTime', - :'total_revenue' => :'ApplicationAnalyticsDataPointTotalRevenue', - :'sessions_count' => :'ApplicationAnalyticsDataPointSessionsCount', - :'avg_items_per_session' => :'ApplicationAnalyticsDataPointAvgItemsPerSession', - :'avg_session_value' => :'ApplicationAnalyticsDataPointAvgSessionValue', + :'total_revenue' => :'AnalyticsDataPoint', + :'sessions_count' => :'AnalyticsDataPoint', + :'avg_items_per_session' => :'AnalyticsDataPoint', + :'avg_session_value' => :'AnalyticsDataPoint', :'total_discounts' => :'Float', :'coupons_count' => :'Float' } @@ -120,12 +120,22 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @start_time.nil? + invalid_properties.push('invalid value for "start_time", start_time cannot be nil.') + end + + if @end_time.nil? + invalid_properties.push('invalid value for "end_time", end_time cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @start_time.nil? + return false if @end_time.nil? true end diff --git a/lib/talon_one/models/application_campaign_analytics.rb b/lib/talon_one/models/application_campaign_analytics.rb index a841c8f..b748555 100644 --- a/lib/talon_one/models/application_campaign_analytics.rb +++ b/lib/talon_one/models/application_campaign_analytics.rb @@ -32,15 +32,6 @@ class ApplicationCampaignAnalytics # The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons. attr_accessor :campaign_state - # The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. - attr_accessor :campaign_active_ruleset_id - - # Date and time when the campaign becomes active. - attr_accessor :campaign_start_time - - # Date and time when the campaign becomes inactive. - attr_accessor :campaign_end_time - attr_accessor :total_revenue attr_accessor :sessions_count @@ -84,9 +75,6 @@ def self.attribute_map :'campaign_name' => :'campaignName', :'campaign_tags' => :'campaignTags', :'campaign_state' => :'campaignState', - :'campaign_active_ruleset_id' => :'campaignActiveRulesetId', - :'campaign_start_time' => :'campaignStartTime', - :'campaign_end_time' => :'campaignEndTime', :'total_revenue' => :'totalRevenue', :'sessions_count' => :'sessionsCount', :'avg_items_per_session' => :'avgItemsPerSession', @@ -105,15 +93,12 @@ def self.openapi_types :'campaign_name' => :'String', :'campaign_tags' => :'Array', :'campaign_state' => :'String', - :'campaign_active_ruleset_id' => :'Integer', - :'campaign_start_time' => :'DateTime', - :'campaign_end_time' => :'DateTime', - :'total_revenue' => :'ApplicationCampaignAnalyticsTotalRevenue', - :'sessions_count' => :'ApplicationCampaignAnalyticsSessionsCount', - :'avg_items_per_session' => :'ApplicationCampaignAnalyticsAvgItemsPerSession', - :'avg_session_value' => :'ApplicationCampaignAnalyticsAvgSessionValue', - :'total_discounts' => :'ApplicationCampaignAnalyticsTotalDiscounts', - :'coupons_count' => :'ApplicationCampaignAnalyticsCouponsCount' + :'total_revenue' => :'AnalyticsDataPointWithTrendAndInfluencedRate', + :'sessions_count' => :'AnalyticsDataPointWithTrendAndInfluencedRate', + :'avg_items_per_session' => :'AnalyticsDataPointWithTrendAndUplift', + :'avg_session_value' => :'AnalyticsDataPointWithTrendAndUplift', + :'total_discounts' => :'AnalyticsDataPointWithTrend', + :'coupons_count' => :'AnalyticsDataPointWithTrend' } end @@ -162,20 +147,6 @@ def initialize(attributes = {}) if attributes.key?(:'campaign_state') self.campaign_state = attributes[:'campaign_state'] - else - self.campaign_state = 'enabled' - end - - if attributes.key?(:'campaign_active_ruleset_id') - self.campaign_active_ruleset_id = attributes[:'campaign_active_ruleset_id'] - end - - if attributes.key?(:'campaign_start_time') - self.campaign_start_time = attributes[:'campaign_start_time'] - end - - if attributes.key?(:'campaign_end_time') - self.campaign_end_time = attributes[:'campaign_end_time'] end if attributes.key?(:'total_revenue') @@ -207,13 +178,43 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @start_time.nil? + invalid_properties.push('invalid value for "start_time", start_time cannot be nil.') + end + + if @end_time.nil? + invalid_properties.push('invalid value for "end_time", end_time cannot be nil.') + end + + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + if @campaign_name.nil? + invalid_properties.push('invalid value for "campaign_name", campaign_name cannot be nil.') + end + + if @campaign_tags.nil? + invalid_properties.push('invalid value for "campaign_tags", campaign_tags cannot be nil.') + end + + if @campaign_state.nil? + invalid_properties.push('invalid value for "campaign_state", campaign_state cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - campaign_state_validator = EnumAttributeValidator.new('String', ["enabled", "disabled", "archived"]) + return false if @start_time.nil? + return false if @end_time.nil? + return false if @campaign_id.nil? + return false if @campaign_name.nil? + return false if @campaign_tags.nil? + return false if @campaign_state.nil? + campaign_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) return false unless campaign_state_validator.valid?(@campaign_state) true end @@ -221,7 +222,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] campaign_state Object to be assigned def campaign_state=(campaign_state) - validator = EnumAttributeValidator.new('String', ["enabled", "disabled", "archived"]) + validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) unless validator.valid?(campaign_state) fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{validator.allowable_values}." end @@ -239,9 +240,6 @@ def ==(o) campaign_name == o.campaign_name && campaign_tags == o.campaign_tags && campaign_state == o.campaign_state && - campaign_active_ruleset_id == o.campaign_active_ruleset_id && - campaign_start_time == o.campaign_start_time && - campaign_end_time == o.campaign_end_time && total_revenue == o.total_revenue && sessions_count == o.sessions_count && avg_items_per_session == o.avg_items_per_session && @@ -259,7 +257,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [start_time, end_time, campaign_id, campaign_name, campaign_tags, campaign_state, campaign_active_ruleset_id, campaign_start_time, campaign_end_time, total_revenue, sessions_count, avg_items_per_session, avg_session_value, total_discounts, coupons_count].hash + [start_time, end_time, campaign_id, campaign_name, campaign_tags, campaign_state, total_revenue, sessions_count, avg_items_per_session, avg_session_value, total_discounts, coupons_count].hash end # Builds the object from hash diff --git a/lib/talon_one/models/application_campaign_stats.rb b/lib/talon_one/models/application_campaign_stats.rb index b0c2647..a8b8370 100644 --- a/lib/talon_one/models/application_campaign_stats.rb +++ b/lib/talon_one/models/application_campaign_stats.rb @@ -15,9 +15,6 @@ module TalonOne # Provides statistics regarding an application's campaigns. class ApplicationCampaignStats - # Number of draft campaigns. - attr_accessor :draft - # Number of disabled campaigns. attr_accessor :disabled @@ -36,7 +33,6 @@ class ApplicationCampaignStats # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'draft' => :'draft', :'disabled' => :'disabled', :'scheduled' => :'scheduled', :'running' => :'running', @@ -48,7 +44,6 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'draft' => :'Integer', :'disabled' => :'Integer', :'scheduled' => :'Integer', :'running' => :'Integer', @@ -78,10 +73,6 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'draft') - self.draft = attributes[:'draft'] - end - if attributes.key?(:'disabled') self.disabled = attributes[:'disabled'] end @@ -107,10 +98,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @draft.nil? - invalid_properties.push('invalid value for "draft", draft cannot be nil.') - end - if @disabled.nil? invalid_properties.push('invalid value for "disabled", disabled cannot be nil.') end @@ -137,7 +124,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @draft.nil? return false if @disabled.nil? return false if @scheduled.nil? return false if @running.nil? @@ -151,7 +137,6 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - draft == o.draft && disabled == o.disabled && scheduled == o.scheduled && running == o.running && @@ -168,7 +153,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [draft, disabled, scheduled, running, expired, archived].hash + [disabled, scheduled, running, expired, archived].hash end # Builds the object from hash diff --git a/lib/talon_one/models/application_cif.rb b/lib/talon_one/models/application_cif.rb new file mode 100644 index 0000000..a7183ce --- /dev/null +++ b/lib/talon_one/models/application_cif.rb @@ -0,0 +1,308 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class ApplicationCIF + # Internal ID of this entity. + attr_accessor :id + + # The time this entity was created. + attr_accessor :created + + # The name of the Application cart item filter used in API requests. + attr_accessor :name + + # A short description of the Application cart item filter. + attr_accessor :description + + # The ID of the expression that the Application cart item filter uses. + attr_accessor :active_expression_id + + # The ID of the user who last updated the Application cart item filter. + attr_accessor :modified_by + + # The ID of the user who created the Application cart item filter. + attr_accessor :created_by + + # Timestamp of the most recent update to the Application cart item filter. + attr_accessor :modified + + # The ID of the application that owns this entity. + attr_accessor :application_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created' => :'created', + :'name' => :'name', + :'description' => :'description', + :'active_expression_id' => :'activeExpressionId', + :'modified_by' => :'modifiedBy', + :'created_by' => :'createdBy', + :'modified' => :'modified', + :'application_id' => :'applicationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'created' => :'DateTime', + :'name' => :'String', + :'description' => :'String', + :'active_expression_id' => :'Integer', + :'modified_by' => :'Integer', + :'created_by' => :'Integer', + :'modified' => :'DateTime', + :'application_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ApplicationCIF` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ApplicationCIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'active_expression_id') + self.active_expression_id = attributes[:'active_expression_id'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @application_id.nil? + invalid_properties.push('invalid value for "application_id", application_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @created.nil? + return false if @name.nil? + return false if @application_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + created == o.created && + name == o.name && + description == o.description && + active_expression_id == o.active_expression_id && + modified_by == o.modified_by && + created_by == o.created_by && + modified == o.modified && + application_id == o.application_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, created, name, description, active_expression_id, modified_by, created_by, modified, application_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/application_cif_expression.rb b/lib/talon_one/models/application_cif_expression.rb new file mode 100644 index 0000000..118bd76 --- /dev/null +++ b/lib/talon_one/models/application_cif_expression.rb @@ -0,0 +1,275 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class ApplicationCIFExpression + # Internal ID of this entity. + attr_accessor :id + + # The time this entity was created. + attr_accessor :created + + # The ID of the Application cart item filter. + attr_accessor :cart_item_filter_id + + # The ID of the user who created the Application cart item filter. + attr_accessor :created_by + + # Arbitrary additional JSON data associated with the Application cart item filter. + attr_accessor :expression + + # The ID of the application that owns this entity. + attr_accessor :application_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created' => :'created', + :'cart_item_filter_id' => :'cartItemFilterId', + :'created_by' => :'createdBy', + :'expression' => :'expression', + :'application_id' => :'applicationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'created' => :'DateTime', + :'cart_item_filter_id' => :'Integer', + :'created_by' => :'Integer', + :'expression' => :'Array', + :'application_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ApplicationCIFExpression` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ApplicationCIFExpression`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'cart_item_filter_id') + self.cart_item_filter_id = attributes[:'cart_item_filter_id'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'expression') + if (value = attributes[:'expression']).is_a?(Array) + self.expression = value + end + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @application_id.nil? + invalid_properties.push('invalid value for "application_id", application_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @created.nil? + return false if @application_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + created == o.created && + cart_item_filter_id == o.cart_item_filter_id && + created_by == o.created_by && + expression == o.expression && + application_id == o.application_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, created, cart_item_filter_id, created_by, expression, application_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/async_coupon_deletion_job_response.rb b/lib/talon_one/models/async_coupon_deletion_job_response.rb new file mode 100644 index 0000000..a1258a4 --- /dev/null +++ b/lib/talon_one/models/async_coupon_deletion_job_response.rb @@ -0,0 +1,213 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class AsyncCouponDeletionJobResponse + # Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::AsyncCouponDeletionJobResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::AsyncCouponDeletionJobResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/attribute.rb b/lib/talon_one/models/attribute.rb index 2db77ba..cf703d6 100644 --- a/lib/talon_one/models/attribute.rb +++ b/lib/talon_one/models/attribute.rb @@ -298,7 +298,7 @@ def valid? return false if @created.nil? return false if @account_id.nil? return false if @entity.nil? - entity_validator = EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + entity_validator = EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) return false unless entity_validator.valid?(@entity) return false if @name.nil? return false if @name !~ Regexp.new(/^[A-Za-z]\w*$/) @@ -316,7 +316,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] entity Object to be assigned def entity=(entity) - validator = EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + validator = EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) unless validator.valid?(entity) fail ArgumentError, "invalid value for \"entity\", must be one of #{validator.allowable_values}." end diff --git a/lib/talon_one/models/base_loyalty_program.rb b/lib/talon_one/models/base_loyalty_program.rb index 6cc23a2..162b174 100644 --- a/lib/talon_one/models/base_loyalty_program.rb +++ b/lib/talon_one/models/base_loyalty_program.rb @@ -38,17 +38,22 @@ class BaseLoyaltyProgram # Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. attr_accessor :sandbox - # The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + attr_accessor :program_join_policy + + # The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. attr_accessor :tiers_expiration_policy - # The amount of time after which the tier expires. 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. + # Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. + attr_accessor :tier_cycle_start_date + + # The amount of time after which the tier expires and is reevaluated. 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. attr_accessor :tiers_expire_in - # Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + # The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. attr_accessor :tiers_downgrade_policy - # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. - attr_accessor :program_join_policy + attr_accessor :card_code_settings class EnumAttributeValidator attr_reader :datatype @@ -83,10 +88,12 @@ def self.attribute_map :'allow_subledger' => :'allowSubledger', :'users_per_card_limit' => :'usersPerCardLimit', :'sandbox' => :'sandbox', + :'program_join_policy' => :'programJoinPolicy', :'tiers_expiration_policy' => :'tiersExpirationPolicy', + :'tier_cycle_start_date' => :'tierCycleStartDate', :'tiers_expire_in' => :'tiersExpireIn', :'tiers_downgrade_policy' => :'tiersDowngradePolicy', - :'program_join_policy' => :'programJoinPolicy' + :'card_code_settings' => :'cardCodeSettings' } end @@ -101,10 +108,12 @@ def self.openapi_types :'allow_subledger' => :'Boolean', :'users_per_card_limit' => :'Integer', :'sandbox' => :'Boolean', + :'program_join_policy' => :'String', :'tiers_expiration_policy' => :'String', + :'tier_cycle_start_date' => :'DateTime', :'tiers_expire_in' => :'String', :'tiers_downgrade_policy' => :'String', - :'program_join_policy' => :'String' + :'card_code_settings' => :'CodeGeneratorSettings' } end @@ -163,10 +172,18 @@ def initialize(attributes = {}) self.sandbox = attributes[:'sandbox'] end + if attributes.key?(:'program_join_policy') + self.program_join_policy = attributes[:'program_join_policy'] + end + if attributes.key?(:'tiers_expiration_policy') self.tiers_expiration_policy = attributes[:'tiers_expiration_policy'] end + if attributes.key?(:'tier_cycle_start_date') + self.tier_cycle_start_date = attributes[:'tier_cycle_start_date'] + end + if attributes.key?(:'tiers_expire_in') self.tiers_expire_in = attributes[:'tiers_expire_in'] end @@ -175,8 +192,8 @@ def initialize(attributes = {}) self.tiers_downgrade_policy = attributes[:'tiers_downgrade_policy'] end - if attributes.key?(:'program_join_policy') - self.program_join_policy = attributes[:'program_join_policy'] + if attributes.key?(:'card_code_settings') + self.card_code_settings = attributes[:'card_code_settings'] end end @@ -195,12 +212,12 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if !@users_per_card_limit.nil? && @users_per_card_limit < 0 - tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + return false unless program_join_policy_validator.valid?(@program_join_policy) + tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy) tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"]) return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy) - program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - return false unless program_join_policy_validator.valid?(@program_join_policy) true end @@ -214,10 +231,20 @@ def users_per_card_limit=(users_per_card_limit) @users_per_card_limit = users_per_card_limit end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] program_join_policy Object to be assigned + def program_join_policy=(program_join_policy) + validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + unless validator.valid?(program_join_policy) + fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." + end + @program_join_policy = program_join_policy + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] tiers_expiration_policy Object to be assigned def tiers_expiration_policy=(tiers_expiration_policy) - validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) unless validator.valid?(tiers_expiration_policy) fail ArgumentError, "invalid value for \"tiers_expiration_policy\", must be one of #{validator.allowable_values}." end @@ -234,16 +261,6 @@ def tiers_downgrade_policy=(tiers_downgrade_policy) @tiers_downgrade_policy = tiers_downgrade_policy end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] program_join_policy Object to be assigned - def program_join_policy=(program_join_policy) - validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - unless validator.valid?(program_join_policy) - fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." - end - @program_join_policy = program_join_policy - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -257,10 +274,12 @@ def ==(o) allow_subledger == o.allow_subledger && users_per_card_limit == o.users_per_card_limit && sandbox == o.sandbox && + program_join_policy == o.program_join_policy && tiers_expiration_policy == o.tiers_expiration_policy && + tier_cycle_start_date == o.tier_cycle_start_date && tiers_expire_in == o.tiers_expire_in && tiers_downgrade_policy == o.tiers_downgrade_policy && - program_join_policy == o.program_join_policy + card_code_settings == o.card_code_settings end # @see the `==` method @@ -272,7 +291,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, tiers_expiration_policy, tiers_expire_in, tiers_downgrade_policy, program_join_policy].hash + [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, program_join_policy, tiers_expiration_policy, tier_cycle_start_date, tiers_expire_in, tiers_downgrade_policy, card_code_settings].hash end # Builds the object from hash diff --git a/lib/talon_one/models/base_notification.rb b/lib/talon_one/models/base_notification.rb index e7f904e..c141dc4 100644 --- a/lib/talon_one/models/base_notification.rb +++ b/lib/talon_one/models/base_notification.rb @@ -15,6 +15,7 @@ module TalonOne # class BaseNotification + # Indicates which notification properties to apply. attr_accessor :policy # Indicates whether the notification is activated. @@ -151,7 +152,7 @@ def valid? return false if @id.nil? return false if @id < 1 return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) + type_validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) return false unless type_validator.valid?(@type) true end @@ -173,7 +174,7 @@ def id=(id) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) + validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/talon_one/models/base_notification_entity.rb b/lib/talon_one/models/base_notification_entity.rb index 78fa3ef..390275e 100644 --- a/lib/talon_one/models/base_notification_entity.rb +++ b/lib/talon_one/models/base_notification_entity.rb @@ -14,6 +14,7 @@ module TalonOne class BaseNotificationEntity + # Indicates which notification properties to apply. attr_accessor :policy # Indicates whether the notification is activated. diff --git a/lib/talon_one/models/campaign.rb b/lib/talon_one/models/campaign.rb index c6250d5..d08cd81 100644 --- a/lib/talon_one/models/campaign.rb +++ b/lib/talon_one/models/campaign.rb @@ -136,6 +136,27 @@ class Campaign # A campaign state described exactly as in the Campaign Manager. attr_accessor :frontend_state + # Indicates whether the linked stores were imported via a CSV file. + attr_accessor :stores_imported + + # ID of the revision that was last activated on this campaign. + attr_accessor :active_revision_id + + # ID of the revision version that is active on the campaign. + attr_accessor :active_revision_version_id + + # Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. + attr_accessor :version + + # ID of the revision currently being modified for the campaign. + attr_accessor :current_revision_id + + # ID of the latest version applied on the current revision. + attr_accessor :current_revision_version_id + + # Flag for determining whether we use current revision when sending requests with staging API key. + attr_accessor :stage_revision + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -201,7 +222,14 @@ def self.attribute_map :'created_by' => :'createdBy', :'updated_by' => :'updatedBy', :'template_id' => :'templateId', - :'frontend_state' => :'frontendState' + :'frontend_state' => :'frontendState', + :'stores_imported' => :'storesImported', + :'active_revision_id' => :'activeRevisionId', + :'active_revision_version_id' => :'activeRevisionVersionId', + :'version' => :'version', + :'current_revision_id' => :'currentRevisionId', + :'current_revision_version_id' => :'currentRevisionVersionId', + :'stage_revision' => :'stageRevision' } end @@ -248,7 +276,14 @@ def self.openapi_types :'created_by' => :'String', :'updated_by' => :'String', :'template_id' => :'Integer', - :'frontend_state' => :'String' + :'frontend_state' => :'String', + :'stores_imported' => :'Boolean', + :'active_revision_id' => :'Integer', + :'active_revision_version_id' => :'Integer', + :'version' => :'Integer', + :'current_revision_id' => :'Integer', + :'current_revision_version_id' => :'Integer', + :'stage_revision' => :'Boolean' } end @@ -452,6 +487,36 @@ def initialize(attributes = {}) if attributes.key?(:'frontend_state') self.frontend_state = attributes[:'frontend_state'] end + + if attributes.key?(:'stores_imported') + self.stores_imported = attributes[:'stores_imported'] + end + + if attributes.key?(:'active_revision_id') + self.active_revision_id = attributes[:'active_revision_id'] + end + + if attributes.key?(:'active_revision_version_id') + self.active_revision_version_id = attributes[:'active_revision_version_id'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'current_revision_id') + self.current_revision_id = attributes[:'current_revision_id'] + end + + if attributes.key?(:'current_revision_version_id') + self.current_revision_version_id = attributes[:'current_revision_version_id'] + end + + if attributes.key?(:'stage_revision') + self.stage_revision = attributes[:'stage_revision'] + else + self.stage_revision = false + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -514,6 +579,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "frontend_state", frontend_state cannot be nil.') end + if @stores_imported.nil? + invalid_properties.push('invalid value for "stores_imported", stores_imported cannot be nil.') + end + invalid_properties end @@ -538,8 +607,9 @@ def valid? return false unless type_validator.valid?(@type) return false if @budgets.nil? return false if @frontend_state.nil? - frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) return false unless frontend_state_validator.valid?(@frontend_state) + return false if @stores_imported.nil? true end @@ -580,7 +650,7 @@ def type=(type) # Custom attribute writer method checking allowed values (enum). # @param [Object] frontend_state Object to be assigned def frontend_state=(frontend_state) - validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) unless validator.valid?(frontend_state) fail ArgumentError, "invalid value for \"frontend_state\", must be one of #{validator.allowable_values}." end @@ -632,7 +702,14 @@ def ==(o) created_by == o.created_by && updated_by == o.updated_by && template_id == o.template_id && - frontend_state == o.frontend_state + frontend_state == o.frontend_state && + stores_imported == o.stores_imported && + active_revision_id == o.active_revision_id && + active_revision_version_id == o.active_revision_version_id && + version == o.version && + current_revision_id == o.current_revision_id && + current_revision_version_id == o.current_revision_version_id && + stage_revision == o.stage_revision end # @see the `==` method @@ -644,7 +721,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, application_id, user_id, name, description, start_time, end_time, attributes, state, active_ruleset_id, tags, features, coupon_settings, referral_settings, limits, campaign_groups, type, linked_store_ids, budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state].hash + [id, created, application_id, user_id, name, description, start_time, end_time, attributes, state, active_ruleset_id, tags, features, coupon_settings, referral_settings, limits, campaign_groups, type, linked_store_ids, budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state, stores_imported, active_revision_id, active_revision_version_id, version, current_revision_id, current_revision_version_id, stage_revision].hash end # Builds the object from hash diff --git a/lib/talon_one/models/campaign_collection_edited_notification.rb b/lib/talon_one/models/campaign_collection_edited_notification.rb new file mode 100644 index 0000000..3d98ac9 --- /dev/null +++ b/lib/talon_one/models/campaign_collection_edited_notification.rb @@ -0,0 +1,235 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # A notification regarding a collection that was edited. + class CampaignCollectionEditedNotification + attr_accessor :campaign + + attr_accessor :ruleset + + attr_accessor :collection + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'campaign' => :'campaign', + :'ruleset' => :'ruleset', + :'collection' => :'collection' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'campaign' => :'Campaign', + :'ruleset' => :'Ruleset', + :'collection' => :'CollectionWithoutPayload' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CampaignCollectionEditedNotification` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CampaignCollectionEditedNotification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'campaign') + self.campaign = attributes[:'campaign'] + end + + if attributes.key?(:'ruleset') + self.ruleset = attributes[:'ruleset'] + end + + if attributes.key?(:'collection') + self.collection = attributes[:'collection'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @campaign.nil? + invalid_properties.push('invalid value for "campaign", campaign cannot be nil.') + end + + if @collection.nil? + invalid_properties.push('invalid value for "collection", collection cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @campaign.nil? + return false if @collection.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + campaign == o.campaign && + ruleset == o.ruleset && + collection == o.collection + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [campaign, ruleset, collection].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/campaign_notification_policy.rb b/lib/talon_one/models/campaign_notification_policy.rb index 2e6655e..cfd03ce 100644 --- a/lib/talon_one/models/campaign_notification_policy.rb +++ b/lib/talon_one/models/campaign_notification_policy.rb @@ -17,17 +17,22 @@ class CampaignNotificationPolicy # Notification name. attr_accessor :name + # Indicates whether batching is activated. + attr_accessor :batching_enabled + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'name' => :'name' + :'name' => :'name', + :'batching_enabled' => :'batchingEnabled' } end # Attribute type mapping. def self.openapi_types { - :'name' => :'String' + :'name' => :'String', + :'batching_enabled' => :'Boolean' } end @@ -55,6 +60,12 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'batching_enabled') + self.batching_enabled = attributes[:'batching_enabled'] + else + self.batching_enabled = true + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -99,7 +110,8 @@ def name=(name) def ==(o) return true if self.equal?(o) self.class == o.class && - name == o.name + name == o.name && + batching_enabled == o.batching_enabled end # @see the `==` method @@ -111,7 +123,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name].hash + [name, batching_enabled].hash end # Builds the object from hash diff --git a/lib/talon_one/models/campaign_state_changed_notification.rb b/lib/talon_one/models/campaign_state_changed_notification.rb index c90e9b5..e4707d9 100644 --- a/lib/talon_one/models/campaign_state_changed_notification.rb +++ b/lib/talon_one/models/campaign_state_changed_notification.rb @@ -17,10 +17,10 @@ module TalonOne class CampaignStateChangedNotification attr_accessor :campaign - # The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] + # The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived'] attr_accessor :old_state - # The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] + # The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived'] attr_accessor :new_state attr_accessor :ruleset diff --git a/lib/talon_one/models/campaign_store_budget.rb b/lib/talon_one/models/campaign_store_budget.rb new file mode 100644 index 0000000..29bd850 --- /dev/null +++ b/lib/talon_one/models/campaign_store_budget.rb @@ -0,0 +1,275 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class CampaignStoreBudget + # Internal ID of this entity. + attr_accessor :id + + # The time this entity was created. + attr_accessor :created + + # The ID of the campaign that owns this entity. + attr_accessor :campaign_id + + # The ID of the store. + attr_accessor :store_id + + # The set of budget limits for stores linked to the campaign. + attr_accessor :limits + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created' => :'created', + :'campaign_id' => :'campaignId', + :'store_id' => :'storeId', + :'limits' => :'limits' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'created' => :'DateTime', + :'campaign_id' => :'Integer', + :'store_id' => :'Integer', + :'limits' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CampaignStoreBudget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CampaignStoreBudget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'campaign_id') + self.campaign_id = attributes[:'campaign_id'] + end + + if attributes.key?(:'store_id') + self.store_id = attributes[:'store_id'] + end + + if attributes.key?(:'limits') + if (value = attributes[:'limits']).is_a?(Array) + self.limits = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + if @store_id.nil? + invalid_properties.push('invalid value for "store_id", store_id cannot be nil.') + end + + if @limits.nil? + invalid_properties.push('invalid value for "limits", limits cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @created.nil? + return false if @campaign_id.nil? + return false if @store_id.nil? + return false if @limits.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + created == o.created && + campaign_id == o.campaign_id && + store_id == o.store_id && + limits == o.limits + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, created, campaign_id, store_id, limits].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/campaign_versions.rb b/lib/talon_one/models/campaign_versions.rb new file mode 100644 index 0000000..8a06401 --- /dev/null +++ b/lib/talon_one/models/campaign_versions.rb @@ -0,0 +1,259 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class CampaignVersions + # ID of the revision that was last activated on this campaign. + attr_accessor :active_revision_id + + # ID of the revision version that is active on the campaign. + attr_accessor :active_revision_version_id + + # Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign. + attr_accessor :version + + # ID of the revision currently being modified for the campaign. + attr_accessor :current_revision_id + + # ID of the latest version applied on the current revision. + attr_accessor :current_revision_version_id + + # Flag for determining whether we use current revision when sending requests with staging API key. + attr_accessor :stage_revision + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'active_revision_id' => :'activeRevisionId', + :'active_revision_version_id' => :'activeRevisionVersionId', + :'version' => :'version', + :'current_revision_id' => :'currentRevisionId', + :'current_revision_version_id' => :'currentRevisionVersionId', + :'stage_revision' => :'stageRevision' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'active_revision_id' => :'Integer', + :'active_revision_version_id' => :'Integer', + :'version' => :'Integer', + :'current_revision_id' => :'Integer', + :'current_revision_version_id' => :'Integer', + :'stage_revision' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CampaignVersions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CampaignVersions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'active_revision_id') + self.active_revision_id = attributes[:'active_revision_id'] + end + + if attributes.key?(:'active_revision_version_id') + self.active_revision_version_id = attributes[:'active_revision_version_id'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'current_revision_id') + self.current_revision_id = attributes[:'current_revision_id'] + end + + if attributes.key?(:'current_revision_version_id') + self.current_revision_version_id = attributes[:'current_revision_version_id'] + end + + if attributes.key?(:'stage_revision') + self.stage_revision = attributes[:'stage_revision'] + else + self.stage_revision = false + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + active_revision_id == o.active_revision_id && + active_revision_version_id == o.active_revision_version_id && + version == o.version && + current_revision_id == o.current_revision_id && + current_revision_version_id == o.current_revision_version_id && + stage_revision == o.stage_revision + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [active_revision_id, active_revision_version_id, version, current_revision_id, current_revision_version_id, stage_revision].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/card_added_deducted_points_notification_policy.rb b/lib/talon_one/models/card_added_deducted_points_notification_policy.rb new file mode 100644 index 0000000..ea2cca8 --- /dev/null +++ b/lib/talon_one/models/card_added_deducted_points_notification_policy.rb @@ -0,0 +1,269 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class CardAddedDeductedPointsNotificationPolicy + # Notification name. + attr_accessor :name + + attr_accessor :scopes + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'scopes' => :'scopes' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CardAddedDeductedPointsNotificationPolicy` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CardAddedDeductedPointsNotificationPolicy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + if @scopes.nil? + invalid_properties.push('invalid value for "scopes", scopes cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @name.to_s.length < 1 + return false if @scopes.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, scopes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/cart_item.rb b/lib/talon_one/models/cart_item.rb index 6a456c1..3aab2bb 100644 --- a/lib/talon_one/models/cart_item.rb +++ b/lib/talon_one/models/cart_item.rb @@ -52,7 +52,7 @@ class CartItem # Position of the Cart Item in the Cart (calculated internally). attr_accessor :position - # Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. + # Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. **Note:** Any previously defined attributes that you do not include in the array will be removed. attr_accessor :attributes # Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). diff --git a/lib/talon_one/models/code_generator_settings.rb b/lib/talon_one/models/code_generator_settings.rb index f508c32..7665d17 100644 --- a/lib/talon_one/models/code_generator_settings.rb +++ b/lib/talon_one/models/code_generator_settings.rb @@ -17,7 +17,7 @@ class CodeGeneratorSettings # List of characters used to generate the random parts of a code. attr_accessor :valid_characters - # The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. + # The pattern used to generate codes, such as coupon codes, referral codes, and loyalty cards. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. attr_accessor :coupon_pattern # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/talon_one/models/coupon.rb b/lib/talon_one/models/coupon.rb index facac4a..b5691bb 100644 --- a/lib/talon_one/models/coupon.rb +++ b/lib/talon_one/models/coupon.rb @@ -39,7 +39,7 @@ class Coupon # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. diff --git a/lib/talon_one/models/coupon_constraints.rb b/lib/talon_one/models/coupon_constraints.rb index 1465cb0..18d009f 100644 --- a/lib/talon_one/models/coupon_constraints.rb +++ b/lib/talon_one/models/coupon_constraints.rb @@ -26,7 +26,7 @@ class CouponConstraints # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/talon_one/models/coupon_creation_job.rb b/lib/talon_one/models/coupon_creation_job.rb index f5c3705..25c8867 100644 --- a/lib/talon_one/models/coupon_creation_job.rb +++ b/lib/talon_one/models/coupon_creation_job.rb @@ -42,7 +42,7 @@ class CouponCreationJob # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # The number of new coupon codes to generate for the campaign. diff --git a/lib/talon_one/models/coupon_deletion_filters.rb b/lib/talon_one/models/coupon_deletion_filters.rb new file mode 100644 index 0000000..1a2add7 --- /dev/null +++ b/lib/talon_one/models/coupon_deletion_filters.rb @@ -0,0 +1,375 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class CouponDeletionFilters + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :created_before + + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :created_after + + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :starts_after + + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :starts_before + + # - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future. - `validFuture`: Matches coupons in which the start date is set and in the future. + attr_accessor :valid + + # - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. + attr_accessor :usable + + # - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter. + attr_accessor :redeemed + + # Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. + attr_accessor :recipient_integration_id + + # Filter results to an exact case-insensitive matching against the coupon code + attr_accessor :exact_match + + # Filter results by the coupon code + attr_accessor :value + + # Filter results by batches of coupons + attr_accessor :batch_id + + # Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. + attr_accessor :referral_id + + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :expires_after + + # Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + attr_accessor :expires_before + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_before' => :'createdBefore', + :'created_after' => :'createdAfter', + :'starts_after' => :'startsAfter', + :'starts_before' => :'startsBefore', + :'valid' => :'valid', + :'usable' => :'usable', + :'redeemed' => :'redeemed', + :'recipient_integration_id' => :'recipientIntegrationId', + :'exact_match' => :'exactMatch', + :'value' => :'value', + :'batch_id' => :'batchId', + :'referral_id' => :'referralId', + :'expires_after' => :'expiresAfter', + :'expires_before' => :'expiresBefore' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'created_before' => :'DateTime', + :'created_after' => :'DateTime', + :'starts_after' => :'DateTime', + :'starts_before' => :'DateTime', + :'valid' => :'String', + :'usable' => :'Boolean', + :'redeemed' => :'Boolean', + :'recipient_integration_id' => :'String', + :'exact_match' => :'Boolean', + :'value' => :'String', + :'batch_id' => :'String', + :'referral_id' => :'Integer', + :'expires_after' => :'DateTime', + :'expires_before' => :'DateTime' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CouponDeletionFilters` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CouponDeletionFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'created_before') + self.created_before = attributes[:'created_before'] + end + + if attributes.key?(:'created_after') + self.created_after = attributes[:'created_after'] + end + + if attributes.key?(:'starts_after') + self.starts_after = attributes[:'starts_after'] + end + + if attributes.key?(:'starts_before') + self.starts_before = attributes[:'starts_before'] + end + + if attributes.key?(:'valid') + self.valid = attributes[:'valid'] + end + + if attributes.key?(:'usable') + self.usable = attributes[:'usable'] + end + + if attributes.key?(:'redeemed') + self.redeemed = attributes[:'redeemed'] + end + + if attributes.key?(:'recipient_integration_id') + self.recipient_integration_id = attributes[:'recipient_integration_id'] + end + + if attributes.key?(:'exact_match') + self.exact_match = attributes[:'exact_match'] + else + self.exact_match = false + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + else + self.value = 'false' + end + + if attributes.key?(:'batch_id') + self.batch_id = attributes[:'batch_id'] + end + + if attributes.key?(:'referral_id') + self.referral_id = attributes[:'referral_id'] + end + + if attributes.key?(:'expires_after') + self.expires_after = attributes[:'expires_after'] + end + + if attributes.key?(:'expires_before') + self.expires_before = attributes[:'expires_before'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + valid_validator = EnumAttributeValidator.new('String', ["expired", "validNow", "validFuture"]) + return false unless valid_validator.valid?(@valid) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] valid Object to be assigned + def valid=(valid) + validator = EnumAttributeValidator.new('String', ["expired", "validNow", "validFuture"]) + unless validator.valid?(valid) + fail ArgumentError, "invalid value for \"valid\", must be one of #{validator.allowable_values}." + end + @valid = valid + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_before == o.created_before && + created_after == o.created_after && + starts_after == o.starts_after && + starts_before == o.starts_before && + valid == o.valid && + usable == o.usable && + redeemed == o.redeemed && + recipient_integration_id == o.recipient_integration_id && + exact_match == o.exact_match && + value == o.value && + batch_id == o.batch_id && + referral_id == o.referral_id && + expires_after == o.expires_after && + expires_before == o.expires_before + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [created_before, created_after, starts_after, starts_before, valid, usable, redeemed, recipient_integration_id, exact_match, value, batch_id, referral_id, expires_after, expires_before].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/coupon_deletion_job.rb b/lib/talon_one/models/coupon_deletion_job.rb new file mode 100644 index 0000000..89ee682 --- /dev/null +++ b/lib/talon_one/models/coupon_deletion_job.rb @@ -0,0 +1,370 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class CouponDeletionJob + # Internal ID of this entity. + attr_accessor :id + + # The time this entity was created. + attr_accessor :created + + # The ID of the application that owns this entity. + attr_accessor :application_id + + # The ID of the account that owns this entity. + attr_accessor :account_id + + attr_accessor :filters + + # The current status of this request. Possible values: - `not_ready` - `pending` - `completed` - `failed` + attr_accessor :status + + # The number of coupon codes that were already deleted for this request. + attr_accessor :deleted_amount + + # The number of times this job failed. + attr_accessor :fail_count + + # An array of individual problems encountered during the request. + attr_accessor :errors + + # ID of the user who created this effect. + attr_accessor :created_by + + # Indicates whether the user that created this job was notified of its final state. + attr_accessor :communicated + + attr_accessor :campaign_i_ds + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created' => :'created', + :'application_id' => :'applicationId', + :'account_id' => :'accountId', + :'filters' => :'filters', + :'status' => :'status', + :'deleted_amount' => :'deletedAmount', + :'fail_count' => :'failCount', + :'errors' => :'errors', + :'created_by' => :'createdBy', + :'communicated' => :'communicated', + :'campaign_i_ds' => :'campaignIDs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'created' => :'DateTime', + :'application_id' => :'Integer', + :'account_id' => :'Integer', + :'filters' => :'CouponDeletionFilters', + :'status' => :'String', + :'deleted_amount' => :'Integer', + :'fail_count' => :'Integer', + :'errors' => :'Array', + :'created_by' => :'Integer', + :'communicated' => :'Boolean', + :'campaign_i_ds' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CouponDeletionJob` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CouponDeletionJob`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'deleted_amount') + self.deleted_amount = attributes[:'deleted_amount'] + end + + if attributes.key?(:'fail_count') + self.fail_count = attributes[:'fail_count'] + end + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'communicated') + self.communicated = attributes[:'communicated'] + end + + if attributes.key?(:'campaign_i_ds') + if (value = attributes[:'campaign_i_ds']).is_a?(Array) + self.campaign_i_ds = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @application_id.nil? + invalid_properties.push('invalid value for "application_id", application_id cannot be nil.') + end + + if @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @filters.nil? + invalid_properties.push('invalid value for "filters", filters cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @fail_count.nil? + invalid_properties.push('invalid value for "fail_count", fail_count cannot be nil.') + end + + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @created_by.nil? + invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + end + + if @communicated.nil? + invalid_properties.push('invalid value for "communicated", communicated cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @created.nil? + return false if @application_id.nil? + return false if @account_id.nil? + return false if @filters.nil? + return false if @status.nil? + return false if @fail_count.nil? + return false if @errors.nil? + return false if @created_by.nil? + return false if @communicated.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + created == o.created && + application_id == o.application_id && + account_id == o.account_id && + filters == o.filters && + status == o.status && + deleted_amount == o.deleted_amount && + fail_count == o.fail_count && + errors == o.errors && + created_by == o.created_by && + communicated == o.communicated && + campaign_i_ds == o.campaign_i_ds + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, created, application_id, account_id, filters, status, deleted_amount, fail_count, errors, created_by, communicated, campaign_i_ds].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/customer_session_v2.rb b/lib/talon_one/models/customer_session_v2.rb index dbdbf02..c52cf89 100644 --- a/lib/talon_one/models/customer_session_v2.rb +++ b/lib/talon_one/models/customer_session_v2.rb @@ -36,10 +36,10 @@ class CustomerSessionV2 # When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. attr_accessor :evaluable_campaign_ids - # Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. + # Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. attr_accessor :coupon_codes - # Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. + # Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. attr_accessor :referral_code # Identifier of a loyalty card. diff --git a/lib/talon_one/models/effect.rb b/lib/talon_one/models/effect.rb index 910d8a3..c58242c 100644 --- a/lib/talon_one/models/effect.rb +++ b/lib/talon_one/models/effect.rb @@ -39,6 +39,18 @@ class Effect # The index of the condition that was triggered. attr_accessor :condition_index + # The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). + attr_accessor :evaluation_group_id + + # The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). + attr_accessor :evaluation_group_mode + + # The revision ID of the campaign that was used when triggering the effect. + attr_accessor :campaign_revision_id + + # The revision version ID of the campaign that was used when triggering the effect. + attr_accessor :campaign_revision_version_id + # The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). attr_accessor :props @@ -53,6 +65,10 @@ def self.attribute_map :'triggered_by_coupon' => :'triggeredByCoupon', :'triggered_for_catalog_item' => :'triggeredForCatalogItem', :'condition_index' => :'conditionIndex', + :'evaluation_group_id' => :'evaluationGroupID', + :'evaluation_group_mode' => :'evaluationGroupMode', + :'campaign_revision_id' => :'campaignRevisionId', + :'campaign_revision_version_id' => :'campaignRevisionVersionId', :'props' => :'props' } end @@ -68,6 +84,10 @@ def self.openapi_types :'triggered_by_coupon' => :'Integer', :'triggered_for_catalog_item' => :'Integer', :'condition_index' => :'Integer', + :'evaluation_group_id' => :'Integer', + :'evaluation_group_mode' => :'String', + :'campaign_revision_id' => :'Integer', + :'campaign_revision_version_id' => :'Integer', :'props' => :'Object' } end @@ -125,6 +145,22 @@ def initialize(attributes = {}) self.condition_index = attributes[:'condition_index'] end + if attributes.key?(:'evaluation_group_id') + self.evaluation_group_id = attributes[:'evaluation_group_id'] + end + + if attributes.key?(:'evaluation_group_mode') + self.evaluation_group_mode = attributes[:'evaluation_group_mode'] + end + + if attributes.key?(:'campaign_revision_id') + self.campaign_revision_id = attributes[:'campaign_revision_id'] + end + + if attributes.key?(:'campaign_revision_version_id') + self.campaign_revision_version_id = attributes[:'campaign_revision_version_id'] + end + if attributes.key?(:'props') self.props = attributes[:'props'] end @@ -186,6 +222,10 @@ def ==(o) triggered_by_coupon == o.triggered_by_coupon && triggered_for_catalog_item == o.triggered_for_catalog_item && condition_index == o.condition_index && + evaluation_group_id == o.evaluation_group_id && + evaluation_group_mode == o.evaluation_group_mode && + campaign_revision_id == o.campaign_revision_id && + campaign_revision_version_id == o.campaign_revision_version_id && props == o.props end @@ -198,7 +238,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [campaign_id, ruleset_id, rule_index, rule_name, effect_type, triggered_by_coupon, triggered_for_catalog_item, condition_index, props].hash + [campaign_id, ruleset_id, rule_index, rule_name, effect_type, triggered_by_coupon, triggered_for_catalog_item, condition_index, evaluation_group_id, evaluation_group_mode, campaign_revision_id, campaign_revision_version_id, props].hash end # Builds the object from hash diff --git a/lib/talon_one/models/effect_entity.rb b/lib/talon_one/models/effect_entity.rb index d1ddd73..be4ffee 100644 --- a/lib/talon_one/models/effect_entity.rb +++ b/lib/talon_one/models/effect_entity.rb @@ -39,6 +39,18 @@ class EffectEntity # The index of the condition that was triggered. attr_accessor :condition_index + # The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). + attr_accessor :evaluation_group_id + + # The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). + attr_accessor :evaluation_group_mode + + # The revision ID of the campaign that was used when triggering the effect. + attr_accessor :campaign_revision_id + + # The revision version ID of the campaign that was used when triggering the effect. + attr_accessor :campaign_revision_version_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -49,7 +61,11 @@ def self.attribute_map :'effect_type' => :'effectType', :'triggered_by_coupon' => :'triggeredByCoupon', :'triggered_for_catalog_item' => :'triggeredForCatalogItem', - :'condition_index' => :'conditionIndex' + :'condition_index' => :'conditionIndex', + :'evaluation_group_id' => :'evaluationGroupID', + :'evaluation_group_mode' => :'evaluationGroupMode', + :'campaign_revision_id' => :'campaignRevisionId', + :'campaign_revision_version_id' => :'campaignRevisionVersionId' } end @@ -63,7 +79,11 @@ def self.openapi_types :'effect_type' => :'String', :'triggered_by_coupon' => :'Integer', :'triggered_for_catalog_item' => :'Integer', - :'condition_index' => :'Integer' + :'condition_index' => :'Integer', + :'evaluation_group_id' => :'Integer', + :'evaluation_group_mode' => :'String', + :'campaign_revision_id' => :'Integer', + :'campaign_revision_version_id' => :'Integer' } end @@ -119,6 +139,22 @@ def initialize(attributes = {}) if attributes.key?(:'condition_index') self.condition_index = attributes[:'condition_index'] end + + if attributes.key?(:'evaluation_group_id') + self.evaluation_group_id = attributes[:'evaluation_group_id'] + end + + if attributes.key?(:'evaluation_group_mode') + self.evaluation_group_mode = attributes[:'evaluation_group_mode'] + end + + if attributes.key?(:'campaign_revision_id') + self.campaign_revision_id = attributes[:'campaign_revision_id'] + end + + if attributes.key?(:'campaign_revision_version_id') + self.campaign_revision_version_id = attributes[:'campaign_revision_version_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -171,7 +207,11 @@ def ==(o) effect_type == o.effect_type && triggered_by_coupon == o.triggered_by_coupon && triggered_for_catalog_item == o.triggered_for_catalog_item && - condition_index == o.condition_index + condition_index == o.condition_index && + evaluation_group_id == o.evaluation_group_id && + evaluation_group_mode == o.evaluation_group_mode && + campaign_revision_id == o.campaign_revision_id && + campaign_revision_version_id == o.campaign_revision_version_id end # @see the `==` method @@ -183,7 +223,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [campaign_id, ruleset_id, rule_index, rule_name, effect_type, triggered_by_coupon, triggered_for_catalog_item, condition_index].hash + [campaign_id, ruleset_id, rule_index, rule_name, effect_type, triggered_by_coupon, triggered_for_catalog_item, condition_index, evaluation_group_id, evaluation_group_mode, campaign_revision_id, campaign_revision_version_id].hash end # Builds the object from hash diff --git a/lib/talon_one/models/environment.rb b/lib/talon_one/models/environment.rb index c1c02a3..f8181cc 100644 --- a/lib/talon_one/models/environment.rb +++ b/lib/talon_one/models/environment.rb @@ -57,6 +57,9 @@ class Environment # The account-level collections that the application is subscribed to. attr_accessor :collections + # The cart item filters belonging to the Application. + attr_accessor :application_cart_item_filters + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -73,7 +76,8 @@ def self.attribute_map :'attributes' => :'attributes', :'additional_costs' => :'additionalCosts', :'audiences' => :'audiences', - :'collections' => :'collections' + :'collections' => :'collections', + :'application_cart_item_filters' => :'applicationCartItemFilters' } end @@ -93,7 +97,8 @@ def self.openapi_types :'attributes' => :'Array', :'additional_costs' => :'Array', :'audiences' => :'Array', - :'collections' => :'Array' + :'collections' => :'Array', + :'application_cart_item_filters' => :'Array' } end @@ -193,6 +198,12 @@ def initialize(attributes = {}) self.collections = value end end + + if attributes.key?(:'application_cart_item_filters') + if (value = attributes[:'application_cart_item_filters']).is_a?(Array) + self.application_cart_item_filters = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -261,7 +272,8 @@ def ==(o) attributes == o.attributes && additional_costs == o.additional_costs && audiences == o.audiences && - collections == o.collections + collections == o.collections && + application_cart_item_filters == o.application_cart_item_filters end # @see the `==` method @@ -273,7 +285,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, application_id, slots, functions, templates, variables, giveaways_pools, loyalty_programs, achievements, attributes, additional_costs, audiences, collections].hash + [id, created, application_id, slots, functions, templates, variables, giveaways_pools, loyalty_programs, achievements, attributes, additional_costs, audiences, collections, application_cart_item_filters].hash end # Builds the object from hash diff --git a/lib/talon_one/models/event.rb b/lib/talon_one/models/event.rb index 2645bdf..1221505 100644 --- a/lib/talon_one/models/event.rb +++ b/lib/talon_one/models/event.rb @@ -191,10 +191,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "effects", effects cannot be nil.') end - if @ledger_entries.nil? - invalid_properties.push('invalid value for "ledger_entries", ledger_entries cannot be nil.') - end - invalid_properties end @@ -210,7 +206,6 @@ def valid? return false if @type.to_s.length < 1 return false if @attributes.nil? return false if @effects.nil? - return false if @ledger_entries.nil? true end diff --git a/lib/talon_one/models/generate_campaign_description.rb b/lib/talon_one/models/generate_campaign_description.rb new file mode 100644 index 0000000..3d193a8 --- /dev/null +++ b/lib/talon_one/models/generate_campaign_description.rb @@ -0,0 +1,227 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class GenerateCampaignDescription + # ID of the campaign. + attr_accessor :campaign_id + + # Currency for the campaign. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'campaign_id' => :'campaignID', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'campaign_id' => :'Integer', + :'currency' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateCampaignDescription` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateCampaignDescription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'campaign_id') + self.campaign_id = attributes[:'campaign_id'] + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @campaign_id.nil? + return false if @currency.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + campaign_id == o.campaign_id && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [campaign_id, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/generate_campaign_tags.rb b/lib/talon_one/models/generate_campaign_tags.rb new file mode 100644 index 0000000..a578753 --- /dev/null +++ b/lib/talon_one/models/generate_campaign_tags.rb @@ -0,0 +1,212 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class GenerateCampaignTags + # ID of the campaign. + attr_accessor :campaign_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'campaign_id' => :'campaignID' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'campaign_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateCampaignTags` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateCampaignTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'campaign_id') + self.campaign_id = attributes[:'campaign_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @campaign_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + campaign_id == o.campaign_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [campaign_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/generate_item_filter_description.rb b/lib/talon_one/models/generate_item_filter_description.rb new file mode 100644 index 0000000..d459606 --- /dev/null +++ b/lib/talon_one/models/generate_item_filter_description.rb @@ -0,0 +1,214 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class GenerateItemFilterDescription + # An array of item filter Talang expressions. + attr_accessor :item_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'item_filter' => :'itemFilter' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'item_filter' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateItemFilterDescription` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateItemFilterDescription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'item_filter') + if (value = attributes[:'item_filter']).is_a?(Array) + self.item_filter = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @item_filter.nil? + invalid_properties.push('invalid value for "item_filter", item_filter cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @item_filter.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + item_filter == o.item_filter + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [item_filter].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/generate_loyalty_card.rb b/lib/talon_one/models/generate_loyalty_card.rb new file mode 100644 index 0000000..0359562 --- /dev/null +++ b/lib/talon_one/models/generate_loyalty_card.rb @@ -0,0 +1,256 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # The parameters necessary to generate a loyalty card. + class GenerateLoyaltyCard + # Status of the loyalty card. + attr_accessor :status + + # Integration IDs of the customer profiles linked to the card. + attr_accessor :customer_profile_ids + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'customer_profile_ids' => :'customerProfileIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'customer_profile_ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateLoyaltyCard` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateLoyaltyCard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = 'active' + end + + if attributes.key?(:'customer_profile_ids') + if (value = attributes[:'customer_profile_ids']).is_a?(Array) + self.customer_profile_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ["active", "inactive"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["active", "inactive"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + customer_profile_ids == o.customer_profile_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, customer_profile_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/generate_rule_title.rb b/lib/talon_one/models/generate_rule_title.rb new file mode 100644 index 0000000..b16f305 --- /dev/null +++ b/lib/talon_one/models/generate_rule_title.rb @@ -0,0 +1,226 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class GenerateRuleTitle + attr_accessor :rule + + # Currency for the campaign. + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rule' => :'rule', + :'currency' => :'currency' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'rule' => :'GenerateRuleTitleRule', + :'currency' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateRuleTitle` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateRuleTitle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rule') + self.rule = attributes[:'rule'] + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @rule.nil? + invalid_properties.push('invalid value for "rule", rule cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @rule.nil? + return false if @currency.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rule == o.rule && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rule, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/generate_rule_title_rule.rb b/lib/talon_one/models/generate_rule_title_rule.rb new file mode 100644 index 0000000..d5f13e0 --- /dev/null +++ b/lib/talon_one/models/generate_rule_title_rule.rb @@ -0,0 +1,221 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class GenerateRuleTitleRule + # An array of effectful Talang expressions in arrays that will be evaluated when a rule matches. + attr_accessor :effects + + # A Talang expression that will be evaluated in the context of the given event. + attr_accessor :condition + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'effects' => :'effects', + :'condition' => :'condition' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'effects' => :'Array', + :'condition' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::GenerateRuleTitleRule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::GenerateRuleTitleRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'effects') + if (value = attributes[:'effects']).is_a?(Array) + self.effects = value + end + end + + if attributes.key?(:'condition') + if (value = attributes[:'condition']).is_a?(Array) + self.condition = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + effects == o.effects && + condition == o.condition + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [effects, condition].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/increase_achievement_progress_effect_props.rb b/lib/talon_one/models/increase_achievement_progress_effect_props.rb index ef53cc5..a714951 100644 --- a/lib/talon_one/models/increase_achievement_progress_effect_props.rb +++ b/lib/talon_one/models/increase_achievement_progress_effect_props.rb @@ -30,7 +30,7 @@ class IncreaseAchievementProgressEffectProps # The current progress of the customer in the achievement. attr_accessor :value - # The required number of actions or the transactional milestone to complete the achievement. + # The target value to complete the achievement. attr_accessor :target # Indicates if the customer has completed the achievement in the current session. diff --git a/lib/talon_one/models/integration_coupon.rb b/lib/talon_one/models/integration_coupon.rb index bdb7457..d22207b 100644 --- a/lib/talon_one/models/integration_coupon.rb +++ b/lib/talon_one/models/integration_coupon.rb @@ -39,7 +39,7 @@ class IntegrationCoupon # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. diff --git a/lib/talon_one/models/inventory_coupon.rb b/lib/talon_one/models/inventory_coupon.rb index bb77075..7e90b48 100644 --- a/lib/talon_one/models/inventory_coupon.rb +++ b/lib/talon_one/models/inventory_coupon.rb @@ -39,7 +39,7 @@ class InventoryCoupon # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. diff --git a/lib/talon_one/models/inventory_referral.rb b/lib/talon_one/models/inventory_referral.rb index 1b04b43..bb2f511 100644 --- a/lib/talon_one/models/inventory_referral.rb +++ b/lib/talon_one/models/inventory_referral.rb @@ -24,7 +24,7 @@ class InventoryReferral # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/loyalty_balance_with_tier.rb b/lib/talon_one/models/loyalty_balance_with_tier.rb new file mode 100644 index 0000000..0171468 --- /dev/null +++ b/lib/talon_one/models/loyalty_balance_with_tier.rb @@ -0,0 +1,276 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class LoyaltyBalanceWithTier + # Total amount of points awarded to this customer and available to spend. + attr_accessor :active_points + + # Total amount of points awarded to this customer but not available until their start date. + attr_accessor :pending_points + + # Total amount of points already spent by this customer. + attr_accessor :spent_points + + # Total amount of points awarded but never redeemed. They cannot be used anymore. + attr_accessor :expired_points + + attr_accessor :current_tier + + attr_accessor :projected_tier + + # The number of points required to move up a tier. + attr_accessor :points_to_next_tier + + # The name of the tier consecutive to the current tier. + attr_accessor :next_tier_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'active_points' => :'activePoints', + :'pending_points' => :'pendingPoints', + :'spent_points' => :'spentPoints', + :'expired_points' => :'expiredPoints', + :'current_tier' => :'currentTier', + :'projected_tier' => :'projectedTier', + :'points_to_next_tier' => :'pointsToNextTier', + :'next_tier_name' => :'nextTierName' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'active_points' => :'Float', + :'pending_points' => :'Float', + :'spent_points' => :'Float', + :'expired_points' => :'Float', + :'current_tier' => :'Tier', + :'projected_tier' => :'ProjectedTier', + :'points_to_next_tier' => :'Float', + :'next_tier_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyBalanceWithTier` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyBalanceWithTier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'active_points') + self.active_points = attributes[:'active_points'] + end + + if attributes.key?(:'pending_points') + self.pending_points = attributes[:'pending_points'] + end + + if attributes.key?(:'spent_points') + self.spent_points = attributes[:'spent_points'] + end + + if attributes.key?(:'expired_points') + self.expired_points = attributes[:'expired_points'] + end + + if attributes.key?(:'current_tier') + self.current_tier = attributes[:'current_tier'] + end + + if attributes.key?(:'projected_tier') + self.projected_tier = attributes[:'projected_tier'] + end + + if attributes.key?(:'points_to_next_tier') + self.points_to_next_tier = attributes[:'points_to_next_tier'] + end + + if attributes.key?(:'next_tier_name') + self.next_tier_name = attributes[:'next_tier_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + active_points == o.active_points && + pending_points == o.pending_points && + spent_points == o.spent_points && + expired_points == o.expired_points && + current_tier == o.current_tier && + projected_tier == o.projected_tier && + points_to_next_tier == o.points_to_next_tier && + next_tier_name == o.next_tier_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [active_points, pending_points, spent_points, expired_points, current_tier, projected_tier, points_to_next_tier, next_tier_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/loyalty_balances_with_tiers.rb b/lib/talon_one/models/loyalty_balances_with_tiers.rb new file mode 100644 index 0000000..9554550 --- /dev/null +++ b/lib/talon_one/models/loyalty_balances_with_tiers.rb @@ -0,0 +1,219 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # List of loyalty balances for a ledger and its subledgers. + class LoyaltyBalancesWithTiers + attr_accessor :balance + + # Map of the loyalty balances of the subledgers of a ledger. + attr_accessor :subledger_balances + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'balance' => :'balance', + :'subledger_balances' => :'subledgerBalances' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'balance' => :'LoyaltyBalanceWithTier', + :'subledger_balances' => :'Hash' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyBalancesWithTiers` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyBalancesWithTiers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'subledger_balances') + if (value = attributes[:'subledger_balances']).is_a?(Hash) + self.subledger_balances = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + balance == o.balance && + subledger_balances == o.subledger_balances + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [balance, subledger_balances].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/loyalty_card.rb b/lib/talon_one/models/loyalty_card.rb index 89d024a..64a8420 100644 --- a/lib/talon_one/models/loyalty_card.rb +++ b/lib/talon_one/models/loyalty_card.rb @@ -24,9 +24,12 @@ class LoyaltyCard # The ID of the loyalty program that owns this entity. attr_accessor :program_id - # Status of the loyalty card. Can be one of: ['active', 'inactive'] + # Status of the loyalty card. Can be `active` or `inactive`. attr_accessor :status + # Reason for transferring and blocking the loyalty card. + attr_accessor :block_reason + # The alphanumeric identifier of the loyalty card. attr_accessor :identifier @@ -50,6 +53,9 @@ class LoyaltyCard # The alphanumeric identifier of the loyalty card. attr_accessor :new_card_identifier + # The ID of the batch in which the loyalty card was created. + attr_accessor :batch_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -57,6 +63,7 @@ def self.attribute_map :'created' => :'created', :'program_id' => :'programID', :'status' => :'status', + :'block_reason' => :'blockReason', :'identifier' => :'identifier', :'users_per_card_limit' => :'usersPerCardLimit', :'profiles' => :'profiles', @@ -64,7 +71,8 @@ def self.attribute_map :'subledgers' => :'subledgers', :'modified' => :'modified', :'old_card_identifier' => :'oldCardIdentifier', - :'new_card_identifier' => :'newCardIdentifier' + :'new_card_identifier' => :'newCardIdentifier', + :'batch_id' => :'batchId' } end @@ -75,6 +83,7 @@ def self.openapi_types :'created' => :'DateTime', :'program_id' => :'Integer', :'status' => :'String', + :'block_reason' => :'String', :'identifier' => :'String', :'users_per_card_limit' => :'Integer', :'profiles' => :'Array', @@ -82,7 +91,8 @@ def self.openapi_types :'subledgers' => :'Hash', :'modified' => :'DateTime', :'old_card_identifier' => :'String', - :'new_card_identifier' => :'String' + :'new_card_identifier' => :'String', + :'batch_id' => :'String' } end @@ -123,6 +133,10 @@ def initialize(attributes = {}) self.status = attributes[:'status'] end + if attributes.key?(:'block_reason') + self.block_reason = attributes[:'block_reason'] + end + if attributes.key?(:'identifier') self.identifier = attributes[:'identifier'] end @@ -158,6 +172,10 @@ def initialize(attributes = {}) if attributes.key?(:'new_card_identifier') self.new_card_identifier = attributes[:'new_card_identifier'] end + + if attributes.key?(:'batch_id') + self.batch_id = attributes[:'batch_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -280,6 +298,7 @@ def ==(o) created == o.created && program_id == o.program_id && status == o.status && + block_reason == o.block_reason && identifier == o.identifier && users_per_card_limit == o.users_per_card_limit && profiles == o.profiles && @@ -287,7 +306,8 @@ def ==(o) subledgers == o.subledgers && modified == o.modified && old_card_identifier == o.old_card_identifier && - new_card_identifier == o.new_card_identifier + new_card_identifier == o.new_card_identifier && + batch_id == o.batch_id end # @see the `==` method @@ -299,7 +319,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, program_id, status, identifier, users_per_card_limit, profiles, ledger, subledgers, modified, old_card_identifier, new_card_identifier].hash + [id, created, program_id, status, block_reason, identifier, users_per_card_limit, profiles, ledger, subledgers, modified, old_card_identifier, new_card_identifier, batch_id].hash end # Builds the object from hash diff --git a/lib/talon_one/models/loyalty_card_batch.rb b/lib/talon_one/models/loyalty_card_batch.rb new file mode 100644 index 0000000..cf30751 --- /dev/null +++ b/lib/talon_one/models/loyalty_card_batch.rb @@ -0,0 +1,304 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class LoyaltyCardBatch + # Number of loyalty cards in the batch. + attr_accessor :number_of_cards + + # ID of the loyalty card batch. + attr_accessor :batch_id + + # Status of the loyalty cards in the batch. + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number_of_cards' => :'numberOfCards', + :'batch_id' => :'batchId', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'number_of_cards' => :'Integer', + :'batch_id' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyCardBatch` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyCardBatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number_of_cards') + self.number_of_cards = attributes[:'number_of_cards'] + end + + if attributes.key?(:'batch_id') + self.batch_id = attributes[:'batch_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = 'active' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @number_of_cards.nil? + invalid_properties.push('invalid value for "number_of_cards", number_of_cards cannot be nil.') + end + + if !@batch_id.nil? && @batch_id.to_s.length > 20 + invalid_properties.push('invalid value for "batch_id", the character length must be smaller than or equal to 20.') + end + + if !@batch_id.nil? && @batch_id.to_s.length < 4 + invalid_properties.push('invalid value for "batch_id", the character length must be great than or equal to 4.') + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if !@batch_id.nil? && @batch_id !~ pattern + invalid_properties.push("invalid value for \"batch_id\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @number_of_cards.nil? + return false if !@batch_id.nil? && @batch_id.to_s.length > 20 + return false if !@batch_id.nil? && @batch_id.to_s.length < 4 + return false if !@batch_id.nil? && @batch_id !~ Regexp.new(/^[A-Za-z0-9_-]*$/) + status_validator = EnumAttributeValidator.new('String', ["active", "inactive"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] batch_id Value to be assigned + def batch_id=(batch_id) + if !batch_id.nil? && batch_id.to_s.length > 20 + fail ArgumentError, 'invalid value for "batch_id", the character length must be smaller than or equal to 20.' + end + + if !batch_id.nil? && batch_id.to_s.length < 4 + fail ArgumentError, 'invalid value for "batch_id", the character length must be great than or equal to 4.' + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if !batch_id.nil? && batch_id !~ pattern + fail ArgumentError, "invalid value for \"batch_id\", must conform to the pattern #{pattern}." + end + + @batch_id = batch_id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["active", "inactive"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number_of_cards == o.number_of_cards && + batch_id == o.batch_id && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [number_of_cards, batch_id, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/loyalty_card_batch_response.rb b/lib/talon_one/models/loyalty_card_batch_response.rb new file mode 100644 index 0000000..3418d8d --- /dev/null +++ b/lib/talon_one/models/loyalty_card_batch_response.rb @@ -0,0 +1,227 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class LoyaltyCardBatchResponse + # Number of loyalty cards in the batch. + attr_accessor :number_of_cards_generated + + # ID of the loyalty card batch. + attr_accessor :batch_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number_of_cards_generated' => :'numberOfCardsGenerated', + :'batch_id' => :'batchId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'number_of_cards_generated' => :'Integer', + :'batch_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyCardBatchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyCardBatchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number_of_cards_generated') + self.number_of_cards_generated = attributes[:'number_of_cards_generated'] + end + + if attributes.key?(:'batch_id') + self.batch_id = attributes[:'batch_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @number_of_cards_generated.nil? + invalid_properties.push('invalid value for "number_of_cards_generated", number_of_cards_generated cannot be nil.') + end + + if @batch_id.nil? + invalid_properties.push('invalid value for "batch_id", batch_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @number_of_cards_generated.nil? + return false if @batch_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number_of_cards_generated == o.number_of_cards_generated && + batch_id == o.batch_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [number_of_cards_generated, batch_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/loyalty_program.rb b/lib/talon_one/models/loyalty_program.rb index bcc2952..7de465a 100644 --- a/lib/talon_one/models/loyalty_program.rb +++ b/lib/talon_one/models/loyalty_program.rb @@ -45,17 +45,22 @@ class LoyaltyProgram # Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. attr_accessor :sandbox - # The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + attr_accessor :program_join_policy + + # The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. attr_accessor :tiers_expiration_policy - # The amount of time after which the tier expires. 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. + # Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. + attr_accessor :tier_cycle_start_date + + # The amount of time after which the tier expires and is reevaluated. 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. attr_accessor :tiers_expire_in - # Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + # The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. attr_accessor :tiers_downgrade_policy - # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. - attr_accessor :program_join_policy + attr_accessor :card_code_settings # The ID of the Talon.One account that owns this program. attr_accessor :account_id @@ -75,12 +80,18 @@ class LoyaltyProgram # `True` if the tier definitions can be updated. attr_accessor :can_update_tiers - # Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`. + # `True` if the program join policy can be updated. attr_accessor :can_update_join_policy + # `True` if the tier expiration policy can be updated. + attr_accessor :can_update_tier_expiration_policy + # `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. attr_accessor :can_upgrade_to_advanced_tiers + # `True` if the `allowSubledger` property can be updated in the loyalty program. + attr_accessor :can_update_subledgers + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -116,10 +127,12 @@ def self.attribute_map :'allow_subledger' => :'allowSubledger', :'users_per_card_limit' => :'usersPerCardLimit', :'sandbox' => :'sandbox', + :'program_join_policy' => :'programJoinPolicy', :'tiers_expiration_policy' => :'tiersExpirationPolicy', + :'tier_cycle_start_date' => :'tierCycleStartDate', :'tiers_expire_in' => :'tiersExpireIn', :'tiers_downgrade_policy' => :'tiersDowngradePolicy', - :'program_join_policy' => :'programJoinPolicy', + :'card_code_settings' => :'cardCodeSettings', :'account_id' => :'accountID', :'name' => :'name', :'tiers' => :'tiers', @@ -127,7 +140,9 @@ def self.attribute_map :'card_based' => :'cardBased', :'can_update_tiers' => :'canUpdateTiers', :'can_update_join_policy' => :'canUpdateJoinPolicy', - :'can_upgrade_to_advanced_tiers' => :'canUpgradeToAdvancedTiers' + :'can_update_tier_expiration_policy' => :'canUpdateTierExpirationPolicy', + :'can_upgrade_to_advanced_tiers' => :'canUpgradeToAdvancedTiers', + :'can_update_subledgers' => :'canUpdateSubledgers' } end @@ -144,10 +159,12 @@ def self.openapi_types :'allow_subledger' => :'Boolean', :'users_per_card_limit' => :'Integer', :'sandbox' => :'Boolean', + :'program_join_policy' => :'String', :'tiers_expiration_policy' => :'String', + :'tier_cycle_start_date' => :'DateTime', :'tiers_expire_in' => :'String', :'tiers_downgrade_policy' => :'String', - :'program_join_policy' => :'String', + :'card_code_settings' => :'CodeGeneratorSettings', :'account_id' => :'Integer', :'name' => :'String', :'tiers' => :'Array', @@ -155,7 +172,9 @@ def self.openapi_types :'card_based' => :'Boolean', :'can_update_tiers' => :'Boolean', :'can_update_join_policy' => :'Boolean', - :'can_upgrade_to_advanced_tiers' => :'Boolean' + :'can_update_tier_expiration_policy' => :'Boolean', + :'can_upgrade_to_advanced_tiers' => :'Boolean', + :'can_update_subledgers' => :'Boolean' } end @@ -222,10 +241,18 @@ def initialize(attributes = {}) self.sandbox = attributes[:'sandbox'] end + if attributes.key?(:'program_join_policy') + self.program_join_policy = attributes[:'program_join_policy'] + end + if attributes.key?(:'tiers_expiration_policy') self.tiers_expiration_policy = attributes[:'tiers_expiration_policy'] end + if attributes.key?(:'tier_cycle_start_date') + self.tier_cycle_start_date = attributes[:'tier_cycle_start_date'] + end + if attributes.key?(:'tiers_expire_in') self.tiers_expire_in = attributes[:'tiers_expire_in'] end @@ -234,8 +261,8 @@ def initialize(attributes = {}) self.tiers_downgrade_policy = attributes[:'tiers_downgrade_policy'] end - if attributes.key?(:'program_join_policy') - self.program_join_policy = attributes[:'program_join_policy'] + if attributes.key?(:'card_code_settings') + self.card_code_settings = attributes[:'card_code_settings'] end if attributes.key?(:'account_id') @@ -272,11 +299,21 @@ def initialize(attributes = {}) self.can_update_join_policy = attributes[:'can_update_join_policy'] end + if attributes.key?(:'can_update_tier_expiration_policy') + self.can_update_tier_expiration_policy = attributes[:'can_update_tier_expiration_policy'] + end + if attributes.key?(:'can_upgrade_to_advanced_tiers') self.can_upgrade_to_advanced_tiers = attributes[:'can_upgrade_to_advanced_tiers'] else self.can_upgrade_to_advanced_tiers = false end + + if attributes.key?(:'can_update_subledgers') + self.can_update_subledgers = attributes[:'can_update_subledgers'] + else + self.can_update_subledgers = false + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -359,12 +396,12 @@ def valid? return false if @allow_subledger.nil? return false if !@users_per_card_limit.nil? && @users_per_card_limit < 0 return false if @sandbox.nil? - tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + return false unless program_join_policy_validator.valid?(@program_join_policy) + tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy) tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"]) return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy) - program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - return false unless program_join_policy_validator.valid?(@program_join_policy) return false if @account_id.nil? return false if @name.nil? return false if @timezone.nil? @@ -383,10 +420,20 @@ def users_per_card_limit=(users_per_card_limit) @users_per_card_limit = users_per_card_limit end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] program_join_policy Object to be assigned + def program_join_policy=(program_join_policy) + validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + unless validator.valid?(program_join_policy) + fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." + end + @program_join_policy = program_join_policy + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] tiers_expiration_policy Object to be assigned def tiers_expiration_policy=(tiers_expiration_policy) - validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) unless validator.valid?(tiers_expiration_policy) fail ArgumentError, "invalid value for \"tiers_expiration_policy\", must be one of #{validator.allowable_values}." end @@ -403,16 +450,6 @@ def tiers_downgrade_policy=(tiers_downgrade_policy) @tiers_downgrade_policy = tiers_downgrade_policy end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] program_join_policy Object to be assigned - def program_join_policy=(program_join_policy) - validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - unless validator.valid?(program_join_policy) - fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." - end - @program_join_policy = program_join_policy - end - # Custom attribute writer method with validation # @param [Object] timezone Value to be assigned def timezone=(timezone) @@ -442,10 +479,12 @@ def ==(o) allow_subledger == o.allow_subledger && users_per_card_limit == o.users_per_card_limit && sandbox == o.sandbox && + program_join_policy == o.program_join_policy && tiers_expiration_policy == o.tiers_expiration_policy && + tier_cycle_start_date == o.tier_cycle_start_date && tiers_expire_in == o.tiers_expire_in && tiers_downgrade_policy == o.tiers_downgrade_policy && - program_join_policy == o.program_join_policy && + card_code_settings == o.card_code_settings && account_id == o.account_id && name == o.name && tiers == o.tiers && @@ -453,7 +492,9 @@ def ==(o) card_based == o.card_based && can_update_tiers == o.can_update_tiers && can_update_join_policy == o.can_update_join_policy && - can_upgrade_to_advanced_tiers == o.can_upgrade_to_advanced_tiers + can_update_tier_expiration_policy == o.can_update_tier_expiration_policy && + can_upgrade_to_advanced_tiers == o.can_upgrade_to_advanced_tiers && + can_update_subledgers == o.can_update_subledgers end # @see the `==` method @@ -465,7 +506,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, tiers_expiration_policy, tiers_expire_in, tiers_downgrade_policy, program_join_policy, account_id, name, tiers, timezone, card_based, can_update_tiers, can_update_join_policy, can_upgrade_to_advanced_tiers].hash + [id, created, title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, program_join_policy, tiers_expiration_policy, tier_cycle_start_date, tiers_expire_in, tiers_downgrade_policy, card_code_settings, account_id, name, tiers, timezone, card_based, can_update_tiers, can_update_join_policy, can_update_tier_expiration_policy, can_upgrade_to_advanced_tiers, can_update_subledgers].hash end # Builds the object from hash diff --git a/lib/talon_one/models/message_log_response.rb b/lib/talon_one/models/message_log_response.rb index 832f6de..d36db8b 100644 --- a/lib/talon_one/models/message_log_response.rb +++ b/lib/talon_one/models/message_log_response.rb @@ -80,45 +80,26 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @created_at.nil? - invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') - end - - if @response.nil? - invalid_properties.push('invalid value for "response", response cannot be nil.') - end - pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) - if @response !~ pattern + if !@response.nil? && @response !~ pattern invalid_properties.push("invalid value for \"response\", must conform to the pattern #{pattern}.") end - if @status.nil? - invalid_properties.push('invalid value for "status", status cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @created_at.nil? - return false if @response.nil? - return false if @response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) - return false if @status.nil? + return false if !@response.nil? && @response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) true end # Custom attribute writer method with validation # @param [Object] response Value to be assigned def response=(response) - if response.nil? - fail ArgumentError, 'response cannot be nil' - end - pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) - if response !~ pattern + if !response.nil? && response !~ pattern fail ArgumentError, "invalid value for \"response\", must conform to the pattern #{pattern}." end diff --git a/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb b/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb new file mode 100644 index 0000000..dd6d64a --- /dev/null +++ b/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb @@ -0,0 +1,227 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class NewAppWideCouponDeletionJob + attr_accessor :filters + + attr_accessor :campaignids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filters' => :'filters', + :'campaignids' => :'campaignids' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'filters' => :'CouponDeletionFilters', + :'campaignids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewAppWideCouponDeletionJob` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewAppWideCouponDeletionJob`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'campaignids') + if (value = attributes[:'campaignids']).is_a?(Array) + self.campaignids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @filters.nil? + invalid_properties.push('invalid value for "filters", filters cannot be nil.') + end + + if @campaignids.nil? + invalid_properties.push('invalid value for "campaignids", campaignids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @filters.nil? + return false if @campaignids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filters == o.filters && + campaignids == o.campaignids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filters, campaignids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/new_application.rb b/lib/talon_one/models/new_application.rb index 99b7036..b396dbc 100644 --- a/lib/talon_one/models/new_application.rb +++ b/lib/talon_one/models/new_application.rb @@ -58,6 +58,9 @@ class NewApplication # Hex key for HMAC-signing API calls as coming from this application (16 hex digits). attr_accessor :key + # Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. + attr_accessor :enable_campaign_state_management + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -97,7 +100,8 @@ def self.attribute_map :'sandbox' => :'sandbox', :'enable_partial_discounts' => :'enablePartialDiscounts', :'default_discount_additional_cost_per_item_scope' => :'defaultDiscountAdditionalCostPerItemScope', - :'key' => :'key' + :'key' => :'key', + :'enable_campaign_state_management' => :'enableCampaignStateManagement' } end @@ -118,7 +122,8 @@ def self.openapi_types :'sandbox' => :'Boolean', :'enable_partial_discounts' => :'Boolean', :'default_discount_additional_cost_per_item_scope' => :'String', - :'key' => :'String' + :'key' => :'String', + :'enable_campaign_state_management' => :'Boolean' } end @@ -204,6 +209,10 @@ def initialize(attributes = {}) if attributes.key?(:'key') self.key = attributes[:'key'] end + + if attributes.key?(:'enable_campaign_state_management') + self.enable_campaign_state_management = attributes[:'enable_campaign_state_management'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -363,7 +372,8 @@ def ==(o) sandbox == o.sandbox && enable_partial_discounts == o.enable_partial_discounts && default_discount_additional_cost_per_item_scope == o.default_discount_additional_cost_per_item_scope && - key == o.key + key == o.key && + enable_campaign_state_management == o.enable_campaign_state_management end # @see the `==` method @@ -375,7 +385,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, key].hash + [name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, key, enable_campaign_state_management].hash end # Builds the object from hash diff --git a/lib/talon_one/models/new_application_cif.rb b/lib/talon_one/models/new_application_cif.rb new file mode 100644 index 0000000..1ee81a7 --- /dev/null +++ b/lib/talon_one/models/new_application_cif.rb @@ -0,0 +1,262 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class NewApplicationCIF + # The name of the Application cart item filter used in API requests. + attr_accessor :name + + # A short description of the Application cart item filter. + attr_accessor :description + + # The ID of the expression that the Application cart item filter uses. + attr_accessor :active_expression_id + + # The ID of the user who last updated the Application cart item filter. + attr_accessor :modified_by + + # The ID of the user who created the Application cart item filter. + attr_accessor :created_by + + # Timestamp of the most recent update to the Application cart item filter. + attr_accessor :modified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'description' => :'description', + :'active_expression_id' => :'activeExpressionId', + :'modified_by' => :'modifiedBy', + :'created_by' => :'createdBy', + :'modified' => :'modified' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'description' => :'String', + :'active_expression_id' => :'Integer', + :'modified_by' => :'Integer', + :'created_by' => :'Integer', + :'modified' => :'DateTime' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewApplicationCIF` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewApplicationCIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'active_expression_id') + self.active_expression_id = attributes[:'active_expression_id'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + description == o.description && + active_expression_id == o.active_expression_id && + modified_by == o.modified_by && + created_by == o.created_by && + modified == o.modified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description, active_expression_id, modified_by, created_by, modified].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/new_application_cif_expression.rb b/lib/talon_one/models/new_application_cif_expression.rb new file mode 100644 index 0000000..1702cea --- /dev/null +++ b/lib/talon_one/models/new_application_cif_expression.rb @@ -0,0 +1,229 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class NewApplicationCIFExpression + # The ID of the Application cart item filter. + attr_accessor :cart_item_filter_id + + # The ID of the user who created the Application cart item filter. + attr_accessor :created_by + + # Arbitrary additional JSON data associated with the Application cart item filter. + attr_accessor :expression + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cart_item_filter_id' => :'cartItemFilterId', + :'created_by' => :'createdBy', + :'expression' => :'expression' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'cart_item_filter_id' => :'Integer', + :'created_by' => :'Integer', + :'expression' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewApplicationCIFExpression` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewApplicationCIFExpression`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cart_item_filter_id') + self.cart_item_filter_id = attributes[:'cart_item_filter_id'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'expression') + if (value = attributes[:'expression']).is_a?(Array) + self.expression = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cart_item_filter_id == o.cart_item_filter_id && + created_by == o.created_by && + expression == o.expression + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cart_item_filter_id, created_by, expression].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/new_attribute.rb b/lib/talon_one/models/new_attribute.rb index 05e8585..8e68e5f 100644 --- a/lib/talon_one/models/new_attribute.rb +++ b/lib/talon_one/models/new_attribute.rb @@ -248,7 +248,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @entity.nil? - entity_validator = EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + entity_validator = EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) return false unless entity_validator.valid?(@entity) return false if @name.nil? return false if @name !~ Regexp.new(/^[A-Za-z]\w*$/) @@ -266,7 +266,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] entity Object to be assigned def entity=(entity) - validator = EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + validator = EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) unless validator.valid?(entity) fail ArgumentError, "invalid value for \"entity\", must be one of #{validator.allowable_values}." end diff --git a/lib/talon_one/models/new_base_notification.rb b/lib/talon_one/models/new_base_notification.rb index 1ff3a54..5f95103 100644 --- a/lib/talon_one/models/new_base_notification.rb +++ b/lib/talon_one/models/new_base_notification.rb @@ -15,6 +15,7 @@ module TalonOne # class NewBaseNotification + # Indicates which notification properties to apply. attr_accessor :policy # Indicates whether the notification is activated. diff --git a/lib/talon_one/models/new_coupon_creation_job.rb b/lib/talon_one/models/new_coupon_creation_job.rb index baf97ec..cffb09c 100644 --- a/lib/talon_one/models/new_coupon_creation_job.rb +++ b/lib/talon_one/models/new_coupon_creation_job.rb @@ -27,7 +27,7 @@ class NewCouponCreationJob # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # The number of new coupon codes to generate for the campaign. diff --git a/lib/talon_one/models/new_coupon_deletion_job.rb b/lib/talon_one/models/new_coupon_deletion_job.rb new file mode 100644 index 0000000..eddf610 --- /dev/null +++ b/lib/talon_one/models/new_coupon_deletion_job.rb @@ -0,0 +1,211 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class NewCouponDeletionJob + attr_accessor :filters + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filters' => :'filters' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'filters' => :'CouponDeletionFilters' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewCouponDeletionJob` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewCouponDeletionJob`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @filters.nil? + invalid_properties.push('invalid value for "filters", filters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @filters.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filters == o.filters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/new_coupons.rb b/lib/talon_one/models/new_coupons.rb index 485ab91..90f9757 100644 --- a/lib/talon_one/models/new_coupons.rb +++ b/lib/talon_one/models/new_coupons.rb @@ -27,7 +27,7 @@ class NewCoupons # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. diff --git a/lib/talon_one/models/new_coupons_for_multiple_recipients.rb b/lib/talon_one/models/new_coupons_for_multiple_recipients.rb index 80ea3e1..154728f 100644 --- a/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +++ b/lib/talon_one/models/new_coupons_for_multiple_recipients.rb @@ -27,7 +27,7 @@ class NewCouponsForMultipleRecipients # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Arbitrary properties associated with this item. diff --git a/lib/talon_one/models/new_customer_session_v2.rb b/lib/talon_one/models/new_customer_session_v2.rb index 3c8f0b1..e6ae858 100644 --- a/lib/talon_one/models/new_customer_session_v2.rb +++ b/lib/talon_one/models/new_customer_session_v2.rb @@ -24,10 +24,10 @@ class NewCustomerSessionV2 # When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. attr_accessor :evaluable_campaign_ids - # Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. + # Any coupon codes entered. **Important - for requests only**: - If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. - In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `\"couponCodes\": null` or omit the parameter entirely. attr_accessor :coupon_codes - # Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. + # Any referral code entered. **Important - for requests only**: - If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. - In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `\"referralCode\": null` or omit the parameter entirely. attr_accessor :referral_code # Identifier of a loyalty card. diff --git a/lib/talon_one/models/new_loyalty_program.rb b/lib/talon_one/models/new_loyalty_program.rb index 047e86b..5243347 100644 --- a/lib/talon_one/models/new_loyalty_program.rb +++ b/lib/talon_one/models/new_loyalty_program.rb @@ -39,17 +39,22 @@ class NewLoyaltyProgram # Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. attr_accessor :sandbox - # The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + attr_accessor :program_join_policy + + # The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. attr_accessor :tiers_expiration_policy - # The amount of time after which the tier expires. 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. + # Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. + attr_accessor :tier_cycle_start_date + + # The amount of time after which the tier expires and is reevaluated. 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. attr_accessor :tiers_expire_in - # Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + # The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. attr_accessor :tiers_downgrade_policy - # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. - attr_accessor :program_join_policy + attr_accessor :card_code_settings # The internal name for the Loyalty Program. This is an immutable value. attr_accessor :name @@ -96,10 +101,12 @@ def self.attribute_map :'allow_subledger' => :'allowSubledger', :'users_per_card_limit' => :'usersPerCardLimit', :'sandbox' => :'sandbox', + :'program_join_policy' => :'programJoinPolicy', :'tiers_expiration_policy' => :'tiersExpirationPolicy', + :'tier_cycle_start_date' => :'tierCycleStartDate', :'tiers_expire_in' => :'tiersExpireIn', :'tiers_downgrade_policy' => :'tiersDowngradePolicy', - :'program_join_policy' => :'programJoinPolicy', + :'card_code_settings' => :'cardCodeSettings', :'name' => :'name', :'tiers' => :'tiers', :'timezone' => :'timezone', @@ -118,10 +125,12 @@ def self.openapi_types :'allow_subledger' => :'Boolean', :'users_per_card_limit' => :'Integer', :'sandbox' => :'Boolean', + :'program_join_policy' => :'String', :'tiers_expiration_policy' => :'String', + :'tier_cycle_start_date' => :'DateTime', :'tiers_expire_in' => :'String', :'tiers_downgrade_policy' => :'String', - :'program_join_policy' => :'String', + :'card_code_settings' => :'CodeGeneratorSettings', :'name' => :'String', :'tiers' => :'Array', :'timezone' => :'String', @@ -184,10 +193,18 @@ def initialize(attributes = {}) self.sandbox = attributes[:'sandbox'] end + if attributes.key?(:'program_join_policy') + self.program_join_policy = attributes[:'program_join_policy'] + end + if attributes.key?(:'tiers_expiration_policy') self.tiers_expiration_policy = attributes[:'tiers_expiration_policy'] end + if attributes.key?(:'tier_cycle_start_date') + self.tier_cycle_start_date = attributes[:'tier_cycle_start_date'] + end + if attributes.key?(:'tiers_expire_in') self.tiers_expire_in = attributes[:'tiers_expire_in'] end @@ -196,8 +213,8 @@ def initialize(attributes = {}) self.tiers_downgrade_policy = attributes[:'tiers_downgrade_policy'] end - if attributes.key?(:'program_join_policy') - self.program_join_policy = attributes[:'program_join_policy'] + if attributes.key?(:'card_code_settings') + self.card_code_settings = attributes[:'card_code_settings'] end if attributes.key?(:'name') @@ -277,12 +294,12 @@ def valid? return false if @allow_subledger.nil? return false if !@users_per_card_limit.nil? && @users_per_card_limit < 0 return false if @sandbox.nil? - tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + return false unless program_join_policy_validator.valid?(@program_join_policy) + tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy) tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"]) return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy) - program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - return false unless program_join_policy_validator.valid?(@program_join_policy) return false if @name.nil? return false if @timezone.nil? return false if @timezone.to_s.length < 1 @@ -300,10 +317,20 @@ def users_per_card_limit=(users_per_card_limit) @users_per_card_limit = users_per_card_limit end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] program_join_policy Object to be assigned + def program_join_policy=(program_join_policy) + validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + unless validator.valid?(program_join_policy) + fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." + end + @program_join_policy = program_join_policy + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] tiers_expiration_policy Object to be assigned def tiers_expiration_policy=(tiers_expiration_policy) - validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) unless validator.valid?(tiers_expiration_policy) fail ArgumentError, "invalid value for \"tiers_expiration_policy\", must be one of #{validator.allowable_values}." end @@ -320,16 +347,6 @@ def tiers_downgrade_policy=(tiers_downgrade_policy) @tiers_downgrade_policy = tiers_downgrade_policy end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] program_join_policy Object to be assigned - def program_join_policy=(program_join_policy) - validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - unless validator.valid?(program_join_policy) - fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." - end - @program_join_policy = program_join_policy - end - # Custom attribute writer method with validation # @param [Object] timezone Value to be assigned def timezone=(timezone) @@ -357,10 +374,12 @@ def ==(o) allow_subledger == o.allow_subledger && users_per_card_limit == o.users_per_card_limit && sandbox == o.sandbox && + program_join_policy == o.program_join_policy && tiers_expiration_policy == o.tiers_expiration_policy && + tier_cycle_start_date == o.tier_cycle_start_date && tiers_expire_in == o.tiers_expire_in && tiers_downgrade_policy == o.tiers_downgrade_policy && - program_join_policy == o.program_join_policy && + card_code_settings == o.card_code_settings && name == o.name && tiers == o.tiers && timezone == o.timezone && @@ -376,7 +395,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, tiers_expiration_policy, tiers_expire_in, tiers_downgrade_policy, program_join_policy, name, tiers, timezone, card_based].hash + [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, program_join_policy, tiers_expiration_policy, tier_cycle_start_date, tiers_expire_in, tiers_downgrade_policy, card_code_settings, name, tiers, timezone, card_based].hash end # Builds the object from hash diff --git a/lib/talon_one/models/new_notification_test.rb b/lib/talon_one/models/new_notification_test.rb index 352a580..e386519 100644 --- a/lib/talon_one/models/new_notification_test.rb +++ b/lib/talon_one/models/new_notification_test.rb @@ -155,7 +155,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) + type_validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) return false unless type_validator.valid?(@type) return false if @verb.nil? verb_validator = EnumAttributeValidator.new('String', ["POST", "PUT", "GET", "DELETE", "PATCH"]) @@ -168,7 +168,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) + validator = EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/talon_one/models/new_outgoing_integration_webhook.rb b/lib/talon_one/models/new_outgoing_integration_webhook.rb index e9e316e..7b3ee53 100644 --- a/lib/talon_one/models/new_outgoing_integration_webhook.rb +++ b/lib/talon_one/models/new_outgoing_integration_webhook.rb @@ -17,6 +17,9 @@ class NewOutgoingIntegrationWebhook # Webhook title. attr_accessor :title + # A description of the webhook. + attr_accessor :description + # IDs of the Applications to which a webhook must be linked. attr_accessor :application_ids @@ -24,6 +27,7 @@ class NewOutgoingIntegrationWebhook def self.attribute_map { :'title' => :'title', + :'description' => :'description', :'application_ids' => :'applicationIds' } end @@ -32,6 +36,7 @@ def self.attribute_map def self.openapi_types { :'title' => :'String', + :'description' => :'String', :'application_ids' => :'Array' } end @@ -61,6 +66,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'application_ids') if (value = attributes[:'application_ids']).is_a?(Array) self.application_ids = value @@ -97,6 +106,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && title == o.title && + description == o.description && application_ids == o.application_ids end @@ -109,7 +119,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [title, application_ids].hash + [title, description, application_ids].hash end # Builds the object from hash diff --git a/lib/talon_one/models/new_referral.rb b/lib/talon_one/models/new_referral.rb index 259a803..2cee822 100644 --- a/lib/talon_one/models/new_referral.rb +++ b/lib/talon_one/models/new_referral.rb @@ -18,7 +18,7 @@ class NewReferral # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/new_referrals_for_multiple_advocates.rb b/lib/talon_one/models/new_referrals_for_multiple_advocates.rb index 1ac64ac..cdea844 100644 --- a/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +++ b/lib/talon_one/models/new_referrals_for_multiple_advocates.rb @@ -18,7 +18,7 @@ class NewReferralsForMultipleAdvocates # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/new_revision_version.rb b/lib/talon_one/models/new_revision_version.rb new file mode 100644 index 0000000..55b987f --- /dev/null +++ b/lib/talon_one/models/new_revision_version.rb @@ -0,0 +1,352 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class NewRevisionVersion + # A user-facing name for this campaign. + attr_accessor :name + + # Timestamp when the campaign will become active. + attr_accessor :start_time + + # Timestamp when the campaign will become inactive. + attr_accessor :end_time + + # Arbitrary properties associated with this campaign. + attr_accessor :attributes + + # A detailed description of the campaign. + attr_accessor :description + + # The ID of the ruleset this campaign template will use. + attr_accessor :active_ruleset_id + + # A list of tags for the campaign template. + attr_accessor :tags + + attr_accessor :coupon_settings + + attr_accessor :referral_settings + + # The set of limits that will operate for this campaign version. + attr_accessor :limits + + # A list of features for the campaign template. + attr_accessor :features + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'start_time' => :'startTime', + :'end_time' => :'endTime', + :'attributes' => :'attributes', + :'description' => :'description', + :'active_ruleset_id' => :'activeRulesetId', + :'tags' => :'tags', + :'coupon_settings' => :'couponSettings', + :'referral_settings' => :'referralSettings', + :'limits' => :'limits', + :'features' => :'features' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'start_time' => :'DateTime', + :'end_time' => :'DateTime', + :'attributes' => :'Object', + :'description' => :'String', + :'active_ruleset_id' => :'Integer', + :'tags' => :'Array', + :'coupon_settings' => :'CodeGeneratorSettings', + :'referral_settings' => :'CodeGeneratorSettings', + :'limits' => :'Array', + :'features' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'start_time', + :'end_time', + :'description', + :'active_ruleset_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewRevisionVersion` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewRevisionVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + end + + if attributes.key?(:'end_time') + self.end_time = attributes[:'end_time'] + end + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'active_ruleset_id') + self.active_ruleset_id = attributes[:'active_ruleset_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'coupon_settings') + self.coupon_settings = attributes[:'coupon_settings'] + end + + if attributes.key?(:'referral_settings') + self.referral_settings = attributes[:'referral_settings'] + end + + if attributes.key?(:'limits') + if (value = attributes[:'limits']).is_a?(Array) + self.limits = value + end + end + + if attributes.key?(:'features') + if (value = attributes[:'features']).is_a?(Array) + self.features = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@name.nil? && @name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + start_time == o.start_time && + end_time == o.end_time && + attributes == o.attributes && + description == o.description && + active_ruleset_id == o.active_ruleset_id && + tags == o.tags && + coupon_settings == o.coupon_settings && + referral_settings == o.referral_settings && + limits == o.limits && + features == o.features + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, start_time, end_time, attributes, description, active_ruleset_id, tags, coupon_settings, referral_settings, limits, features].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/new_webhook.rb b/lib/talon_one/models/new_webhook.rb index 6f9b1d0..c669ce9 100644 --- a/lib/talon_one/models/new_webhook.rb +++ b/lib/talon_one/models/new_webhook.rb @@ -21,6 +21,9 @@ class NewWebhook # Name or title for this webhook. attr_accessor :title + # A description of the webhook. + attr_accessor :description + # API method for this webhook. attr_accessor :verb @@ -66,6 +69,7 @@ def self.attribute_map { :'application_ids' => :'applicationIds', :'title' => :'title', + :'description' => :'description', :'verb' => :'verb', :'url' => :'url', :'headers' => :'headers', @@ -80,6 +84,7 @@ def self.openapi_types { :'application_ids' => :'Array', :'title' => :'String', + :'description' => :'String', :'verb' => :'String', :'url' => :'String', :'headers' => :'Array', @@ -120,6 +125,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'verb') self.verb = attributes[:'verb'] end @@ -237,6 +246,7 @@ def ==(o) self.class == o.class && application_ids == o.application_ids && title == o.title && + description == o.description && verb == o.verb && url == o.url && headers == o.headers && @@ -254,7 +264,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [application_ids, title, verb, url, headers, payload, params, enabled].hash + [application_ids, title, description, verb, url, headers, payload, params, enabled].hash end # Builds the object from hash diff --git a/lib/talon_one/models/okta_event.rb b/lib/talon_one/models/okta_event.rb new file mode 100644 index 0000000..76de81c --- /dev/null +++ b/lib/talon_one/models/okta_event.rb @@ -0,0 +1,229 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Single event definition in the event data emitted by Okta. + class OktaEvent + # Event type defining an action. + attr_accessor :event_type + + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event_type' => :'eventType', + :'target' => :'target' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'event_type' => :'String', + :'target' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::OktaEvent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::OktaEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'event_type') + self.event_type = attributes[:'event_type'] + end + + if attributes.key?(:'target') + if (value = attributes[:'target']).is_a?(Array) + self.target = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @event_type.nil? + invalid_properties.push('invalid value for "event_type", event_type cannot be nil.') + end + + if @target.nil? + invalid_properties.push('invalid value for "target", target cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @event_type.nil? + return false if @target.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_type == o.event_type && + target == o.target + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [event_type, target].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/okta_event_payload.rb b/lib/talon_one/models/okta_event_payload.rb new file mode 100644 index 0000000..41fd7e0 --- /dev/null +++ b/lib/talon_one/models/okta_event_payload.rb @@ -0,0 +1,212 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Payload containing provisioning event details from Okta. + class OktaEventPayload + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'OktaEventPayloadData' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::OktaEventPayload` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::OktaEventPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @data.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/okta_event_payload_data.rb b/lib/talon_one/models/okta_event_payload_data.rb new file mode 100644 index 0000000..e75b457 --- /dev/null +++ b/lib/talon_one/models/okta_event_payload_data.rb @@ -0,0 +1,214 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Data part of the event emitted by Okta. + class OktaEventPayloadData + attr_accessor :events + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'events' => :'events' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'events' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::OktaEventPayloadData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::OktaEventPayloadData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @events.nil? + invalid_properties.push('invalid value for "events", events cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @events.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + events == o.events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/okta_event_target.rb b/lib/talon_one/models/okta_event_target.rb new file mode 100644 index 0000000..f865d2f --- /dev/null +++ b/lib/talon_one/models/okta_event_target.rb @@ -0,0 +1,243 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Target of the specific Okta event. + class OktaEventTarget + # Type of the event target. + attr_accessor :type + + # Identifier of the event target, depending on its type. + attr_accessor :alternate_id + + # Display name of the event target. + attr_accessor :display_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'alternate_id' => :'alternateId', + :'display_name' => :'displayName' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'alternate_id' => :'String', + :'display_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::OktaEventTarget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::OktaEventTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'alternate_id') + self.alternate_id = attributes[:'alternate_id'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @alternate_id.nil? + invalid_properties.push('invalid value for "alternate_id", alternate_id cannot be nil.') + end + + if @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + return false if @alternate_id.nil? + return false if @display_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + alternate_id == o.alternate_id && + display_name == o.display_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, alternate_id, display_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/projected_tier.rb b/lib/talon_one/models/projected_tier.rb new file mode 100644 index 0000000..1a816dd --- /dev/null +++ b/lib/talon_one/models/projected_tier.rb @@ -0,0 +1,232 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class ProjectedTier + # The active points of the customer when their current tier expires. + attr_accessor :projected_active_points + + # The number of points the customer needs to stay in the current tier. **Note**: This is included in the response when the customer is projected to be downgraded. + attr_accessor :stay_in_tier_points + + # The name of the tier the user will enter once their current tier expires. + attr_accessor :projected_tier_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'projected_active_points' => :'projectedActivePoints', + :'stay_in_tier_points' => :'stayInTierPoints', + :'projected_tier_name' => :'projectedTierName' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'projected_active_points' => :'Float', + :'stay_in_tier_points' => :'Float', + :'projected_tier_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ProjectedTier` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ProjectedTier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'projected_active_points') + self.projected_active_points = attributes[:'projected_active_points'] + end + + if attributes.key?(:'stay_in_tier_points') + self.stay_in_tier_points = attributes[:'stay_in_tier_points'] + end + + if attributes.key?(:'projected_tier_name') + self.projected_tier_name = attributes[:'projected_tier_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @projected_active_points.nil? + invalid_properties.push('invalid value for "projected_active_points", projected_active_points cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @projected_active_points.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + projected_active_points == o.projected_active_points && + stay_in_tier_points == o.stay_in_tier_points && + projected_tier_name == o.projected_tier_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [projected_active_points, stay_in_tier_points, projected_tier_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/referral.rb b/lib/talon_one/models/referral.rb index 2c472d1..09ed24b 100644 --- a/lib/talon_one/models/referral.rb +++ b/lib/talon_one/models/referral.rb @@ -24,7 +24,7 @@ class Referral # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/referral_constraints.rb b/lib/talon_one/models/referral_constraints.rb index 6985e17..f25f768 100644 --- a/lib/talon_one/models/referral_constraints.rb +++ b/lib/talon_one/models/referral_constraints.rb @@ -17,7 +17,7 @@ class ReferralConstraints # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/reject_coupon_effect_props.rb b/lib/talon_one/models/reject_coupon_effect_props.rb index fff1d05..7a439ae 100644 --- a/lib/talon_one/models/reject_coupon_effect_props.rb +++ b/lib/talon_one/models/reject_coupon_effect_props.rb @@ -30,6 +30,9 @@ class RejectCouponEffectProps # More details about the failure. attr_accessor :details + # The reason why the campaign was not applied. + attr_accessor :campaign_exclusion_reason + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +40,8 @@ def self.attribute_map :'rejection_reason' => :'rejectionReason', :'condition_index' => :'conditionIndex', :'effect_index' => :'effectIndex', - :'details' => :'details' + :'details' => :'details', + :'campaign_exclusion_reason' => :'campaignExclusionReason' } end @@ -48,7 +52,8 @@ def self.openapi_types :'rejection_reason' => :'String', :'condition_index' => :'Integer', :'effect_index' => :'Integer', - :'details' => :'String' + :'details' => :'String', + :'campaign_exclusion_reason' => :'String' } end @@ -92,6 +97,10 @@ def initialize(attributes = {}) if attributes.key?(:'details') self.details = attributes[:'details'] end + + if attributes.key?(:'campaign_exclusion_reason') + self.campaign_exclusion_reason = attributes[:'campaign_exclusion_reason'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -126,7 +135,8 @@ def ==(o) rejection_reason == o.rejection_reason && condition_index == o.condition_index && effect_index == o.effect_index && - details == o.details + details == o.details && + campaign_exclusion_reason == o.campaign_exclusion_reason end # @see the `==` method @@ -138,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [value, rejection_reason, condition_index, effect_index, details].hash + [value, rejection_reason, condition_index, effect_index, details, campaign_exclusion_reason].hash end # Builds the object from hash diff --git a/lib/talon_one/models/reject_referral_effect_props.rb b/lib/talon_one/models/reject_referral_effect_props.rb index e911947..5121a90 100644 --- a/lib/talon_one/models/reject_referral_effect_props.rb +++ b/lib/talon_one/models/reject_referral_effect_props.rb @@ -30,6 +30,9 @@ class RejectReferralEffectProps # More details about the failure. attr_accessor :details + # The reason why the campaign was not applied. + attr_accessor :campaign_exclusion_reason + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +40,8 @@ def self.attribute_map :'rejection_reason' => :'rejectionReason', :'condition_index' => :'conditionIndex', :'effect_index' => :'effectIndex', - :'details' => :'details' + :'details' => :'details', + :'campaign_exclusion_reason' => :'campaignExclusionReason' } end @@ -48,7 +52,8 @@ def self.openapi_types :'rejection_reason' => :'String', :'condition_index' => :'Integer', :'effect_index' => :'Integer', - :'details' => :'String' + :'details' => :'String', + :'campaign_exclusion_reason' => :'String' } end @@ -92,6 +97,10 @@ def initialize(attributes = {}) if attributes.key?(:'details') self.details = attributes[:'details'] end + + if attributes.key?(:'campaign_exclusion_reason') + self.campaign_exclusion_reason = attributes[:'campaign_exclusion_reason'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -126,7 +135,8 @@ def ==(o) rejection_reason == o.rejection_reason && condition_index == o.condition_index && effect_index == o.effect_index && - details == o.details + details == o.details && + campaign_exclusion_reason == o.campaign_exclusion_reason end # @see the `==` method @@ -138,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [value, rejection_reason, condition_index, effect_index, details].hash + [value, rejection_reason, condition_index, effect_index, details, campaign_exclusion_reason].hash end # Builds the object from hash diff --git a/lib/talon_one/models/revision.rb b/lib/talon_one/models/revision.rb new file mode 100644 index 0000000..e4094e5 --- /dev/null +++ b/lib/talon_one/models/revision.rb @@ -0,0 +1,319 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class Revision + # Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + attr_accessor :id + + attr_accessor :activate_at + + attr_accessor :account_id + + attr_accessor :application_id + + attr_accessor :campaign_id + + attr_accessor :created + + attr_accessor :created_by + + attr_accessor :activated_at + + attr_accessor :activated_by + + attr_accessor :current_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'activate_at' => :'activateAt', + :'account_id' => :'accountId', + :'application_id' => :'applicationId', + :'campaign_id' => :'campaignId', + :'created' => :'created', + :'created_by' => :'createdBy', + :'activated_at' => :'activatedAt', + :'activated_by' => :'activatedBy', + :'current_version' => :'currentVersion' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'activate_at' => :'DateTime', + :'account_id' => :'Integer', + :'application_id' => :'Integer', + :'campaign_id' => :'Integer', + :'created' => :'DateTime', + :'created_by' => :'Integer', + :'activated_at' => :'DateTime', + :'activated_by' => :'Integer', + :'current_version' => :'RevisionVersion' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::Revision` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::Revision`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'activate_at') + self.activate_at = attributes[:'activate_at'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'campaign_id') + self.campaign_id = attributes[:'campaign_id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'activated_at') + self.activated_at = attributes[:'activated_at'] + end + + if attributes.key?(:'activated_by') + self.activated_by = attributes[:'activated_by'] + end + + if attributes.key?(:'current_version') + self.current_version = attributes[:'current_version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @application_id.nil? + invalid_properties.push('invalid value for "application_id", application_id cannot be nil.') + end + + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @created_by.nil? + invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @account_id.nil? + return false if @application_id.nil? + return false if @campaign_id.nil? + return false if @created.nil? + return false if @created_by.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + activate_at == o.activate_at && + account_id == o.account_id && + application_id == o.application_id && + campaign_id == o.campaign_id && + created == o.created && + created_by == o.created_by && + activated_at == o.activated_at && + activated_by == o.activated_by && + current_version == o.current_version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, activate_at, account_id, application_id, campaign_id, created, created_by, activated_at, activated_by, current_version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/revision_activation.rb b/lib/talon_one/models/revision_activation.rb new file mode 100644 index 0000000..490efa2 --- /dev/null +++ b/lib/talon_one/models/revision_activation.rb @@ -0,0 +1,206 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class RevisionActivation + attr_accessor :activate_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'activate_at' => :'activateAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'activate_at' => :'DateTime' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::RevisionActivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::RevisionActivation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'activate_at') + self.activate_at = attributes[:'activate_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + activate_at == o.activate_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [activate_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/revision_version.rb b/lib/talon_one/models/revision_version.rb new file mode 100644 index 0000000..b8f7aa2 --- /dev/null +++ b/lib/talon_one/models/revision_version.rb @@ -0,0 +1,466 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # + class RevisionVersion + # Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + attr_accessor :id + + attr_accessor :account_id + + attr_accessor :application_id + + attr_accessor :campaign_id + + attr_accessor :created + + attr_accessor :created_by + + attr_accessor :revision_id + + attr_accessor :version + + # A user-facing name for this campaign. + attr_accessor :name + + # Timestamp when the campaign will become active. + attr_accessor :start_time + + # Timestamp when the campaign will become inactive. + attr_accessor :end_time + + # Arbitrary properties associated with this campaign. + attr_accessor :attributes + + # A detailed description of the campaign. + attr_accessor :description + + # The ID of the ruleset this campaign template will use. + attr_accessor :active_ruleset_id + + # A list of tags for the campaign template. + attr_accessor :tags + + attr_accessor :coupon_settings + + attr_accessor :referral_settings + + # The set of limits that will operate for this campaign version. + attr_accessor :limits + + # A list of features for the campaign template. + attr_accessor :features + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'account_id' => :'accountId', + :'application_id' => :'applicationId', + :'campaign_id' => :'campaignId', + :'created' => :'created', + :'created_by' => :'createdBy', + :'revision_id' => :'revisionId', + :'version' => :'version', + :'name' => :'name', + :'start_time' => :'startTime', + :'end_time' => :'endTime', + :'attributes' => :'attributes', + :'description' => :'description', + :'active_ruleset_id' => :'activeRulesetId', + :'tags' => :'tags', + :'coupon_settings' => :'couponSettings', + :'referral_settings' => :'referralSettings', + :'limits' => :'limits', + :'features' => :'features' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'account_id' => :'Integer', + :'application_id' => :'Integer', + :'campaign_id' => :'Integer', + :'created' => :'DateTime', + :'created_by' => :'Integer', + :'revision_id' => :'Integer', + :'version' => :'Integer', + :'name' => :'String', + :'start_time' => :'DateTime', + :'end_time' => :'DateTime', + :'attributes' => :'Object', + :'description' => :'String', + :'active_ruleset_id' => :'Integer', + :'tags' => :'Array', + :'coupon_settings' => :'CodeGeneratorSettings', + :'referral_settings' => :'CodeGeneratorSettings', + :'limits' => :'Array', + :'features' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'start_time', + :'end_time', + :'description', + :'active_ruleset_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::RevisionVersion` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::RevisionVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'campaign_id') + self.campaign_id = attributes[:'campaign_id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'revision_id') + self.revision_id = attributes[:'revision_id'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + end + + if attributes.key?(:'end_time') + self.end_time = attributes[:'end_time'] + end + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'active_ruleset_id') + self.active_ruleset_id = attributes[:'active_ruleset_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'coupon_settings') + self.coupon_settings = attributes[:'coupon_settings'] + end + + if attributes.key?(:'referral_settings') + self.referral_settings = attributes[:'referral_settings'] + end + + if attributes.key?(:'limits') + if (value = attributes[:'limits']).is_a?(Array) + self.limits = value + end + end + + if attributes.key?(:'features') + if (value = attributes[:'features']).is_a?(Array) + self.features = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @application_id.nil? + invalid_properties.push('invalid value for "application_id", application_id cannot be nil.') + end + + if @campaign_id.nil? + invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @created_by.nil? + invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + end + + if @revision_id.nil? + invalid_properties.push('invalid value for "revision_id", revision_id cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + if !@name.nil? && @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @account_id.nil? + return false if @application_id.nil? + return false if @campaign_id.nil? + return false if @created.nil? + return false if @created_by.nil? + return false if @revision_id.nil? + return false if @version.nil? + return false if !@name.nil? && @name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if !name.nil? && name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + account_id == o.account_id && + application_id == o.application_id && + campaign_id == o.campaign_id && + created == o.created && + created_by == o.created_by && + revision_id == o.revision_id && + version == o.version && + name == o.name && + start_time == o.start_time && + end_time == o.end_time && + attributes == o.attributes && + description == o.description && + active_ruleset_id == o.active_ruleset_id && + tags == o.tags && + coupon_settings == o.coupon_settings && + referral_settings == o.referral_settings && + limits == o.limits && + features == o.features + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, account_id, application_id, campaign_id, created, created_by, revision_id, version, name, start_time, end_time, attributes, description, active_ruleset_id, tags, coupon_settings, referral_settings, limits, features].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb b/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb new file mode 100644 index 0000000..d0f0e00 --- /dev/null +++ b/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb @@ -0,0 +1,288 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # The properties specific to the \"rollbackIncreasedAchievementProgress\" effect. This gets triggered whenever a closed session where the `increaseAchievementProgress` effect was triggered is cancelled. This is applicable only when the customer has not completed the achievement. + class RollbackIncreasedAchievementProgressEffectProps + # The internal ID of the achievement. + attr_accessor :achievement_id + + # The name of the achievement. + attr_accessor :achievement_name + + # The internal ID of the achievement progress tracker. + attr_accessor :progress_tracker_id + + # The value by which the customer's current progress in the achievement is decreased. + attr_accessor :decrease_progress_by + + # The current progress of the customer in the achievement. + attr_accessor :current_progress + + # The target value to complete the achievement. + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'achievement_id' => :'achievementId', + :'achievement_name' => :'achievementName', + :'progress_tracker_id' => :'progressTrackerId', + :'decrease_progress_by' => :'decreaseProgressBy', + :'current_progress' => :'currentProgress', + :'target' => :'target' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'achievement_id' => :'Integer', + :'achievement_name' => :'String', + :'progress_tracker_id' => :'Integer', + :'decrease_progress_by' => :'Float', + :'current_progress' => :'Float', + :'target' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::RollbackIncreasedAchievementProgressEffectProps` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::RollbackIncreasedAchievementProgressEffectProps`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'achievement_id') + self.achievement_id = attributes[:'achievement_id'] + end + + if attributes.key?(:'achievement_name') + self.achievement_name = attributes[:'achievement_name'] + end + + if attributes.key?(:'progress_tracker_id') + self.progress_tracker_id = attributes[:'progress_tracker_id'] + end + + if attributes.key?(:'decrease_progress_by') + self.decrease_progress_by = attributes[:'decrease_progress_by'] + end + + if attributes.key?(:'current_progress') + self.current_progress = attributes[:'current_progress'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @achievement_id.nil? + invalid_properties.push('invalid value for "achievement_id", achievement_id cannot be nil.') + end + + if @achievement_name.nil? + invalid_properties.push('invalid value for "achievement_name", achievement_name cannot be nil.') + end + + if @progress_tracker_id.nil? + invalid_properties.push('invalid value for "progress_tracker_id", progress_tracker_id cannot be nil.') + end + + if @decrease_progress_by.nil? + invalid_properties.push('invalid value for "decrease_progress_by", decrease_progress_by cannot be nil.') + end + + if @current_progress.nil? + invalid_properties.push('invalid value for "current_progress", current_progress cannot be nil.') + end + + if @target.nil? + invalid_properties.push('invalid value for "target", target cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @achievement_id.nil? + return false if @achievement_name.nil? + return false if @progress_tracker_id.nil? + return false if @decrease_progress_by.nil? + return false if @current_progress.nil? + return false if @target.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + achievement_id == o.achievement_id && + achievement_name == o.achievement_name && + progress_tracker_id == o.progress_tracker_id && + decrease_progress_by == o.decrease_progress_by && + current_progress == o.current_progress && + target == o.target + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [achievement_id, achievement_name, progress_tracker_id, decrease_progress_by, current_progress, target].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/rule_failure_reason.rb b/lib/talon_one/models/rule_failure_reason.rb index 3fe77d4..a0eba53 100644 --- a/lib/talon_one/models/rule_failure_reason.rb +++ b/lib/talon_one/models/rule_failure_reason.rb @@ -51,6 +51,12 @@ class RuleFailureReason # More details about the failure. attr_accessor :details + # The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation). + attr_accessor :evaluation_group_id + + # The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign- + attr_accessor :evaluation_group_mode + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -65,7 +71,9 @@ def self.attribute_map :'rule_name' => :'ruleName', :'condition_index' => :'conditionIndex', :'effect_index' => :'effectIndex', - :'details' => :'details' + :'details' => :'details', + :'evaluation_group_id' => :'evaluationGroupID', + :'evaluation_group_mode' => :'evaluationGroupMode' } end @@ -83,7 +91,9 @@ def self.openapi_types :'rule_name' => :'String', :'condition_index' => :'Integer', :'effect_index' => :'Integer', - :'details' => :'String' + :'details' => :'String', + :'evaluation_group_id' => :'Integer', + :'evaluation_group_mode' => :'String' } end @@ -155,6 +165,14 @@ def initialize(attributes = {}) if attributes.key?(:'details') self.details = attributes[:'details'] end + + if attributes.key?(:'evaluation_group_id') + self.evaluation_group_id = attributes[:'evaluation_group_id'] + end + + if attributes.key?(:'evaluation_group_mode') + self.evaluation_group_mode = attributes[:'evaluation_group_mode'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -211,7 +229,9 @@ def ==(o) rule_name == o.rule_name && condition_index == o.condition_index && effect_index == o.effect_index && - details == o.details + details == o.details && + evaluation_group_id == o.evaluation_group_id && + evaluation_group_mode == o.evaluation_group_mode end # @see the `==` method @@ -223,7 +243,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [campaign_id, campaign_name, ruleset_id, coupon_id, coupon_value, referral_id, referral_value, rule_index, rule_name, condition_index, effect_index, details].hash + [campaign_id, campaign_name, ruleset_id, coupon_id, coupon_value, referral_id, referral_value, rule_index, rule_name, condition_index, effect_index, details, evaluation_group_id, evaluation_group_mode].hash end # Builds the object from hash diff --git a/lib/talon_one/models/scim_base_user.rb b/lib/talon_one/models/scim_base_user.rb new file mode 100644 index 0000000..f6cd3a1 --- /dev/null +++ b/lib/talon_one/models/scim_base_user.rb @@ -0,0 +1,237 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Schema definition for base user fields, provisioned using the SCIM protocol and used by Talon.One. + class ScimBaseUser + # Status of the user. + attr_accessor :active + + # Display name of the user. + attr_accessor :display_name + + # Unique identifier of the user. This is usually an email address. + attr_accessor :user_name + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'active' => :'active', + :'display_name' => :'displayName', + :'user_name' => :'userName', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'active' => :'Boolean', + :'display_name' => :'String', + :'user_name' => :'String', + :'name' => :'ScimBaseUserName' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimBaseUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimBaseUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'active') + self.active = attributes[:'active'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + active == o.active && + display_name == o.display_name && + user_name == o.user_name && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [active, display_name, user_name, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_base_user_name.rb b/lib/talon_one/models/scim_base_user_name.rb new file mode 100644 index 0000000..5b14e6a --- /dev/null +++ b/lib/talon_one/models/scim_base_user_name.rb @@ -0,0 +1,208 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # The components of the user’s real name. + class ScimBaseUserName + # The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. + attr_accessor :formatted + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'formatted' => :'formatted' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'formatted' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimBaseUserName` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimBaseUserName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'formatted') + self.formatted = attributes[:'formatted'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + formatted == o.formatted + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [formatted].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_new_user.rb b/lib/talon_one/models/scim_new_user.rb new file mode 100644 index 0000000..27a747c --- /dev/null +++ b/lib/talon_one/models/scim_new_user.rb @@ -0,0 +1,237 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Payload for users that are created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + class ScimNewUser + # Status of the user. + attr_accessor :active + + # Display name of the user. + attr_accessor :display_name + + # Unique identifier of the user. This is usually an email address. + attr_accessor :user_name + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'active' => :'active', + :'display_name' => :'displayName', + :'user_name' => :'userName', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'active' => :'Boolean', + :'display_name' => :'String', + :'user_name' => :'String', + :'name' => :'ScimBaseUserName' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimNewUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimNewUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'active') + self.active = attributes[:'active'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + active == o.active && + display_name == o.display_name && + user_name == o.user_name && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [active, display_name, user_name, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_patch_operation.rb b/lib/talon_one/models/scim_patch_operation.rb new file mode 100644 index 0000000..e15fa7c --- /dev/null +++ b/lib/talon_one/models/scim_patch_operation.rb @@ -0,0 +1,267 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Patch operation that is used to update the information. + class ScimPatchOperation + # The method that should be used in the operation. + attr_accessor :op + + # The path specifying the attribute that should be updated. + attr_accessor :path + + # The value that should be updated. Required if `op` is `add` or `replace`. + attr_accessor :value + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'op' => :'op', + :'path' => :'path', + :'value' => :'value' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'op' => :'String', + :'path' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimPatchOperation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimPatchOperation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'op') + self.op = attributes[:'op'] + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @op.nil? + invalid_properties.push('invalid value for "op", op cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @op.nil? + op_validator = EnumAttributeValidator.new('String', ["add", "remove", "replace"]) + return false unless op_validator.valid?(@op) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] op Object to be assigned + def op=(op) + validator = EnumAttributeValidator.new('String', ["add", "remove", "replace"]) + unless validator.valid?(op) + fail ArgumentError, "invalid value for \"op\", must be one of #{validator.allowable_values}." + end + @op = op + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + op == o.op && + path == o.path && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [op, path, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_patch_request.rb b/lib/talon_one/models/scim_patch_request.rb new file mode 100644 index 0000000..6a2d278 --- /dev/null +++ b/lib/talon_one/models/scim_patch_request.rb @@ -0,0 +1,226 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # SCIM Patch request + class ScimPatchRequest + # SCIM schema for the given resource. + attr_accessor :schemas + + attr_accessor :operations + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'schemas' => :'schemas', + :'operations' => :'Operations' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'schemas' => :'Array', + :'operations' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimPatchRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'schemas') + if (value = attributes[:'schemas']).is_a?(Array) + self.schemas = value + end + end + + if attributes.key?(:'operations') + if (value = attributes[:'operations']).is_a?(Array) + self.operations = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operations.nil? + invalid_properties.push('invalid value for "operations", operations cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operations.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schemas == o.schemas && + operations == o.operations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [schemas, operations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_resource.rb b/lib/talon_one/models/scim_resource.rb new file mode 100644 index 0000000..c07c726 --- /dev/null +++ b/lib/talon_one/models/scim_resource.rb @@ -0,0 +1,228 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Resource definition for the SCIM provisioning protocol. + class ScimResource + # ID of the resource. + attr_accessor :id + + # Name of the resource. + attr_accessor :name + + # Human-readable description of the resource. + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'description' => :'description' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_resource_types_list_response.rb b/lib/talon_one/models/scim_resource_types_list_response.rb new file mode 100644 index 0000000..6a5ba70 --- /dev/null +++ b/lib/talon_one/models/scim_resource_types_list_response.rb @@ -0,0 +1,214 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # List of resource types supported by the SCIM provisioning protocol. + class ScimResourceTypesListResponse + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimResourceTypesListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimResourceTypesListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_schema_resource.rb b/lib/talon_one/models/scim_schema_resource.rb new file mode 100644 index 0000000..ba450da --- /dev/null +++ b/lib/talon_one/models/scim_schema_resource.rb @@ -0,0 +1,239 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Resource schema definition for the SCIM provisioning protocol. + class ScimSchemaResource + # ID of the resource. + attr_accessor :id + + # Name of the resource. + attr_accessor :name + + # Human-readable description of the schema resource. + attr_accessor :description + + attr_accessor :attributes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'description' => :'description', + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'description' => :'String', + :'attributes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimSchemaResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimSchemaResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'attributes') + if (value = attributes[:'attributes']).is_a?(Array) + self.attributes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + description == o.description && + attributes == o.attributes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, description, attributes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_schemas_list_response.rb b/lib/talon_one/models/scim_schemas_list_response.rb new file mode 100644 index 0000000..7bdb728 --- /dev/null +++ b/lib/talon_one/models/scim_schemas_list_response.rb @@ -0,0 +1,236 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # List of resource schemas supported by the SCIM provisioning protocol. + class ScimSchemasListResponse + attr_accessor :resources + + # SCIM schema for the given resource. + attr_accessor :schemas + + # Number of total results in the response. + attr_accessor :total_results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'schemas' => :'schemas', + :'total_results' => :'totalResults' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array', + :'schemas' => :'Array', + :'total_results' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimSchemasListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimSchemasListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + + if attributes.key?(:'schemas') + if (value = attributes[:'schemas']).is_a?(Array) + self.schemas = value + end + end + + if attributes.key?(:'total_results') + self.total_results = attributes[:'total_results'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources && + schemas == o.schemas && + total_results == o.total_results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources, schemas, total_results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_service_provider_config_response.rb b/lib/talon_one/models/scim_service_provider_config_response.rb new file mode 100644 index 0000000..608c0b1 --- /dev/null +++ b/lib/talon_one/models/scim_service_provider_config_response.rb @@ -0,0 +1,256 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Service provider configuration details. + class ScimServiceProviderConfigResponse + attr_accessor :bulk + + attr_accessor :change_password + + # The URI that points to the SCIM service provider's documentation, providing further details about the service's capabilities and usage. + attr_accessor :documentation_uri + + attr_accessor :filter + + attr_accessor :patch + + # A list of SCIM schemas that define the structure and data types supported by the service provider. + attr_accessor :schemas + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bulk' => :'bulk', + :'change_password' => :'changePassword', + :'documentation_uri' => :'documentationUri', + :'filter' => :'filter', + :'patch' => :'patch', + :'schemas' => :'schemas' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'bulk' => :'ScimServiceProviderConfigResponseBulk', + :'change_password' => :'ScimServiceProviderConfigResponseChangePassword', + :'documentation_uri' => :'String', + :'filter' => :'ScimServiceProviderConfigResponseFilter', + :'patch' => :'ScimServiceProviderConfigResponsePatch', + :'schemas' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimServiceProviderConfigResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimServiceProviderConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'bulk') + self.bulk = attributes[:'bulk'] + end + + if attributes.key?(:'change_password') + self.change_password = attributes[:'change_password'] + end + + if attributes.key?(:'documentation_uri') + self.documentation_uri = attributes[:'documentation_uri'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'patch') + self.patch = attributes[:'patch'] + end + + if attributes.key?(:'schemas') + if (value = attributes[:'schemas']).is_a?(Array) + self.schemas = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bulk == o.bulk && + change_password == o.change_password && + documentation_uri == o.documentation_uri && + filter == o.filter && + patch == o.patch && + schemas == o.schemas + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [bulk, change_password, documentation_uri, filter, patch, schemas].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_service_provider_config_response_bulk.rb b/lib/talon_one/models/scim_service_provider_config_response_bulk.rb new file mode 100644 index 0000000..bd9164f --- /dev/null +++ b/lib/talon_one/models/scim_service_provider_config_response_bulk.rb @@ -0,0 +1,228 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Configuration related to bulk operations, which allow multiple SCIM requests to be processed in a single HTTP request. + class ScimServiceProviderConfigResponseBulk + # The maximum number of individual operations that can be included in a single bulk request. + attr_accessor :max_operations + + # The maximum size, in bytes, of the entire payload for a bulk operation request. + attr_accessor :max_payload_size + + # Indicates whether the SCIM service provider supports bulk operations. + attr_accessor :supported + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'max_operations' => :'maxOperations', + :'max_payload_size' => :'maxPayloadSize', + :'supported' => :'supported' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'max_operations' => :'Integer', + :'max_payload_size' => :'Integer', + :'supported' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimServiceProviderConfigResponseBulk` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimServiceProviderConfigResponseBulk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'max_operations') + self.max_operations = attributes[:'max_operations'] + end + + if attributes.key?(:'max_payload_size') + self.max_payload_size = attributes[:'max_payload_size'] + end + + if attributes.key?(:'supported') + self.supported = attributes[:'supported'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + max_operations == o.max_operations && + max_payload_size == o.max_payload_size && + supported == o.supported + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [max_operations, max_payload_size, supported].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_service_provider_config_response_change_password.rb b/lib/talon_one/models/scim_service_provider_config_response_change_password.rb new file mode 100644 index 0000000..898b538 --- /dev/null +++ b/lib/talon_one/models/scim_service_provider_config_response_change_password.rb @@ -0,0 +1,208 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Configuration settings related to the ability to change user passwords. + class ScimServiceProviderConfigResponseChangePassword + # Indicates whether the service provider supports password changes via the SCIM API. + attr_accessor :supported + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'supported' => :'supported' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'supported' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimServiceProviderConfigResponseChangePassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimServiceProviderConfigResponseChangePassword`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'supported') + self.supported = attributes[:'supported'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + supported == o.supported + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [supported].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_service_provider_config_response_filter.rb b/lib/talon_one/models/scim_service_provider_config_response_filter.rb new file mode 100644 index 0000000..dcba8b2 --- /dev/null +++ b/lib/talon_one/models/scim_service_provider_config_response_filter.rb @@ -0,0 +1,218 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Configuration settings related to filtering SCIM resources based on specific criteria. + class ScimServiceProviderConfigResponseFilter + # The maximum number of resources that can be returned in a single filtered query response. + attr_accessor :max_results + + # Indicates whether the SCIM service provider supports filtering operations. + attr_accessor :supported + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'max_results' => :'maxResults', + :'supported' => :'supported' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'max_results' => :'Integer', + :'supported' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimServiceProviderConfigResponseFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimServiceProviderConfigResponseFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'max_results') + self.max_results = attributes[:'max_results'] + end + + if attributes.key?(:'supported') + self.supported = attributes[:'supported'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + max_results == o.max_results && + supported == o.supported + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [max_results, supported].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_service_provider_config_response_patch.rb b/lib/talon_one/models/scim_service_provider_config_response_patch.rb new file mode 100644 index 0000000..f955362 --- /dev/null +++ b/lib/talon_one/models/scim_service_provider_config_response_patch.rb @@ -0,0 +1,208 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Configuration settings related to patch operations, which allow partial updates to SCIM resources. + class ScimServiceProviderConfigResponsePatch + # Indicates whether the service provider supports patch operations for modifying resources. + attr_accessor :supported + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'supported' => :'supported' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'supported' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimServiceProviderConfigResponsePatch` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimServiceProviderConfigResponsePatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'supported') + self.supported = attributes[:'supported'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + supported == o.supported + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [supported].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_user.rb b/lib/talon_one/models/scim_user.rb new file mode 100644 index 0000000..440d70c --- /dev/null +++ b/lib/talon_one/models/scim_user.rb @@ -0,0 +1,252 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # Schema definition for users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + class ScimUser + # Status of the user. + attr_accessor :active + + # Display name of the user. + attr_accessor :display_name + + # Unique identifier of the user. This is usually an email address. + attr_accessor :user_name + + attr_accessor :name + + # ID of the user. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'active' => :'active', + :'display_name' => :'displayName', + :'user_name' => :'userName', + :'name' => :'name', + :'id' => :'id' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'active' => :'Boolean', + :'display_name' => :'String', + :'user_name' => :'String', + :'name' => :'ScimBaseUserName', + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'active') + self.active = attributes[:'active'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + active == o.active && + display_name == o.display_name && + user_name == o.user_name && + name == o.name && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [active, display_name, user_name, name, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/scim_users_list_response.rb b/lib/talon_one/models/scim_users_list_response.rb new file mode 100644 index 0000000..c2aa3fa --- /dev/null +++ b/lib/talon_one/models/scim_users_list_response.rb @@ -0,0 +1,236 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + # List of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + class ScimUsersListResponse + attr_accessor :resources + + # SCIM schema for the given resource. + attr_accessor :schemas + + # Number of total results in the response. + attr_accessor :total_results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'schemas' => :'schemas', + :'total_results' => :'totalResults' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array', + :'schemas' => :'Array', + :'total_results' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimUsersListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimUsersListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + + if attributes.key?(:'schemas') + if (value = attributes[:'schemas']).is_a?(Array) + self.schemas = value + end + end + + if attributes.key?(:'total_results') + self.total_results = attributes[:'total_results'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources && + schemas == o.schemas && + total_results == o.total_results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources, schemas, total_results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/sso_config.rb b/lib/talon_one/models/sso_config.rb index b702275..6d76776 100644 --- a/lib/talon_one/models/sso_config.rb +++ b/lib/talon_one/models/sso_config.rb @@ -17,17 +17,22 @@ class SSOConfig # An indication of whether single sign-on is enforced for the account. When enforced, users cannot use their email and password to sign in to Talon.One. It is not possible to change this to `false` after it is set to `true`. attr_accessor :enforced + # Assertion Consumer Service (ACS) URL for setting up a new SAML connection with an identity provider like Okta or Microsoft Entra ID. + attr_accessor :new_acs_url + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'enforced' => :'enforced' + :'enforced' => :'enforced', + :'new_acs_url' => :'newAcsUrl' } end # Attribute type mapping. def self.openapi_types { - :'enforced' => :'Boolean' + :'enforced' => :'Boolean', + :'new_acs_url' => :'String' } end @@ -55,6 +60,10 @@ def initialize(attributes = {}) if attributes.key?(:'enforced') self.enforced = attributes[:'enforced'] end + + if attributes.key?(:'new_acs_url') + self.new_acs_url = attributes[:'new_acs_url'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -80,7 +89,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - enforced == o.enforced + enforced == o.enforced && + new_acs_url == o.new_acs_url end # @see the `==` method @@ -92,7 +102,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [enforced].hash + [enforced, new_acs_url].hash end # Builds the object from hash diff --git a/lib/talon_one/models/tier.rb b/lib/talon_one/models/tier.rb index 79b062c..6335d18 100644 --- a/lib/talon_one/models/tier.rb +++ b/lib/talon_one/models/tier.rb @@ -20,10 +20,13 @@ class Tier # The name of the tier. attr_accessor :name + # Date and time when the customer moved to this tier. This value uses the loyalty program's time zone setting. + attr_accessor :start_date + # Date when tier level expires in the RFC3339 format (in the Loyalty Program's timezone). attr_accessor :expiry_date - # Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + # The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. attr_accessor :downgrade_policy class EnumAttributeValidator @@ -53,6 +56,7 @@ def self.attribute_map { :'id' => :'id', :'name' => :'name', + :'start_date' => :'startDate', :'expiry_date' => :'expiryDate', :'downgrade_policy' => :'downgradePolicy' } @@ -63,6 +67,7 @@ def self.openapi_types { :'id' => :'Integer', :'name' => :'String', + :'start_date' => :'DateTime', :'expiry_date' => :'DateTime', :'downgrade_policy' => :'String' } @@ -97,6 +102,10 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'start_date') + self.start_date = attributes[:'start_date'] + end + if attributes.key?(:'expiry_date') self.expiry_date = attributes[:'expiry_date'] end @@ -148,6 +157,7 @@ def ==(o) self.class == o.class && id == o.id && name == o.name && + start_date == o.start_date && expiry_date == o.expiry_date && downgrade_policy == o.downgrade_policy end @@ -161,7 +171,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, expiry_date, downgrade_policy].hash + [id, name, start_date, expiry_date, downgrade_policy].hash end # Builds the object from hash diff --git a/lib/talon_one/models/transfer_loyalty_card.rb b/lib/talon_one/models/transfer_loyalty_card.rb index 666ee3d..bbb21ba 100644 --- a/lib/talon_one/models/transfer_loyalty_card.rb +++ b/lib/talon_one/models/transfer_loyalty_card.rb @@ -17,17 +17,22 @@ class TransferLoyaltyCard # The alphanumeric identifier of the loyalty card. attr_accessor :new_card_identifier + # Reason for transferring and blocking the loyalty card. + attr_accessor :block_reason + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'new_card_identifier' => :'newCardIdentifier' + :'new_card_identifier' => :'newCardIdentifier', + :'block_reason' => :'blockReason' } end # Attribute type mapping. def self.openapi_types { - :'new_card_identifier' => :'String' + :'new_card_identifier' => :'String', + :'block_reason' => :'String' } end @@ -55,6 +60,10 @@ def initialize(attributes = {}) if attributes.key?(:'new_card_identifier') self.new_card_identifier = attributes[:'new_card_identifier'] end + + if attributes.key?(:'block_reason') + self.block_reason = attributes[:'block_reason'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -99,7 +108,8 @@ def new_card_identifier=(new_card_identifier) def ==(o) return true if self.equal?(o) self.class == o.class && - new_card_identifier == o.new_card_identifier + new_card_identifier == o.new_card_identifier && + block_reason == o.block_reason end # @see the `==` method @@ -111,7 +121,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [new_card_identifier].hash + [new_card_identifier, block_reason].hash end # Builds the object from hash diff --git a/lib/talon_one/models/update_application.rb b/lib/talon_one/models/update_application.rb index 1263e58..b7e5be8 100644 --- a/lib/talon_one/models/update_application.rb +++ b/lib/talon_one/models/update_application.rb @@ -58,6 +58,12 @@ class UpdateApplication # The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. attr_accessor :default_evaluation_group_id + # The ID of the default Cart-Item-Filter for this application. + attr_accessor :default_cart_item_filter_id + + # Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled. + attr_accessor :enable_campaign_state_management + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -97,7 +103,9 @@ def self.attribute_map :'sandbox' => :'sandbox', :'enable_partial_discounts' => :'enablePartialDiscounts', :'default_discount_additional_cost_per_item_scope' => :'defaultDiscountAdditionalCostPerItemScope', - :'default_evaluation_group_id' => :'defaultEvaluationGroupId' + :'default_evaluation_group_id' => :'defaultEvaluationGroupId', + :'default_cart_item_filter_id' => :'defaultCartItemFilterId', + :'enable_campaign_state_management' => :'enableCampaignStateManagement' } end @@ -118,7 +126,9 @@ def self.openapi_types :'sandbox' => :'Boolean', :'enable_partial_discounts' => :'Boolean', :'default_discount_additional_cost_per_item_scope' => :'String', - :'default_evaluation_group_id' => :'Integer' + :'default_evaluation_group_id' => :'Integer', + :'default_cart_item_filter_id' => :'Integer', + :'enable_campaign_state_management' => :'Boolean' } end @@ -204,6 +214,14 @@ def initialize(attributes = {}) if attributes.key?(:'default_evaluation_group_id') self.default_evaluation_group_id = attributes[:'default_evaluation_group_id'] end + + if attributes.key?(:'default_cart_item_filter_id') + self.default_cart_item_filter_id = attributes[:'default_cart_item_filter_id'] + end + + if attributes.key?(:'enable_campaign_state_management') + self.enable_campaign_state_management = attributes[:'enable_campaign_state_management'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -346,7 +364,9 @@ def ==(o) sandbox == o.sandbox && enable_partial_discounts == o.enable_partial_discounts && default_discount_additional_cost_per_item_scope == o.default_discount_additional_cost_per_item_scope && - default_evaluation_group_id == o.default_evaluation_group_id + default_evaluation_group_id == o.default_evaluation_group_id && + default_cart_item_filter_id == o.default_cart_item_filter_id && + enable_campaign_state_management == o.enable_campaign_state_management end # @see the `==` method @@ -358,7 +378,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id].hash + [name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id, default_cart_item_filter_id, enable_campaign_state_management].hash end # Builds the object from hash diff --git a/lib/talon_one/models/update_application_cif.rb b/lib/talon_one/models/update_application_cif.rb new file mode 100644 index 0000000..a858a9b --- /dev/null +++ b/lib/talon_one/models/update_application_cif.rb @@ -0,0 +1,237 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'date' + +module TalonOne + class UpdateApplicationCIF + # A short description of the Application cart item filter. + attr_accessor :description + + # The ID of the expression that the Application cart item filter uses. + attr_accessor :active_expression_id + + # The ID of the user who last updated the Application cart item filter. + attr_accessor :modified_by + + # Timestamp of the most recent update to the Application cart item filter. + attr_accessor :modified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'active_expression_id' => :'activeExpressionId', + :'modified_by' => :'modifiedBy', + :'modified' => :'modified' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'active_expression_id' => :'Integer', + :'modified_by' => :'Integer', + :'modified' => :'DateTime' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::UpdateApplicationCIF` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::UpdateApplicationCIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'active_expression_id') + self.active_expression_id = attributes[:'active_expression_id'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + active_expression_id == o.active_expression_id && + modified_by == o.modified_by && + modified == o.modified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, active_expression_id, modified_by, modified].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TalonOne.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/talon_one/models/update_campaign.rb b/lib/talon_one/models/update_campaign.rb index ea092ff..c468c8d 100644 --- a/lib/talon_one/models/update_campaign.rb +++ b/lib/talon_one/models/update_campaign.rb @@ -57,7 +57,7 @@ class UpdateCampaign # The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. attr_accessor :type - # A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + # A list of store IDs that you want to link to the campaign. **Note:** - Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. - If you linked stores to the campaign by uploading a CSV file, you cannot use this property and it should be empty. - Use of this property is limited to 50 stores. To link more than 50 stores, upload them via a CSV file. attr_accessor :linked_store_ids class EnumAttributeValidator diff --git a/lib/talon_one/models/update_coupon.rb b/lib/talon_one/models/update_coupon.rb index 718a3ee..b79d1ff 100644 --- a/lib/talon_one/models/update_coupon.rb +++ b/lib/talon_one/models/update_coupon.rb @@ -27,7 +27,7 @@ class UpdateCoupon # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. diff --git a/lib/talon_one/models/update_coupon_batch.rb b/lib/talon_one/models/update_coupon_batch.rb index eac99a6..bd9c767 100644 --- a/lib/talon_one/models/update_coupon_batch.rb +++ b/lib/talon_one/models/update_coupon_batch.rb @@ -27,7 +27,7 @@ class UpdateCouponBatch # Timestamp at which point the coupon becomes valid. attr_accessor :start_date - # Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. + # Expiration date of the coupon. Coupon never expires if this is omitted. attr_accessor :expiry_date # Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value. diff --git a/lib/talon_one/models/update_loyalty_card.rb b/lib/talon_one/models/update_loyalty_card.rb index 070aba9..3ff05da 100644 --- a/lib/talon_one/models/update_loyalty_card.rb +++ b/lib/talon_one/models/update_loyalty_card.rb @@ -14,20 +14,25 @@ module TalonOne class UpdateLoyaltyCard - # Status of the loyalty card. Can be one of: ['active', 'inactive'] + # Status of the loyalty card. Can be `active` or `inactive`. attr_accessor :status + # Reason for transferring and blocking the loyalty card. + attr_accessor :block_reason + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'status' => :'status' + :'status' => :'status', + :'block_reason' => :'blockReason' } end # Attribute type mapping. def self.openapi_types { - :'status' => :'String' + :'status' => :'String', + :'block_reason' => :'String' } end @@ -55,6 +60,10 @@ def initialize(attributes = {}) if attributes.key?(:'status') self.status = attributes[:'status'] end + + if attributes.key?(:'block_reason') + self.block_reason = attributes[:'block_reason'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -80,7 +89,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - status == o.status + status == o.status && + block_reason == o.block_reason end # @see the `==` method @@ -92,7 +102,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [status].hash + [status, block_reason].hash end # Builds the object from hash diff --git a/lib/talon_one/models/update_loyalty_program.rb b/lib/talon_one/models/update_loyalty_program.rb index aff3aa1..f54f4ee 100644 --- a/lib/talon_one/models/update_loyalty_program.rb +++ b/lib/talon_one/models/update_loyalty_program.rb @@ -39,17 +39,22 @@ class UpdateLoyaltyProgram # Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. attr_accessor :sandbox - # The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + attr_accessor :program_join_policy + + # The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. attr_accessor :tiers_expiration_policy - # The amount of time after which the tier expires. 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. + # Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. + attr_accessor :tier_cycle_start_date + + # The amount of time after which the tier expires and is reevaluated. 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. attr_accessor :tiers_expire_in - # Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + # The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. attr_accessor :tiers_downgrade_policy - # The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. - attr_accessor :program_join_policy + attr_accessor :card_code_settings # The tiers in this loyalty program. attr_accessor :tiers @@ -87,10 +92,12 @@ def self.attribute_map :'allow_subledger' => :'allowSubledger', :'users_per_card_limit' => :'usersPerCardLimit', :'sandbox' => :'sandbox', + :'program_join_policy' => :'programJoinPolicy', :'tiers_expiration_policy' => :'tiersExpirationPolicy', + :'tier_cycle_start_date' => :'tierCycleStartDate', :'tiers_expire_in' => :'tiersExpireIn', :'tiers_downgrade_policy' => :'tiersDowngradePolicy', - :'program_join_policy' => :'programJoinPolicy', + :'card_code_settings' => :'cardCodeSettings', :'tiers' => :'tiers' } end @@ -106,10 +113,12 @@ def self.openapi_types :'allow_subledger' => :'Boolean', :'users_per_card_limit' => :'Integer', :'sandbox' => :'Boolean', + :'program_join_policy' => :'String', :'tiers_expiration_policy' => :'String', + :'tier_cycle_start_date' => :'DateTime', :'tiers_expire_in' => :'String', :'tiers_downgrade_policy' => :'String', - :'program_join_policy' => :'String', + :'card_code_settings' => :'CodeGeneratorSettings', :'tiers' => :'Array' } end @@ -169,10 +178,18 @@ def initialize(attributes = {}) self.sandbox = attributes[:'sandbox'] end + if attributes.key?(:'program_join_policy') + self.program_join_policy = attributes[:'program_join_policy'] + end + if attributes.key?(:'tiers_expiration_policy') self.tiers_expiration_policy = attributes[:'tiers_expiration_policy'] end + if attributes.key?(:'tier_cycle_start_date') + self.tier_cycle_start_date = attributes[:'tier_cycle_start_date'] + end + if attributes.key?(:'tiers_expire_in') self.tiers_expire_in = attributes[:'tiers_expire_in'] end @@ -181,8 +198,8 @@ def initialize(attributes = {}) self.tiers_downgrade_policy = attributes[:'tiers_downgrade_policy'] end - if attributes.key?(:'program_join_policy') - self.program_join_policy = attributes[:'program_join_policy'] + if attributes.key?(:'card_code_settings') + self.card_code_settings = attributes[:'card_code_settings'] end if attributes.key?(:'tiers') @@ -207,12 +224,12 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if !@users_per_card_limit.nil? && @users_per_card_limit < 0 - tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + return false unless program_join_policy_validator.valid?(@program_join_policy) + tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy) tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"]) return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy) - program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - return false unless program_join_policy_validator.valid?(@program_join_policy) true end @@ -226,10 +243,20 @@ def users_per_card_limit=(users_per_card_limit) @users_per_card_limit = users_per_card_limit end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] program_join_policy Object to be assigned + def program_join_policy=(program_join_policy) + validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + unless validator.valid?(program_join_policy) + fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." + end + @program_join_policy = program_join_policy + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] tiers_expiration_policy Object to be assigned def tiers_expiration_policy=(tiers_expiration_policy) - validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) unless validator.valid?(tiers_expiration_policy) fail ArgumentError, "invalid value for \"tiers_expiration_policy\", must be one of #{validator.allowable_values}." end @@ -246,16 +273,6 @@ def tiers_downgrade_policy=(tiers_downgrade_policy) @tiers_downgrade_policy = tiers_downgrade_policy end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] program_join_policy Object to be assigned - def program_join_policy=(program_join_policy) - validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - unless validator.valid?(program_join_policy) - fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}." - end - @program_join_policy = program_join_policy - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -269,10 +286,12 @@ def ==(o) allow_subledger == o.allow_subledger && users_per_card_limit == o.users_per_card_limit && sandbox == o.sandbox && + program_join_policy == o.program_join_policy && tiers_expiration_policy == o.tiers_expiration_policy && + tier_cycle_start_date == o.tier_cycle_start_date && tiers_expire_in == o.tiers_expire_in && tiers_downgrade_policy == o.tiers_downgrade_policy && - program_join_policy == o.program_join_policy && + card_code_settings == o.card_code_settings && tiers == o.tiers end @@ -285,7 +304,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, tiers_expiration_policy, tiers_expire_in, tiers_downgrade_policy, program_join_policy, tiers].hash + [title, description, subscribed_applications, default_validity, default_pending, allow_subledger, users_per_card_limit, sandbox, program_join_policy, tiers_expiration_policy, tier_cycle_start_date, tiers_expire_in, tiers_downgrade_policy, card_code_settings, tiers].hash end # Builds the object from hash diff --git a/lib/talon_one/models/update_referral.rb b/lib/talon_one/models/update_referral.rb index 99b7731..c60ab6b 100644 --- a/lib/talon_one/models/update_referral.rb +++ b/lib/talon_one/models/update_referral.rb @@ -20,7 +20,7 @@ class UpdateReferral # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/update_referral_batch.rb b/lib/talon_one/models/update_referral_batch.rb index 430e5a1..1c251db 100644 --- a/lib/talon_one/models/update_referral_batch.rb +++ b/lib/talon_one/models/update_referral_batch.rb @@ -23,7 +23,7 @@ class UpdateReferralBatch # Timestamp at which point the referral code becomes valid. attr_accessor :start_date - # Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. + # Expiration date of the referral code. Referral never expires if this is omitted. attr_accessor :expiry_date # The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. diff --git a/lib/talon_one/models/user.rb b/lib/talon_one/models/user.rb index 4f37663..9effa3a 100644 --- a/lib/talon_one/models/user.rb +++ b/lib/talon_one/models/user.rb @@ -63,6 +63,9 @@ class User # Timestamp when the user was notified for feed. attr_accessor :latest_feed_timestamp + # Additional user attributes, created and used by external identity providers. + attr_accessor :additional_attributes + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -103,7 +106,8 @@ def self.attribute_map :'application_notification_subscriptions' => :'applicationNotificationSubscriptions', :'last_signed_in' => :'lastSignedIn', :'last_accessed' => :'lastAccessed', - :'latest_feed_timestamp' => :'latestFeedTimestamp' + :'latest_feed_timestamp' => :'latestFeedTimestamp', + :'additional_attributes' => :'additionalAttributes' } end @@ -125,7 +129,8 @@ def self.openapi_types :'application_notification_subscriptions' => :'Object', :'last_signed_in' => :'DateTime', :'last_accessed' => :'DateTime', - :'latest_feed_timestamp' => :'DateTime' + :'latest_feed_timestamp' => :'DateTime', + :'additional_attributes' => :'Object' } end @@ -215,6 +220,10 @@ def initialize(attributes = {}) if attributes.key?(:'latest_feed_timestamp') self.latest_feed_timestamp = attributes[:'latest_feed_timestamp'] end + + if attributes.key?(:'additional_attributes') + self.additional_attributes = attributes[:'additional_attributes'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -307,7 +316,8 @@ def ==(o) application_notification_subscriptions == o.application_notification_subscriptions && last_signed_in == o.last_signed_in && last_accessed == o.last_accessed && - latest_feed_timestamp == o.latest_feed_timestamp + latest_feed_timestamp == o.latest_feed_timestamp && + additional_attributes == o.additional_attributes end # @see the `==` method @@ -319,7 +329,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, modified, email, account_id, name, state, invite_token, is_admin, policy, roles, auth_method, application_notification_subscriptions, last_signed_in, last_accessed, latest_feed_timestamp].hash + [id, created, modified, email, account_id, name, state, invite_token, is_admin, policy, roles, auth_method, application_notification_subscriptions, last_signed_in, last_accessed, latest_feed_timestamp, additional_attributes].hash end # Builds the object from hash diff --git a/lib/talon_one/models/webhook.rb b/lib/talon_one/models/webhook.rb index bc18fa7..57b38df 100644 --- a/lib/talon_one/models/webhook.rb +++ b/lib/talon_one/models/webhook.rb @@ -30,6 +30,9 @@ class Webhook # Name or title for this webhook. attr_accessor :title + # A description of the webhook. + attr_accessor :description + # API method for this webhook. attr_accessor :verb @@ -78,6 +81,7 @@ def self.attribute_map :'modified' => :'modified', :'application_ids' => :'applicationIds', :'title' => :'title', + :'description' => :'description', :'verb' => :'verb', :'url' => :'url', :'headers' => :'headers', @@ -95,6 +99,7 @@ def self.openapi_types :'modified' => :'DateTime', :'application_ids' => :'Array', :'title' => :'String', + :'description' => :'String', :'verb' => :'String', :'url' => :'String', :'headers' => :'Array', @@ -147,6 +152,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'verb') self.verb = attributes[:'verb'] end @@ -282,6 +291,7 @@ def ==(o) modified == o.modified && application_ids == o.application_ids && title == o.title && + description == o.description && verb == o.verb && url == o.url && headers == o.headers && @@ -299,7 +309,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, modified, application_ids, title, verb, url, headers, payload, params, enabled].hash + [id, created, modified, application_ids, title, description, verb, url, headers, payload, params, enabled].hash end # Builds the object from hash diff --git a/lib/talon_one/models/webhook_with_outgoing_integration_details.rb b/lib/talon_one/models/webhook_with_outgoing_integration_details.rb index 2534d5b..6a9530f 100644 --- a/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +++ b/lib/talon_one/models/webhook_with_outgoing_integration_details.rb @@ -30,6 +30,9 @@ class WebhookWithOutgoingIntegrationDetails # Name or title for this webhook. attr_accessor :title + # A description of the webhook. + attr_accessor :description + # API method for this webhook. attr_accessor :verb @@ -87,6 +90,7 @@ def self.attribute_map :'modified' => :'modified', :'application_ids' => :'applicationIds', :'title' => :'title', + :'description' => :'description', :'verb' => :'verb', :'url' => :'url', :'headers' => :'headers', @@ -107,6 +111,7 @@ def self.openapi_types :'modified' => :'DateTime', :'application_ids' => :'Array', :'title' => :'String', + :'description' => :'String', :'verb' => :'String', :'url' => :'String', :'headers' => :'Array', @@ -162,6 +167,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'verb') self.verb = attributes[:'verb'] end @@ -309,6 +318,7 @@ def ==(o) modified == o.modified && application_ids == o.application_ids && title == o.title && + description == o.description && verb == o.verb && url == o.url && headers == o.headers && @@ -329,7 +339,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, modified, application_ids, title, verb, url, headers, payload, params, enabled, outgoing_integration_template_id, outgoing_integration_type_id, outgoing_integration_type_name].hash + [id, created, modified, application_ids, title, description, verb, url, headers, payload, params, enabled, outgoing_integration_template_id, outgoing_integration_type_id, outgoing_integration_type_name].hash end # Builds the object from hash diff --git a/lib/talon_one/version.rb b/lib/talon_one/version.rb index 9664c5d..dbc7795 100644 --- a/lib/talon_one/version.rb +++ b/lib/talon_one/version.rb @@ -11,5 +11,5 @@ =end module TalonOne - VERSION = '5.0.0' + VERSION = '6.0.0' end diff --git a/spec/api/integration_api_spec.rb b/spec/api/integration_api_spec.rb index 3a628cc..91eab38 100644 --- a/spec/api/integration_api_spec.rb +++ b/spec/api/integration_api_spec.rb @@ -131,6 +131,19 @@ end end + # unit tests for generate_loyalty_card + # Generate loyalty card + # Generate a loyalty card in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview). To link the card to one or more customer profiles, use the `customerProfileIds` parameter in the request body. **Note:** - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's `usersPerCardLimit`. To find the program's limit, use the [Get loyalty program](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgram) endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier. + # @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. + # @param body body + # @param [Hash] opts the optional parameters + # @return [LoyaltyCard] + describe 'generate_loyalty_card test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_customer_inventory # List customer data # Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons. @@ -169,7 +182,9 @@ # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **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. # @option opts [String] :subledger_id The ID of the subledger by which we filter the data. - # @return [LoyaltyBalances] + # @option opts [Boolean] :include_tiers Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. + # @option opts [Boolean] :include_projected_tier Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. + # @return [LoyaltyBalancesWithTiers] describe 'get_loyalty_balances test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -317,7 +332,7 @@ # unit tests for sync_catalog # Sync cart item catalog - # Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding several items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing several items from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> + # Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: You can perform only one type of action in a single sync request. Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding multiple items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Updating the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Updating the attributes of multiple items in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing multiple items from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> # @param catalog_id The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. # @param body body # @param [Hash] opts the optional parameters @@ -414,7 +429,7 @@ # @param customer_session_id 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#operation/getApplicationSessions) endpoint. # @param body body # @param [Hash] opts the optional parameters - # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). + # @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). # @option opts [DateTime] :now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. # @return [IntegrationStateV2] describe 'update_customer_session_v2 test' do diff --git a/spec/api/management_api_spec.rb b/spec/api/management_api_spec.rb index 2fac7d3..48551f3 100644 --- a/spec/api/management_api_spec.rb +++ b/spec/api/management_api_spec.rb @@ -33,8 +33,8 @@ end # unit tests for activate_user_by_email - # Activate user by email address - # Activate a deactivated user by their email address. + # Enable user by email address + # Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body body # @param [Hash] opts the optional parameters # @return [nil] @@ -136,6 +136,19 @@ end end + # unit tests for create_batch_loyalty_cards + # Create loyalty cards + # Create a batch of loyalty cards in a specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. **Important:** - The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes. - Trying to create more than 20,000 loyalty cards in a single request returns an error message with a `400` status code. + # @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. + # @param body body + # @param [Hash] opts the optional parameters + # @return [LoyaltyCardBatchResponse] + describe 'create_batch_loyalty_cards test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for create_campaign_from_template # Create campaign from campaign template # Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](https://docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically. @@ -192,6 +205,20 @@ end end + # unit tests for create_coupons_deletion_job + # Creates a coupon deletion job + # This endpoint handles creating a job to delete coupons asynchronously. + # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param body body + # @param [Hash] opts the optional parameters + # @return [AsyncCouponDeletionJobResponse] + describe 'create_coupons_deletion_job test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for create_coupons_for_multiple_recipients # Create coupons for multiple recipients # Create coupons according to some pattern for up to 1000 recipients. @@ -269,8 +296,8 @@ end # unit tests for deactivate_user_by_email - # Deactivate user by email address - # Deactivate a specific user by their email address. + # Disable user by email address + # [Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address. # @param body body # @param [Hash] opts the optional parameters # @return [nil] @@ -370,10 +397,10 @@ # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [String] :usable - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. @@ -441,7 +468,7 @@ # unit tests for delete_user_by_email # Delete user by email address - # Delete a specific user by their email address. + # [Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address. # @param body body # @param [Hash] opts the optional parameters # @return [nil] @@ -462,6 +489,19 @@ end end + # unit tests for disconnect_campaign_stores + # Disconnect stores + # Disconnect the stores linked to a specific campaign. + # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'disconnect_campaign_stores test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for export_account_collection_items # Export account-level collection's items # Download a CSV file containing items from a given account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). @@ -500,6 +540,19 @@ end end + # unit tests for export_campaign_stores + # Export stores + # Download a CSV file containing the stores linked to a specific campaign. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following column: - `store_integration_id`: The identifier of the store. + # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. + # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @return [String] + describe 'export_campaign_stores test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for export_collection_items # Export campaign-level collection's items # Download a CSV file containing items from a given campaign-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). @@ -531,7 +584,7 @@ # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code. # @option opts [String] :date_format Determines the format of dates in the export document. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. # @return [String] describe 'export_coupons test' do @@ -559,7 +612,7 @@ # unit tests for export_customers_tiers # Export customers' tier data - # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. + # Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported. # @param loyalty_program_id The identifier for the loyalty program. # @param [Hash] opts the optional parameters # @option opts [Array] :subledger_ids An array of subledgers IDs to filter the export by. @@ -577,8 +630,8 @@ # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. - # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] describe 'export_effects test' do @@ -642,9 +695,22 @@ end end + # unit tests for export_loyalty_cards + # Export loyalty cards + # Download a CSV file containing the loyalty cards from a specified loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in. + # @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. + # @param [Hash] opts the optional parameters + # @option opts [String] :batch_id Filter results by loyalty card batch ID. + # @return [String] + describe 'export_loyalty_cards test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for export_loyalty_ledger # Export customer's transaction logs - # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. + # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. # @param range_start Only return results from after this timestamp. **Note:** - This 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. # @param range_end Only return results from before this timestamp. **Note:** - This 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. # @param loyalty_program_id The identifier for the loyalty program. @@ -1092,7 +1158,7 @@ # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [InlineResponse2006] describe 'get_campaign_by_attributes test' do it 'should work' do @@ -1152,7 +1218,7 @@ # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. # @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. @@ -1231,10 +1297,16 @@ # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. + # @option opts [String] :redeemed - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. - This field cannot be used in conjunction with the `usable` query parameter. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code + # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. + # @option opts [Boolean] :values_only Filter results to only return the coupon codes (`value` column) without the associated coupon data. # @return [InlineResponse2009] describe 'get_coupons_without_total_count test' do it 'should work' do @@ -1425,8 +1497,9 @@ # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. # @option opts [String] :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:** This parameter works only with numeric fields. - # @option opts [String] :identifier Optional query parameter to search cards by identifier. - # @option opts [Integer] :profile_id Filter by the profile ID. + # @option opts [String] :identifier The card code by which to filter loyalty cards in the response. + # @option opts [Integer] :profile_id Filter results by customer profile ID. + # @option opts [String] :batch_id Filter results by loyalty card batch ID. # @return [InlineResponse20015] describe 'get_loyalty_cards test' do it 'should work' do @@ -1660,7 +1733,7 @@ # List webhooks # List all webhooks. # @param [Hash] opts the optional parameters - # @option opts [String] :application_ids Filter by one or more Application IDs, separated by a comma. + # @option opts [String] :application_ids Checks if the given catalog or its attributes are referenced in the specified Application ID. **Note**: If no Application ID is provided, we check for all connected Applications. # @option opts [String] :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:** This parameter works only with numeric fields. # @option opts [Integer] :page_size The number of items in the response. # @option opts [Integer] :skip The number of items to skip when paging through large result sets. @@ -1714,6 +1787,20 @@ end end + # unit tests for import_campaign_stores + # Import stores + # 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. + # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. + # @param [Hash] opts the optional parameters + # @option opts [String] :up_file The file containing the data that is being imported. + # @return [Import] + describe 'import_campaign_stores test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for import_collection # Import data into existing campaign-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 Addidas 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. @@ -1759,7 +1846,7 @@ # unit tests for import_loyalty_customers_tiers # Import customers into loyalty tiers - # 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. 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 500MB. **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 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 500MB. **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 loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file containing the data that is being imported. @@ -1812,7 +1899,7 @@ # unit tests for invite_user_external # Invite user from identity provider - # Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + # [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 body body # @param [Hash] opts the optional parameters # @return [nil] @@ -1950,6 +2037,17 @@ end end + # unit tests for okta_event_handler_challenge + # Validate Okta API ownership + # Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'okta_event_handler_challenge test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for post_added_deducted_points_notification # Create notification about added or deducted loyalty points # Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). @@ -2015,6 +2113,112 @@ end end + # unit tests for scim_create_user + # Create SCIM user + # Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param body body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + describe 'scim_create_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_delete_user + # Delete SCIM user + # Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id The ID of the user. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'scim_delete_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_get_resource_types + # List supported SCIM resource types + # Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [ScimResourceTypesListResponse] + describe 'scim_get_resource_types test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_get_schemas + # List supported SCIM schemas + # Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources. + # @param [Hash] opts the optional parameters + # @return [ScimSchemasListResponse] + describe 'scim_get_schemas test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_get_service_provider_config + # Get SCIM service provider configuration + # Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings. + # @param [Hash] opts the optional parameters + # @return [ScimServiceProviderConfigResponse] + describe 'scim_get_service_provider_config test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_get_user + # Get SCIM user + # Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. + # @param user_id The ID of the user. + # @param [Hash] opts the optional parameters + # @return [ScimUser] + describe 'scim_get_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_get_users + # List SCIM users + # Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. + # @param [Hash] opts the optional parameters + # @return [ScimUsersListResponse] + describe 'scim_get_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_patch_user + # Update SCIM user attributes + # Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged. + # @param user_id The ID of the user. + # @param body body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + describe 'scim_patch_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for scim_replace_user_attributes + # Update SCIM user + # Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload. + # @param user_id The ID of the user. + # @param body body + # @param [Hash] opts the optional parameters + # @return [ScimUser] + describe 'scim_replace_user_attributes test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for search_coupons_advanced_application_wide_without_total_count # List coupons that match the given attributes (without total count) # List the coupons whose attributes match the query criteria in all the campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. @@ -2033,7 +2237,7 @@ # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code - # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. + # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. # @return [InlineResponse2009] describe 'search_coupons_advanced_application_wide_without_total_count test' do it 'should work' do @@ -2166,7 +2370,7 @@ # unit tests for update_coupon # Update coupon - # Update the specified coupon. <div class=\"redoc-section\"> <p class=\"title\">Important</p> <p>With this PUT endpoint only, any property you do not explicitly set in your request will be set to <code>null</code>.</p> </div> + # Update the specified coupon. <div class=\"redoc-section\"> <p class=\"title\">Important</p> <p>With this <code>PUT</code> endpoint alone, if you do not explicitly set a value for the <code>startDate</code>, <code>expiryDate</code>, and <code>recipientIntegrationId</code> properties in your request, it is automatically set to <code>null</code>.</p> </div> # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param coupon_id The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. diff --git a/spec/models/achievement_progress_spec.rb b/spec/models/achievement_progress_spec.rb index eae032c..e587227 100644 --- a/spec/models/achievement_progress_spec.rb +++ b/spec/models/achievement_progress_spec.rb @@ -50,6 +50,12 @@ end end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "campaign_id"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/additional_campaign_properties_spec.rb b/spec/models/additional_campaign_properties_spec.rb index 9206aec..98091f8 100644 --- a/spec/models/additional_campaign_properties_spec.rb +++ b/spec/models/additional_campaign_properties_spec.rb @@ -161,11 +161,17 @@ describe 'test attribute "frontend_state"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) # validator.allowable_values.each do |value| # expect { @instance.frontend_state = value }.not_to raise_error # end end end + describe 'test attribute "stores_imported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/analytics_data_point_spec.rb b/spec/models/analytics_data_point_spec.rb new file mode 100644 index 0000000..83b3297 --- /dev/null +++ b/spec/models/analytics_data_point_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::AnalyticsDataPoint +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnalyticsDataPoint' do + before do + # run before each test + @instance = TalonOne::AnalyticsDataPoint.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsDataPoint' do + it 'should create an instance of AnalyticsDataPoint' do + expect(@instance).to be_instance_of(TalonOne::AnalyticsDataPoint) + end + end + describe 'test attribute "total"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "influenced"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb b/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb new file mode 100644 index 0000000..5f0c99a --- /dev/null +++ b/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnalyticsDataPointWithTrendAndInfluencedRate' do + before do + # run before each test + @instance = TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsDataPointWithTrendAndInfluencedRate' do + it 'should create an instance of AnalyticsDataPointWithTrendAndInfluencedRate' do + expect(@instance).to be_instance_of(TalonOne::AnalyticsDataPointWithTrendAndInfluencedRate) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "influenced_rate"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trend"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb b/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb new file mode 100644 index 0000000..e556f8e --- /dev/null +++ b/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::AnalyticsDataPointWithTrendAndUplift +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnalyticsDataPointWithTrendAndUplift' do + before do + # run before each test + @instance = TalonOne::AnalyticsDataPointWithTrendAndUplift.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsDataPointWithTrendAndUplift' do + it 'should create an instance of AnalyticsDataPointWithTrendAndUplift' do + expect(@instance).to be_instance_of(TalonOne::AnalyticsDataPointWithTrendAndUplift) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "uplift"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trend"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/analytics_data_point_with_trend_spec.rb b/spec/models/analytics_data_point_with_trend_spec.rb new file mode 100644 index 0000000..c6f365a --- /dev/null +++ b/spec/models/analytics_data_point_with_trend_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::AnalyticsDataPointWithTrend +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnalyticsDataPointWithTrend' do + before do + # run before each test + @instance = TalonOne::AnalyticsDataPointWithTrend.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsDataPointWithTrend' do + it 'should create an instance of AnalyticsDataPointWithTrend' do + expect(@instance).to be_instance_of(TalonOne::AnalyticsDataPointWithTrend) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trend"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/application_campaign_analytics_spec.rb b/spec/models/application_campaign_analytics_spec.rb index 4c0218e..77edc66 100644 --- a/spec/models/application_campaign_analytics_spec.rb +++ b/spec/models/application_campaign_analytics_spec.rb @@ -65,31 +65,13 @@ describe 'test attribute "campaign_state"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["enabled", "disabled", "archived"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) # validator.allowable_values.each do |value| # expect { @instance.campaign_state = value }.not_to raise_error # end end end - describe 'test attribute "campaign_active_ruleset_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "campaign_start_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "campaign_end_time"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "total_revenue"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/application_campaign_stats_spec.rb b/spec/models/application_campaign_stats_spec.rb index f69cc97..5e6260f 100644 --- a/spec/models/application_campaign_stats_spec.rb +++ b/spec/models/application_campaign_stats_spec.rb @@ -32,12 +32,6 @@ expect(@instance).to be_instance_of(TalonOne::ApplicationCampaignStats) end end - describe 'test attribute "draft"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "disabled"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/application_cif_expression_spec.rb b/spec/models/application_cif_expression_spec.rb new file mode 100644 index 0000000..e604efb --- /dev/null +++ b/spec/models/application_cif_expression_spec.rb @@ -0,0 +1,71 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ApplicationCIFExpression +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ApplicationCIFExpression' do + before do + # run before each test + @instance = TalonOne::ApplicationCIFExpression.new + end + + after do + # run after each test + end + + describe 'test an instance of ApplicationCIFExpression' do + it 'should create an instance of ApplicationCIFExpression' do + expect(@instance).to be_instance_of(TalonOne::ApplicationCIFExpression) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cart_item_filter_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expression"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/application_cif_spec.rb b/spec/models/application_cif_spec.rb new file mode 100644 index 0000000..1747d58 --- /dev/null +++ b/spec/models/application_cif_spec.rb @@ -0,0 +1,89 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ApplicationCIF +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ApplicationCIF' do + before do + # run before each test + @instance = TalonOne::ApplicationCIF.new + end + + after do + # run after each test + end + + describe 'test an instance of ApplicationCIF' do + it 'should create an instance of ApplicationCIF' do + expect(@instance).to be_instance_of(TalonOne::ApplicationCIF) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_expression_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/application_spec.rb b/spec/models/application_spec.rb index 68db059..ebc525d 100644 --- a/spec/models/application_spec.rb +++ b/spec/models/application_spec.rb @@ -158,6 +158,18 @@ end end + describe 'test attribute "default_cart_item_filter_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "enable_campaign_state_management"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "loyalty_programs"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/async_coupon_deletion_job_response_spec.rb b/spec/models/async_coupon_deletion_job_response_spec.rb new file mode 100644 index 0000000..5c6a41f --- /dev/null +++ b/spec/models/async_coupon_deletion_job_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::AsyncCouponDeletionJobResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AsyncCouponDeletionJobResponse' do + before do + # run before each test + @instance = TalonOne::AsyncCouponDeletionJobResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of AsyncCouponDeletionJobResponse' do + it 'should create an instance of AsyncCouponDeletionJobResponse' do + expect(@instance).to be_instance_of(TalonOne::AsyncCouponDeletionJobResponse) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/attribute_spec.rb b/spec/models/attribute_spec.rb index 15388b5..436cd97 100644 --- a/spec/models/attribute_spec.rb +++ b/spec/models/attribute_spec.rb @@ -53,7 +53,7 @@ describe 'test attribute "entity"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) # validator.allowable_values.each do |value| # expect { @instance.entity = value }.not_to raise_error # end diff --git a/spec/models/base_loyalty_program_spec.rb b/spec/models/base_loyalty_program_spec.rb index 08bf503..26f49f2 100644 --- a/spec/models/base_loyalty_program_spec.rb +++ b/spec/models/base_loyalty_program_spec.rb @@ -80,16 +80,32 @@ end end + describe 'test attribute "program_join_policy"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + # validator.allowable_values.each do |value| + # expect { @instance.program_join_policy = value }.not_to raise_error + # end + end + end + describe 'test attribute "tiers_expiration_policy"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) # validator.allowable_values.each do |value| # expect { @instance.tiers_expiration_policy = value }.not_to raise_error # end end end + describe 'test attribute "tier_cycle_start_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "tiers_expire_in"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -106,13 +122,9 @@ end end - describe 'test attribute "program_join_policy"' do + describe 'test attribute "card_code_settings"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - # validator.allowable_values.each do |value| - # expect { @instance.program_join_policy = value }.not_to raise_error - # end end end diff --git a/spec/models/base_notification_spec.rb b/spec/models/base_notification_spec.rb index 1f8acae..214746f 100644 --- a/spec/models/base_notification_spec.rb +++ b/spec/models/base_notification_spec.rb @@ -59,7 +59,7 @@ describe 'test attribute "type"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "card_expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade"]) # validator.allowable_values.each do |value| # expect { @instance.type = value }.not_to raise_error # end diff --git a/spec/models/campaign_collection_edited_notification_spec.rb b/spec/models/campaign_collection_edited_notification_spec.rb new file mode 100644 index 0000000..e2320ff --- /dev/null +++ b/spec/models/campaign_collection_edited_notification_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CampaignCollectionEditedNotification +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CampaignCollectionEditedNotification' do + before do + # run before each test + @instance = TalonOne::CampaignCollectionEditedNotification.new + end + + after do + # run after each test + end + + describe 'test an instance of CampaignCollectionEditedNotification' do + it 'should create an instance of CampaignCollectionEditedNotification' do + expect(@instance).to be_instance_of(TalonOne::CampaignCollectionEditedNotification) + end + end + describe 'test attribute "campaign"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ruleset"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "collection"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/campaign_notification_policy_spec.rb b/spec/models/campaign_notification_policy_spec.rb index 95d923f..ed6fefe 100644 --- a/spec/models/campaign_notification_policy_spec.rb +++ b/spec/models/campaign_notification_policy_spec.rb @@ -38,4 +38,10 @@ end end + describe 'test attribute "batching_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/campaign_spec.rb b/spec/models/campaign_spec.rb index ddebb90..32f7040 100644 --- a/spec/models/campaign_spec.rb +++ b/spec/models/campaign_spec.rb @@ -287,11 +287,53 @@ describe 'test attribute "frontend_state"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "draft", "disabled", "archived"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"]) # validator.allowable_values.each do |value| # expect { @instance.frontend_state = value }.not_to raise_error # end end end + describe 'test attribute "stores_imported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "stage_revision"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/campaign_store_budget_spec.rb b/spec/models/campaign_store_budget_spec.rb new file mode 100644 index 0000000..4ce72ac --- /dev/null +++ b/spec/models/campaign_store_budget_spec.rb @@ -0,0 +1,65 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CampaignStoreBudget +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CampaignStoreBudget' do + before do + # run before each test + @instance = TalonOne::CampaignStoreBudget.new + end + + after do + # run after each test + end + + describe 'test an instance of CampaignStoreBudget' do + it 'should create an instance of CampaignStoreBudget' do + expect(@instance).to be_instance_of(TalonOne::CampaignStoreBudget) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "store_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limits"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/campaign_versions_spec.rb b/spec/models/campaign_versions_spec.rb new file mode 100644 index 0000000..8506dd1 --- /dev/null +++ b/spec/models/campaign_versions_spec.rb @@ -0,0 +1,71 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CampaignVersions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CampaignVersions' do + before do + # run before each test + @instance = TalonOne::CampaignVersions.new + end + + after do + # run after each test + end + + describe 'test an instance of CampaignVersions' do + it 'should create an instance of CampaignVersions' do + expect(@instance).to be_instance_of(TalonOne::CampaignVersions) + end + end + describe 'test attribute "active_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "stage_revision"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/card_added_deducted_points_notification_policy_spec.rb b/spec/models/card_added_deducted_points_notification_policy_spec.rb new file mode 100644 index 0000000..c0de5c5 --- /dev/null +++ b/spec/models/card_added_deducted_points_notification_policy_spec.rb @@ -0,0 +1,51 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CardAddedDeductedPointsNotificationPolicy +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CardAddedDeductedPointsNotificationPolicy' do + before do + # run before each test + @instance = TalonOne::CardAddedDeductedPointsNotificationPolicy.new + end + + after do + # run after each test + end + + describe 'test an instance of CardAddedDeductedPointsNotificationPolicy' do + it 'should create an instance of CardAddedDeductedPointsNotificationPolicy' do + expect(@instance).to be_instance_of(TalonOne::CardAddedDeductedPointsNotificationPolicy) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "scopes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["all", "campaign_manager", "management_api", "rule_engine"]) + # validator.allowable_values.each do |value| + # expect { @instance.scopes = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/coupon_deletion_filters_spec.rb b/spec/models/coupon_deletion_filters_spec.rb new file mode 100644 index 0000000..241c395 --- /dev/null +++ b/spec/models/coupon_deletion_filters_spec.rb @@ -0,0 +1,123 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CouponDeletionFilters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CouponDeletionFilters' do + before do + # run before each test + @instance = TalonOne::CouponDeletionFilters.new + end + + after do + # run after each test + end + + describe 'test an instance of CouponDeletionFilters' do + it 'should create an instance of CouponDeletionFilters' do + expect(@instance).to be_instance_of(TalonOne::CouponDeletionFilters) + end + end + describe 'test attribute "created_before"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_after"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "starts_after"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "starts_before"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "valid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["expired", "validNow", "validFuture"]) + # validator.allowable_values.each do |value| + # expect { @instance.valid = value }.not_to raise_error + # end + end + end + + describe 'test attribute "usable"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "redeemed"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "recipient_integration_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "exact_match"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "referral_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_after"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_before"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/coupon_deletion_job_spec.rb b/spec/models/coupon_deletion_job_spec.rb new file mode 100644 index 0000000..e0b31e3 --- /dev/null +++ b/spec/models/coupon_deletion_job_spec.rb @@ -0,0 +1,107 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::CouponDeletionJob +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CouponDeletionJob' do + before do + # run before each test + @instance = TalonOne::CouponDeletionJob.new + end + + after do + # run after each test + end + + describe 'test an instance of CouponDeletionJob' do + it 'should create an instance of CouponDeletionJob' do + expect(@instance).to be_instance_of(TalonOne::CouponDeletionJob) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "deleted_amount"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fail_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "communicated"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_i_ds"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/effect_entity_spec.rb b/spec/models/effect_entity_spec.rb index d22b7f1..a50b36c 100644 --- a/spec/models/effect_entity_spec.rb +++ b/spec/models/effect_entity_spec.rb @@ -80,4 +80,28 @@ end end + describe 'test attribute "evaluation_group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "evaluation_group_mode"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/effect_spec.rb b/spec/models/effect_spec.rb index 4a5bf47..659c7dd 100644 --- a/spec/models/effect_spec.rb +++ b/spec/models/effect_spec.rb @@ -80,6 +80,30 @@ end end + describe 'test attribute "evaluation_group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "evaluation_group_mode"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_revision_version_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "props"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index 6412d74..35c942c 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -116,4 +116,10 @@ end end + describe 'test attribute "application_cart_item_filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/generate_campaign_description_spec.rb b/spec/models/generate_campaign_description_spec.rb new file mode 100644 index 0000000..aaa69b5 --- /dev/null +++ b/spec/models/generate_campaign_description_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateCampaignDescription +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateCampaignDescription' do + before do + # run before each test + @instance = TalonOne::GenerateCampaignDescription.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateCampaignDescription' do + it 'should create an instance of GenerateCampaignDescription' do + expect(@instance).to be_instance_of(TalonOne::GenerateCampaignDescription) + end + end + describe 'test attribute "campaign_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_campaign_tags_spec.rb b/spec/models/generate_campaign_tags_spec.rb new file mode 100644 index 0000000..2dabcd4 --- /dev/null +++ b/spec/models/generate_campaign_tags_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateCampaignTags +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateCampaignTags' do + before do + # run before each test + @instance = TalonOne::GenerateCampaignTags.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateCampaignTags' do + it 'should create an instance of GenerateCampaignTags' do + expect(@instance).to be_instance_of(TalonOne::GenerateCampaignTags) + end + end + describe 'test attribute "campaign_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_item_filter_description_spec.rb b/spec/models/generate_item_filter_description_spec.rb new file mode 100644 index 0000000..7877c5e --- /dev/null +++ b/spec/models/generate_item_filter_description_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateItemFilterDescription +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateItemFilterDescription' do + before do + # run before each test + @instance = TalonOne::GenerateItemFilterDescription.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateItemFilterDescription' do + it 'should create an instance of GenerateItemFilterDescription' do + expect(@instance).to be_instance_of(TalonOne::GenerateItemFilterDescription) + end + end + describe 'test attribute "item_filter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_loyalty_card_spec.rb b/spec/models/generate_loyalty_card_spec.rb new file mode 100644 index 0000000..b81c293 --- /dev/null +++ b/spec/models/generate_loyalty_card_spec.rb @@ -0,0 +1,51 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateLoyaltyCard +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateLoyaltyCard' do + before do + # run before each test + @instance = TalonOne::GenerateLoyaltyCard.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateLoyaltyCard' do + it 'should create an instance of GenerateLoyaltyCard' do + expect(@instance).to be_instance_of(TalonOne::GenerateLoyaltyCard) + end + end + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "inactive"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "customer_profile_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_rule_title_rule_spec.rb b/spec/models/generate_rule_title_rule_spec.rb new file mode 100644 index 0000000..e8ad9b6 --- /dev/null +++ b/spec/models/generate_rule_title_rule_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateRuleTitleRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateRuleTitleRule' do + before do + # run before each test + @instance = TalonOne::GenerateRuleTitleRule.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateRuleTitleRule' do + it 'should create an instance of GenerateRuleTitleRule' do + expect(@instance).to be_instance_of(TalonOne::GenerateRuleTitleRule) + end + end + describe 'test attribute "effects"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "condition"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_rule_title_spec.rb b/spec/models/generate_rule_title_spec.rb new file mode 100644 index 0000000..c24a0b9 --- /dev/null +++ b/spec/models/generate_rule_title_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::GenerateRuleTitle +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'GenerateRuleTitle' do + before do + # run before each test + @instance = TalonOne::GenerateRuleTitle.new + end + + after do + # run after each test + end + + describe 'test an instance of GenerateRuleTitle' do + it 'should create an instance of GenerateRuleTitle' do + expect(@instance).to be_instance_of(TalonOne::GenerateRuleTitle) + end + end + describe 'test attribute "rule"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/loyalty_balance_with_tier_spec.rb b/spec/models/loyalty_balance_with_tier_spec.rb new file mode 100644 index 0000000..28a4d80 --- /dev/null +++ b/spec/models/loyalty_balance_with_tier_spec.rb @@ -0,0 +1,83 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::LoyaltyBalanceWithTier +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'LoyaltyBalanceWithTier' do + before do + # run before each test + @instance = TalonOne::LoyaltyBalanceWithTier.new + end + + after do + # run after each test + end + + describe 'test an instance of LoyaltyBalanceWithTier' do + it 'should create an instance of LoyaltyBalanceWithTier' do + expect(@instance).to be_instance_of(TalonOne::LoyaltyBalanceWithTier) + end + end + describe 'test attribute "active_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "pending_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "spent_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expired_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_tier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "projected_tier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "points_to_next_tier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "next_tier_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/loyalty_balances_with_tiers_spec.rb b/spec/models/loyalty_balances_with_tiers_spec.rb new file mode 100644 index 0000000..341b682 --- /dev/null +++ b/spec/models/loyalty_balances_with_tiers_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::LoyaltyBalancesWithTiers +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'LoyaltyBalancesWithTiers' do + before do + # run before each test + @instance = TalonOne::LoyaltyBalancesWithTiers.new + end + + after do + # run after each test + end + + describe 'test an instance of LoyaltyBalancesWithTiers' do + it 'should create an instance of LoyaltyBalancesWithTiers' do + expect(@instance).to be_instance_of(TalonOne::LoyaltyBalancesWithTiers) + end + end + describe 'test attribute "balance"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "subledger_balances"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/loyalty_card_batch_response_spec.rb b/spec/models/loyalty_card_batch_response_spec.rb new file mode 100644 index 0000000..582363b --- /dev/null +++ b/spec/models/loyalty_card_batch_response_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::LoyaltyCardBatchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'LoyaltyCardBatchResponse' do + before do + # run before each test + @instance = TalonOne::LoyaltyCardBatchResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of LoyaltyCardBatchResponse' do + it 'should create an instance of LoyaltyCardBatchResponse' do + expect(@instance).to be_instance_of(TalonOne::LoyaltyCardBatchResponse) + end + end + describe 'test attribute "number_of_cards_generated"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/loyalty_card_batch_spec.rb b/spec/models/loyalty_card_batch_spec.rb new file mode 100644 index 0000000..5aa725e --- /dev/null +++ b/spec/models/loyalty_card_batch_spec.rb @@ -0,0 +1,57 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::LoyaltyCardBatch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'LoyaltyCardBatch' do + before do + # run before each test + @instance = TalonOne::LoyaltyCardBatch.new + end + + after do + # run after each test + end + + describe 'test an instance of LoyaltyCardBatch' do + it 'should create an instance of LoyaltyCardBatch' do + expect(@instance).to be_instance_of(TalonOne::LoyaltyCardBatch) + end + end + describe 'test attribute "number_of_cards"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "inactive"]) + # validator.allowable_values.each do |value| + # expect { @instance.status = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/loyalty_card_spec.rb b/spec/models/loyalty_card_spec.rb index 8aadb31..a008e4a 100644 --- a/spec/models/loyalty_card_spec.rb +++ b/spec/models/loyalty_card_spec.rb @@ -56,6 +56,12 @@ end end + describe 'test attribute "block_reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "identifier"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -104,4 +110,10 @@ end end + describe 'test attribute "batch_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/loyalty_program_spec.rb b/spec/models/loyalty_program_spec.rb index 6e7d0e3..60efe7d 100644 --- a/spec/models/loyalty_program_spec.rb +++ b/spec/models/loyalty_program_spec.rb @@ -92,16 +92,32 @@ end end + describe 'test attribute "program_join_policy"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + # validator.allowable_values.each do |value| + # expect { @instance.program_join_policy = value }.not_to raise_error + # end + end + end + describe 'test attribute "tiers_expiration_policy"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) # validator.allowable_values.each do |value| # expect { @instance.tiers_expiration_policy = value }.not_to raise_error # end end end + describe 'test attribute "tier_cycle_start_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "tiers_expire_in"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -118,13 +134,9 @@ end end - describe 'test attribute "program_join_policy"' do + describe 'test attribute "card_code_settings"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - # validator.allowable_values.each do |value| - # expect { @instance.program_join_policy = value }.not_to raise_error - # end end end @@ -170,10 +182,22 @@ end end + describe 'test attribute "can_update_tier_expiration_policy"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "can_upgrade_to_advanced_tiers"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end + describe 'test attribute "can_update_subledgers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/new_app_wide_coupon_deletion_job_spec.rb b/spec/models/new_app_wide_coupon_deletion_job_spec.rb new file mode 100644 index 0000000..87f158d --- /dev/null +++ b/spec/models/new_app_wide_coupon_deletion_job_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::NewAppWideCouponDeletionJob +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'NewAppWideCouponDeletionJob' do + before do + # run before each test + @instance = TalonOne::NewAppWideCouponDeletionJob.new + end + + after do + # run after each test + end + + describe 'test an instance of NewAppWideCouponDeletionJob' do + it 'should create an instance of NewAppWideCouponDeletionJob' do + expect(@instance).to be_instance_of(TalonOne::NewAppWideCouponDeletionJob) + end + end + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaignids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/new_application_cif_expression_spec.rb b/spec/models/new_application_cif_expression_spec.rb new file mode 100644 index 0000000..4706200 --- /dev/null +++ b/spec/models/new_application_cif_expression_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::NewApplicationCIFExpression +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'NewApplicationCIFExpression' do + before do + # run before each test + @instance = TalonOne::NewApplicationCIFExpression.new + end + + after do + # run after each test + end + + describe 'test an instance of NewApplicationCIFExpression' do + it 'should create an instance of NewApplicationCIFExpression' do + expect(@instance).to be_instance_of(TalonOne::NewApplicationCIFExpression) + end + end + describe 'test attribute "cart_item_filter_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expression"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/new_application_cif_spec.rb b/spec/models/new_application_cif_spec.rb new file mode 100644 index 0000000..d61ce96 --- /dev/null +++ b/spec/models/new_application_cif_spec.rb @@ -0,0 +1,71 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::NewApplicationCIF +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'NewApplicationCIF' do + before do + # run before each test + @instance = TalonOne::NewApplicationCIF.new + end + + after do + # run after each test + end + + describe 'test an instance of NewApplicationCIF' do + it 'should create an instance of NewApplicationCIF' do + expect(@instance).to be_instance_of(TalonOne::NewApplicationCIF) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_expression_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/new_application_spec.rb b/spec/models/new_application_spec.rb index 58d256e..6b25199 100644 --- a/spec/models/new_application_spec.rb +++ b/spec/models/new_application_spec.rb @@ -134,4 +134,10 @@ end end + describe 'test attribute "enable_campaign_state_management"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/new_attribute_spec.rb b/spec/models/new_attribute_spec.rb index 88e22f1..1c8d096 100644 --- a/spec/models/new_attribute_spec.rb +++ b/spec/models/new_attribute_spec.rb @@ -35,7 +35,7 @@ describe 'test attribute "entity"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Account", "Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Application", "Campaign", "CustomerProfile", "CustomerSession", "CartItem", "Coupon", "Event", "Giveaway", "Referral", "Store"]) # validator.allowable_values.each do |value| # expect { @instance.entity = value }.not_to raise_error # end diff --git a/spec/models/new_coupon_deletion_job_spec.rb b/spec/models/new_coupon_deletion_job_spec.rb new file mode 100644 index 0000000..a47d4f9 --- /dev/null +++ b/spec/models/new_coupon_deletion_job_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::NewCouponDeletionJob +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'NewCouponDeletionJob' do + before do + # run before each test + @instance = TalonOne::NewCouponDeletionJob.new + end + + after do + # run after each test + end + + describe 'test an instance of NewCouponDeletionJob' do + it 'should create an instance of NewCouponDeletionJob' do + expect(@instance).to be_instance_of(TalonOne::NewCouponDeletionJob) + end + end + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/new_loyalty_program_spec.rb b/spec/models/new_loyalty_program_spec.rb index a2eabf0..364718c 100644 --- a/spec/models/new_loyalty_program_spec.rb +++ b/spec/models/new_loyalty_program_spec.rb @@ -80,16 +80,32 @@ end end + describe 'test attribute "program_join_policy"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + # validator.allowable_values.each do |value| + # expect { @instance.program_join_policy = value }.not_to raise_error + # end + end + end + describe 'test attribute "tiers_expiration_policy"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) # validator.allowable_values.each do |value| # expect { @instance.tiers_expiration_policy = value }.not_to raise_error # end end end + describe 'test attribute "tier_cycle_start_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "tiers_expire_in"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -106,13 +122,9 @@ end end - describe 'test attribute "program_join_policy"' do + describe 'test attribute "card_code_settings"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - # validator.allowable_values.each do |value| - # expect { @instance.program_join_policy = value }.not_to raise_error - # end end end diff --git a/spec/models/new_notification_test_spec.rb b/spec/models/new_notification_test_spec.rb index 8a3f030..183de4b 100644 --- a/spec/models/new_notification_test_spec.rb +++ b/spec/models/new_notification_test_spec.rb @@ -35,7 +35,7 @@ describe 'test attribute "type"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["campaign", "loyalty_added_deducted_points", "card_added_deducted_points", "coupon", "expiring_coupons", "expiring_points", "pending_to_active_points", "strikethrough_pricing", "tier_downgrade", "tier_upgrade", "tier_will_downgrade", "card_expiring_points"]) # validator.allowable_values.each do |value| # expect { @instance.type = value }.not_to raise_error # end diff --git a/spec/models/new_outgoing_integration_webhook_spec.rb b/spec/models/new_outgoing_integration_webhook_spec.rb index 296f687..b6f55e7 100644 --- a/spec/models/new_outgoing_integration_webhook_spec.rb +++ b/spec/models/new_outgoing_integration_webhook_spec.rb @@ -38,6 +38,12 @@ end end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "application_ids"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/new_revision_version_spec.rb b/spec/models/new_revision_version_spec.rb new file mode 100644 index 0000000..7048da2 --- /dev/null +++ b/spec/models/new_revision_version_spec.rb @@ -0,0 +1,105 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::NewRevisionVersion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'NewRevisionVersion' do + before do + # run before each test + @instance = TalonOne::NewRevisionVersion.new + end + + after do + # run after each test + end + + describe 'test an instance of NewRevisionVersion' do + it 'should create an instance of NewRevisionVersion' do + expect(@instance).to be_instance_of(TalonOne::NewRevisionVersion) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "end_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_ruleset_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "coupon_settings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "referral_settings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limits"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "features"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["coupons", "referrals", "loyalty", "giveaways", "strikethrough", "achievements"]) + # validator.allowable_values.each do |value| + # expect { @instance.features = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/new_webhook_spec.rb b/spec/models/new_webhook_spec.rb index 27734be..467eed0 100644 --- a/spec/models/new_webhook_spec.rb +++ b/spec/models/new_webhook_spec.rb @@ -44,6 +44,12 @@ end end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "verb"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/okta_event_payload_data_spec.rb b/spec/models/okta_event_payload_data_spec.rb new file mode 100644 index 0000000..615f841 --- /dev/null +++ b/spec/models/okta_event_payload_data_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::OktaEventPayloadData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OktaEventPayloadData' do + before do + # run before each test + @instance = TalonOne::OktaEventPayloadData.new + end + + after do + # run after each test + end + + describe 'test an instance of OktaEventPayloadData' do + it 'should create an instance of OktaEventPayloadData' do + expect(@instance).to be_instance_of(TalonOne::OktaEventPayloadData) + end + end + describe 'test attribute "events"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/okta_event_payload_spec.rb b/spec/models/okta_event_payload_spec.rb new file mode 100644 index 0000000..bb9338a --- /dev/null +++ b/spec/models/okta_event_payload_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::OktaEventPayload +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OktaEventPayload' do + before do + # run before each test + @instance = TalonOne::OktaEventPayload.new + end + + after do + # run after each test + end + + describe 'test an instance of OktaEventPayload' do + it 'should create an instance of OktaEventPayload' do + expect(@instance).to be_instance_of(TalonOne::OktaEventPayload) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/okta_event_spec.rb b/spec/models/okta_event_spec.rb new file mode 100644 index 0000000..ef4c6f8 --- /dev/null +++ b/spec/models/okta_event_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::OktaEvent +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OktaEvent' do + before do + # run before each test + @instance = TalonOne::OktaEvent.new + end + + after do + # run after each test + end + + describe 'test an instance of OktaEvent' do + it 'should create an instance of OktaEvent' do + expect(@instance).to be_instance_of(TalonOne::OktaEvent) + end + end + describe 'test attribute "event_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "target"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/okta_event_target_spec.rb b/spec/models/okta_event_target_spec.rb new file mode 100644 index 0000000..2ba60ae --- /dev/null +++ b/spec/models/okta_event_target_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::OktaEventTarget +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OktaEventTarget' do + before do + # run before each test + @instance = TalonOne::OktaEventTarget.new + end + + after do + # run after each test + end + + describe 'test an instance of OktaEventTarget' do + it 'should create an instance of OktaEventTarget' do + expect(@instance).to be_instance_of(TalonOne::OktaEventTarget) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "alternate_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/projected_tier_spec.rb b/spec/models/projected_tier_spec.rb new file mode 100644 index 0000000..5cf2b60 --- /dev/null +++ b/spec/models/projected_tier_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ProjectedTier +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ProjectedTier' do + before do + # run before each test + @instance = TalonOne::ProjectedTier.new + end + + after do + # run after each test + end + + describe 'test an instance of ProjectedTier' do + it 'should create an instance of ProjectedTier' do + expect(@instance).to be_instance_of(TalonOne::ProjectedTier) + end + end + describe 'test attribute "projected_active_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "stay_in_tier_points"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "projected_tier_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/reject_coupon_effect_props_spec.rb b/spec/models/reject_coupon_effect_props_spec.rb index 0235073..405e7b7 100644 --- a/spec/models/reject_coupon_effect_props_spec.rb +++ b/spec/models/reject_coupon_effect_props_spec.rb @@ -62,4 +62,10 @@ end end + describe 'test attribute "campaign_exclusion_reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/reject_referral_effect_props_spec.rb b/spec/models/reject_referral_effect_props_spec.rb index 623673d..383a9ed 100644 --- a/spec/models/reject_referral_effect_props_spec.rb +++ b/spec/models/reject_referral_effect_props_spec.rb @@ -62,4 +62,10 @@ end end + describe 'test attribute "campaign_exclusion_reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/revision_activation_spec.rb b/spec/models/revision_activation_spec.rb new file mode 100644 index 0000000..3b54dd4 --- /dev/null +++ b/spec/models/revision_activation_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::RevisionActivation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'RevisionActivation' do + before do + # run before each test + @instance = TalonOne::RevisionActivation.new + end + + after do + # run after each test + end + + describe 'test an instance of RevisionActivation' do + it 'should create an instance of RevisionActivation' do + expect(@instance).to be_instance_of(TalonOne::RevisionActivation) + end + end + describe 'test attribute "activate_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/revision_spec.rb b/spec/models/revision_spec.rb new file mode 100644 index 0000000..052b4b2 --- /dev/null +++ b/spec/models/revision_spec.rb @@ -0,0 +1,95 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::Revision +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'Revision' do + before do + # run before each test + @instance = TalonOne::Revision.new + end + + after do + # run after each test + end + + describe 'test an instance of Revision' do + it 'should create an instance of Revision' do + expect(@instance).to be_instance_of(TalonOne::Revision) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "activate_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "activated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "activated_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/revision_version_spec.rb b/spec/models/revision_version_spec.rb new file mode 100644 index 0000000..2c1fc66 --- /dev/null +++ b/spec/models/revision_version_spec.rb @@ -0,0 +1,153 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::RevisionVersion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'RevisionVersion' do + before do + # run before each test + @instance = TalonOne::RevisionVersion.new + end + + after do + # run after each test + end + + describe 'test an instance of RevisionVersion' do + it 'should create an instance of RevisionVersion' do + expect(@instance).to be_instance_of(TalonOne::RevisionVersion) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "campaign_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "revision_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "end_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_ruleset_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "coupon_settings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "referral_settings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limits"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "features"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["coupons", "referrals", "loyalty", "giveaways", "strikethrough", "achievements"]) + # validator.allowable_values.each do |value| + # expect { @instance.features = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb b/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb new file mode 100644 index 0000000..ed188f5 --- /dev/null +++ b/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb @@ -0,0 +1,71 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::RollbackIncreasedAchievementProgressEffectProps +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'RollbackIncreasedAchievementProgressEffectProps' do + before do + # run before each test + @instance = TalonOne::RollbackIncreasedAchievementProgressEffectProps.new + end + + after do + # run after each test + end + + describe 'test an instance of RollbackIncreasedAchievementProgressEffectProps' do + it 'should create an instance of RollbackIncreasedAchievementProgressEffectProps' do + expect(@instance).to be_instance_of(TalonOne::RollbackIncreasedAchievementProgressEffectProps) + end + end + describe 'test attribute "achievement_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "achievement_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "progress_tracker_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "decrease_progress_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "current_progress"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "target"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/rule_failure_reason_spec.rb b/spec/models/rule_failure_reason_spec.rb index 83e5151..dcbb722 100644 --- a/spec/models/rule_failure_reason_spec.rb +++ b/spec/models/rule_failure_reason_spec.rb @@ -104,4 +104,16 @@ end end + describe 'test attribute "evaluation_group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "evaluation_group_mode"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/scim_base_user_name_spec.rb b/spec/models/scim_base_user_name_spec.rb new file mode 100644 index 0000000..bf11f66 --- /dev/null +++ b/spec/models/scim_base_user_name_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimBaseUserName +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimBaseUserName' do + before do + # run before each test + @instance = TalonOne::ScimBaseUserName.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimBaseUserName' do + it 'should create an instance of ScimBaseUserName' do + expect(@instance).to be_instance_of(TalonOne::ScimBaseUserName) + end + end + describe 'test attribute "formatted"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_base_user_spec.rb b/spec/models/scim_base_user_spec.rb new file mode 100644 index 0000000..f5a2dc2 --- /dev/null +++ b/spec/models/scim_base_user_spec.rb @@ -0,0 +1,59 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimBaseUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimBaseUser' do + before do + # run before each test + @instance = TalonOne::ScimBaseUser.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimBaseUser' do + it 'should create an instance of ScimBaseUser' do + expect(@instance).to be_instance_of(TalonOne::ScimBaseUser) + end + end + describe 'test attribute "active"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_new_user_spec.rb b/spec/models/scim_new_user_spec.rb new file mode 100644 index 0000000..888e832 --- /dev/null +++ b/spec/models/scim_new_user_spec.rb @@ -0,0 +1,59 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimNewUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimNewUser' do + before do + # run before each test + @instance = TalonOne::ScimNewUser.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimNewUser' do + it 'should create an instance of ScimNewUser' do + expect(@instance).to be_instance_of(TalonOne::ScimNewUser) + end + end + describe 'test attribute "active"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_patch_operation_spec.rb b/spec/models/scim_patch_operation_spec.rb new file mode 100644 index 0000000..47dd587 --- /dev/null +++ b/spec/models/scim_patch_operation_spec.rb @@ -0,0 +1,57 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimPatchOperation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimPatchOperation' do + before do + # run before each test + @instance = TalonOne::ScimPatchOperation.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimPatchOperation' do + it 'should create an instance of ScimPatchOperation' do + expect(@instance).to be_instance_of(TalonOne::ScimPatchOperation) + end + end + describe 'test attribute "op"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["add", "remove", "replace"]) + # validator.allowable_values.each do |value| + # expect { @instance.op = value }.not_to raise_error + # end + end + end + + describe 'test attribute "path"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_patch_request_spec.rb b/spec/models/scim_patch_request_spec.rb new file mode 100644 index 0000000..c69a8ab --- /dev/null +++ b/spec/models/scim_patch_request_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimPatchRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimPatchRequest' do + before do + # run before each test + @instance = TalonOne::ScimPatchRequest.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimPatchRequest' do + it 'should create an instance of ScimPatchRequest' do + expect(@instance).to be_instance_of(TalonOne::ScimPatchRequest) + end + end + describe 'test attribute "schemas"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "operations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_resource_spec.rb b/spec/models/scim_resource_spec.rb new file mode 100644 index 0000000..154fde0 --- /dev/null +++ b/spec/models/scim_resource_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimResource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimResource' do + before do + # run before each test + @instance = TalonOne::ScimResource.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimResource' do + it 'should create an instance of ScimResource' do + expect(@instance).to be_instance_of(TalonOne::ScimResource) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_resource_types_list_response_spec.rb b/spec/models/scim_resource_types_list_response_spec.rb new file mode 100644 index 0000000..a564073 --- /dev/null +++ b/spec/models/scim_resource_types_list_response_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimResourceTypesListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimResourceTypesListResponse' do + before do + # run before each test + @instance = TalonOne::ScimResourceTypesListResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimResourceTypesListResponse' do + it 'should create an instance of ScimResourceTypesListResponse' do + expect(@instance).to be_instance_of(TalonOne::ScimResourceTypesListResponse) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_schema_resource_spec.rb b/spec/models/scim_schema_resource_spec.rb new file mode 100644 index 0000000..a4a6c9d --- /dev/null +++ b/spec/models/scim_schema_resource_spec.rb @@ -0,0 +1,59 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimSchemaResource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimSchemaResource' do + before do + # run before each test + @instance = TalonOne::ScimSchemaResource.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimSchemaResource' do + it 'should create an instance of ScimSchemaResource' do + expect(@instance).to be_instance_of(TalonOne::ScimSchemaResource) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_schemas_list_response_spec.rb b/spec/models/scim_schemas_list_response_spec.rb new file mode 100644 index 0000000..11e05a1 --- /dev/null +++ b/spec/models/scim_schemas_list_response_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimSchemasListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimSchemasListResponse' do + before do + # run before each test + @instance = TalonOne::ScimSchemasListResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimSchemasListResponse' do + it 'should create an instance of ScimSchemasListResponse' do + expect(@instance).to be_instance_of(TalonOne::ScimSchemasListResponse) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "schemas"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total_results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_service_provider_config_response_bulk_spec.rb b/spec/models/scim_service_provider_config_response_bulk_spec.rb new file mode 100644 index 0000000..e2ba3d6 --- /dev/null +++ b/spec/models/scim_service_provider_config_response_bulk_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimServiceProviderConfigResponseBulk +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimServiceProviderConfigResponseBulk' do + before do + # run before each test + @instance = TalonOne::ScimServiceProviderConfigResponseBulk.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimServiceProviderConfigResponseBulk' do + it 'should create an instance of ScimServiceProviderConfigResponseBulk' do + expect(@instance).to be_instance_of(TalonOne::ScimServiceProviderConfigResponseBulk) + end + end + describe 'test attribute "max_operations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "max_payload_size"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_service_provider_config_response_change_password_spec.rb b/spec/models/scim_service_provider_config_response_change_password_spec.rb new file mode 100644 index 0000000..f16a80b --- /dev/null +++ b/spec/models/scim_service_provider_config_response_change_password_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimServiceProviderConfigResponseChangePassword +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimServiceProviderConfigResponseChangePassword' do + before do + # run before each test + @instance = TalonOne::ScimServiceProviderConfigResponseChangePassword.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimServiceProviderConfigResponseChangePassword' do + it 'should create an instance of ScimServiceProviderConfigResponseChangePassword' do + expect(@instance).to be_instance_of(TalonOne::ScimServiceProviderConfigResponseChangePassword) + end + end + describe 'test attribute "supported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_service_provider_config_response_filter_spec.rb b/spec/models/scim_service_provider_config_response_filter_spec.rb new file mode 100644 index 0000000..db86f52 --- /dev/null +++ b/spec/models/scim_service_provider_config_response_filter_spec.rb @@ -0,0 +1,47 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimServiceProviderConfigResponseFilter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimServiceProviderConfigResponseFilter' do + before do + # run before each test + @instance = TalonOne::ScimServiceProviderConfigResponseFilter.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimServiceProviderConfigResponseFilter' do + it 'should create an instance of ScimServiceProviderConfigResponseFilter' do + expect(@instance).to be_instance_of(TalonOne::ScimServiceProviderConfigResponseFilter) + end + end + describe 'test attribute "max_results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_service_provider_config_response_patch_spec.rb b/spec/models/scim_service_provider_config_response_patch_spec.rb new file mode 100644 index 0000000..7a3dded --- /dev/null +++ b/spec/models/scim_service_provider_config_response_patch_spec.rb @@ -0,0 +1,41 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimServiceProviderConfigResponsePatch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimServiceProviderConfigResponsePatch' do + before do + # run before each test + @instance = TalonOne::ScimServiceProviderConfigResponsePatch.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimServiceProviderConfigResponsePatch' do + it 'should create an instance of ScimServiceProviderConfigResponsePatch' do + expect(@instance).to be_instance_of(TalonOne::ScimServiceProviderConfigResponsePatch) + end + end + describe 'test attribute "supported"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_service_provider_config_response_spec.rb b/spec/models/scim_service_provider_config_response_spec.rb new file mode 100644 index 0000000..85e8a0e --- /dev/null +++ b/spec/models/scim_service_provider_config_response_spec.rb @@ -0,0 +1,71 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimServiceProviderConfigResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimServiceProviderConfigResponse' do + before do + # run before each test + @instance = TalonOne::ScimServiceProviderConfigResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimServiceProviderConfigResponse' do + it 'should create an instance of ScimServiceProviderConfigResponse' do + expect(@instance).to be_instance_of(TalonOne::ScimServiceProviderConfigResponse) + end + end + describe 'test attribute "bulk"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "change_password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "documentation_uri"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "patch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "schemas"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_user_spec.rb b/spec/models/scim_user_spec.rb new file mode 100644 index 0000000..2e5386b --- /dev/null +++ b/spec/models/scim_user_spec.rb @@ -0,0 +1,65 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimUser' do + before do + # run before each test + @instance = TalonOne::ScimUser.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimUser' do + it 'should create an instance of ScimUser' do + expect(@instance).to be_instance_of(TalonOne::ScimUser) + end + end + describe 'test attribute "active"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/scim_users_list_response_spec.rb b/spec/models/scim_users_list_response_spec.rb new file mode 100644 index 0000000..c60ef8e --- /dev/null +++ b/spec/models/scim_users_list_response_spec.rb @@ -0,0 +1,53 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::ScimUsersListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ScimUsersListResponse' do + before do + # run before each test + @instance = TalonOne::ScimUsersListResponse.new + end + + after do + # run after each test + end + + describe 'test an instance of ScimUsersListResponse' do + it 'should create an instance of ScimUsersListResponse' do + expect(@instance).to be_instance_of(TalonOne::ScimUsersListResponse) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "schemas"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total_results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/sso_config_spec.rb b/spec/models/sso_config_spec.rb index 21fd2ec..e50a380 100644 --- a/spec/models/sso_config_spec.rb +++ b/spec/models/sso_config_spec.rb @@ -38,4 +38,10 @@ end end + describe 'test attribute "new_acs_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/tier_spec.rb b/spec/models/tier_spec.rb index ef7fc04..f997894 100644 --- a/spec/models/tier_spec.rb +++ b/spec/models/tier_spec.rb @@ -44,6 +44,12 @@ end end + describe 'test attribute "start_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "expiry_date"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/transfer_loyalty_card_spec.rb b/spec/models/transfer_loyalty_card_spec.rb index 6a0a93d..6bac85a 100644 --- a/spec/models/transfer_loyalty_card_spec.rb +++ b/spec/models/transfer_loyalty_card_spec.rb @@ -38,4 +38,10 @@ end end + describe 'test attribute "block_reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/update_application_cif_spec.rb b/spec/models/update_application_cif_spec.rb new file mode 100644 index 0000000..2fa8474 --- /dev/null +++ b/spec/models/update_application_cif_spec.rb @@ -0,0 +1,59 @@ +=begin +#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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + +The version of the OpenAPI document: + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 4.3.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for TalonOne::UpdateApplicationCIF +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'UpdateApplicationCIF' do + before do + # run before each test + @instance = TalonOne::UpdateApplicationCIF.new + end + + after do + # run after each test + end + + describe 'test an instance of UpdateApplicationCIF' do + it 'should create an instance of UpdateApplicationCIF' do + expect(@instance).to be_instance_of(TalonOne::UpdateApplicationCIF) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "active_expression_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "modified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_application_spec.rb b/spec/models/update_application_spec.rb index 35d8b3c..38d49a0 100644 --- a/spec/models/update_application_spec.rb +++ b/spec/models/update_application_spec.rb @@ -134,4 +134,16 @@ end end + describe 'test attribute "default_cart_item_filter_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "enable_campaign_state_management"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/update_loyalty_card_spec.rb b/spec/models/update_loyalty_card_spec.rb index 849ea75..c114e31 100644 --- a/spec/models/update_loyalty_card_spec.rb +++ b/spec/models/update_loyalty_card_spec.rb @@ -38,4 +38,10 @@ end end + describe 'test attribute "block_reason"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/update_loyalty_program_spec.rb b/spec/models/update_loyalty_program_spec.rb index 253cc1d..6f6add2 100644 --- a/spec/models/update_loyalty_program_spec.rb +++ b/spec/models/update_loyalty_program_spec.rb @@ -80,16 +80,32 @@ end end + describe 'test attribute "program_join_policy"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) + # validator.allowable_values.each do |value| + # expect { @instance.program_join_policy = value }.not_to raise_error + # end + end + end + describe 'test attribute "tiers_expiration_policy"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"]) # validator.allowable_values.each do |value| # expect { @instance.tiers_expiration_policy = value }.not_to raise_error # end end end + describe 'test attribute "tier_cycle_start_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "tiers_expire_in"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -106,13 +122,9 @@ end end - describe 'test attribute "program_join_policy"' do + describe 'test attribute "card_code_settings"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"]) - # validator.allowable_values.each do |value| - # expect { @instance.program_join_policy = value }.not_to raise_error - # end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index aa1d8e7..45ab6ce 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -132,4 +132,10 @@ end end + describe 'test attribute "additional_attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb index f4ed76a..21a2b87 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -62,6 +62,12 @@ end end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "verb"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/webhook_with_outgoing_integration_details_spec.rb b/spec/models/webhook_with_outgoing_integration_details_spec.rb index bd86402..9f412c9 100644 --- a/spec/models/webhook_with_outgoing_integration_details_spec.rb +++ b/spec/models/webhook_with_outgoing_integration_details_spec.rb @@ -62,6 +62,12 @@ end end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "verb"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers