talon_one 5.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +77 -17
- data/docs/AchievementProgress.md +2 -0
- data/docs/AdditionalCampaignProperties.md +3 -1
- data/docs/AnalyticsDataPoint.md +19 -0
- data/docs/AnalyticsDataPointWithTrend.md +19 -0
- data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
- data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
- data/docs/Application.md +4 -0
- data/docs/ApplicationAnalyticsDataPoint.md +6 -6
- data/docs/ApplicationCIF.md +33 -0
- data/docs/ApplicationCIFExpression.md +27 -0
- data/docs/ApplicationCampaignAnalytics.md +13 -19
- data/docs/ApplicationCampaignStats.md +1 -3
- data/docs/AsyncCouponDeletionJobResponse.md +17 -0
- data/docs/BaseLoyaltyProgram.md +8 -4
- data/docs/BaseNotification.md +1 -1
- data/docs/BaseNotificationEntity.md +1 -1
- data/docs/Campaign.md +15 -1
- data/docs/CampaignCollectionEditedNotification.md +21 -0
- data/docs/CampaignNotificationPolicy.md +3 -1
- data/docs/CampaignStateChangedNotification.md +2 -2
- data/docs/CampaignStoreBudget.md +25 -0
- data/docs/CampaignVersions.md +27 -0
- data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
- data/docs/CartItem.md +1 -1
- data/docs/CodeGeneratorSettings.md +1 -1
- data/docs/Coupon.md +1 -1
- data/docs/CouponConstraints.md +1 -1
- data/docs/CouponCreationJob.md +1 -1
- data/docs/CouponDeletionFilters.md +43 -0
- data/docs/CouponDeletionJob.md +39 -0
- data/docs/CustomerSessionV2.md +2 -2
- data/docs/Effect.md +8 -0
- data/docs/EffectEntity.md +9 -1
- data/docs/Environment.md +3 -1
- data/docs/Event.md +1 -1
- data/docs/GenerateCampaignDescription.md +19 -0
- data/docs/GenerateCampaignTags.md +17 -0
- data/docs/GenerateItemFilterDescription.md +17 -0
- data/docs/GenerateLoyaltyCard.md +19 -0
- data/docs/GenerateRuleTitle.md +19 -0
- data/docs/GenerateRuleTitleRule.md +19 -0
- data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
- data/docs/IntegrationApi.md +67 -6
- data/docs/IntegrationCoupon.md +1 -1
- data/docs/InventoryCoupon.md +1 -1
- data/docs/InventoryReferral.md +1 -1
- data/docs/LoyaltyBalanceWithTier.md +31 -0
- data/docs/LoyaltyBalancesWithTiers.md +19 -0
- data/docs/LoyaltyCard.md +6 -2
- data/docs/LoyaltyCardBatch.md +21 -0
- data/docs/LoyaltyCardBatchResponse.md +19 -0
- data/docs/LoyaltyProgram.md +14 -6
- data/docs/ManagementApi.md +1044 -69
- data/docs/MessageLogResponse.md +3 -3
- data/docs/NewAppWideCouponDeletionJob.md +19 -0
- data/docs/NewApplication.md +3 -1
- data/docs/NewApplicationCIF.md +27 -0
- data/docs/NewApplicationCIFExpression.md +21 -0
- data/docs/NewBaseNotification.md +1 -1
- data/docs/NewCouponCreationJob.md +1 -1
- data/docs/NewCouponDeletionJob.md +17 -0
- data/docs/NewCoupons.md +1 -1
- data/docs/NewCouponsForMultipleRecipients.md +1 -1
- data/docs/NewCustomerSessionV2.md +2 -2
- data/docs/NewLoyaltyProgram.md +8 -4
- data/docs/NewOutgoingIntegrationWebhook.md +2 -0
- data/docs/NewReferral.md +1 -1
- data/docs/NewReferralsForMultipleAdvocates.md +1 -1
- data/docs/NewRevisionVersion.md +37 -0
- data/docs/NewWebhook.md +2 -0
- data/docs/OktaEvent.md +19 -0
- data/docs/OktaEventPayload.md +17 -0
- data/docs/OktaEventPayloadData.md +17 -0
- data/docs/OktaEventTarget.md +21 -0
- data/docs/ProjectedTier.md +21 -0
- data/docs/Referral.md +1 -1
- data/docs/ReferralConstraints.md +1 -1
- data/docs/RejectCouponEffectProps.md +3 -1
- data/docs/RejectReferralEffectProps.md +3 -1
- data/docs/Revision.md +35 -0
- data/docs/RevisionActivation.md +17 -0
- data/docs/RevisionVersion.md +53 -0
- data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
- data/docs/RuleFailureReason.md +5 -1
- data/docs/SSOConfig.md +3 -1
- data/docs/ScimBaseUser.md +23 -0
- data/docs/ScimBaseUserName.md +17 -0
- data/docs/ScimNewUser.md +23 -0
- data/docs/ScimPatchOperation.md +21 -0
- data/docs/ScimPatchRequest.md +19 -0
- data/docs/ScimResource.md +21 -0
- data/docs/ScimResourceTypesListResponse.md +17 -0
- data/docs/ScimSchemaResource.md +23 -0
- data/docs/ScimSchemasListResponse.md +21 -0
- data/docs/ScimServiceProviderConfigResponse.md +27 -0
- data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
- data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
- data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
- data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
- data/docs/ScimUser.md +25 -0
- data/docs/ScimUsersListResponse.md +21 -0
- data/docs/Tier.md +3 -1
- data/docs/TransferLoyaltyCard.md +3 -1
- data/docs/UpdateApplication.md +5 -1
- data/docs/UpdateApplicationCIF.md +23 -0
- data/docs/UpdateCampaign.md +1 -1
- data/docs/UpdateCoupon.md +1 -1
- data/docs/UpdateCouponBatch.md +1 -1
- data/docs/UpdateLoyaltyCard.md +4 -2
- data/docs/UpdateLoyaltyProgram.md +8 -4
- data/docs/UpdateReferral.md +1 -1
- data/docs/UpdateReferralBatch.md +1 -1
- data/docs/User.md +3 -1
- data/docs/Webhook.md +2 -0
- data/docs/WebhookWithOutgoingIntegrationDetails.md +2 -0
- data/lib/talon_one/api/integration_api.rb +83 -7
- data/lib/talon_one/api/management_api.rb +1127 -78
- data/lib/talon_one/models/achievement_progress.rb +16 -1
- data/lib/talon_one/models/additional_campaign_properties.rb +21 -6
- data/lib/talon_one/models/analytics_data_point.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
- data/lib/talon_one/models/application.rb +21 -1
- data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
- data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
- data/lib/talon_one/models/application_campaign_stats.rb +1 -16
- data/lib/talon_one/models/application_cif.rb +308 -0
- data/lib/talon_one/models/application_cif_expression.rb +275 -0
- data/lib/talon_one/models/async_coupon_deletion_job_response.rb +213 -0
- data/lib/talon_one/models/attribute.rb +2 -2
- data/lib/talon_one/models/base_loyalty_program.rb +44 -25
- data/lib/talon_one/models/base_notification.rb +3 -2
- data/lib/talon_one/models/base_notification_entity.rb +1 -0
- data/lib/talon_one/models/campaign.rb +83 -6
- data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
- data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
- data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
- data/lib/talon_one/models/campaign_store_budget.rb +275 -0
- data/lib/talon_one/models/campaign_versions.rb +259 -0
- data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
- data/lib/talon_one/models/cart_item.rb +1 -1
- data/lib/talon_one/models/code_generator_settings.rb +1 -1
- data/lib/talon_one/models/coupon.rb +1 -1
- data/lib/talon_one/models/coupon_constraints.rb +1 -1
- data/lib/talon_one/models/coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/coupon_deletion_filters.rb +375 -0
- data/lib/talon_one/models/coupon_deletion_job.rb +370 -0
- data/lib/talon_one/models/customer_session_v2.rb +2 -2
- data/lib/talon_one/models/effect.rb +41 -1
- data/lib/talon_one/models/effect_entity.rb +44 -4
- data/lib/talon_one/models/environment.rb +16 -4
- data/lib/talon_one/models/event.rb +0 -5
- data/lib/talon_one/models/generate_campaign_description.rb +227 -0
- data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
- data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
- data/lib/talon_one/models/generate_loyalty_card.rb +256 -0
- data/lib/talon_one/models/generate_rule_title.rb +226 -0
- data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
- data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
- data/lib/talon_one/models/integration_coupon.rb +1 -1
- data/lib/talon_one/models/inventory_coupon.rb +1 -1
- data/lib/talon_one/models/inventory_referral.rb +1 -1
- data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
- data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
- data/lib/talon_one/models/loyalty_card.rb +25 -5
- data/lib/talon_one/models/loyalty_card_batch.rb +304 -0
- data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
- data/lib/talon_one/models/loyalty_program.rb +70 -29
- data/lib/talon_one/models/message_log_response.rb +3 -22
- data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
- data/lib/talon_one/models/new_application.rb +14 -4
- data/lib/talon_one/models/new_application_cif.rb +262 -0
- data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
- data/lib/talon_one/models/new_attribute.rb +2 -2
- data/lib/talon_one/models/new_base_notification.rb +1 -0
- data/lib/talon_one/models/new_coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
- data/lib/talon_one/models/new_coupons.rb +1 -1
- data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +2 -2
- data/lib/talon_one/models/new_loyalty_program.rb +44 -25
- data/lib/talon_one/models/new_notification_test.rb +2 -2
- data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
- data/lib/talon_one/models/new_referral.rb +1 -1
- data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -1
- data/lib/talon_one/models/new_revision_version.rb +352 -0
- data/lib/talon_one/models/new_webhook.rb +11 -1
- data/lib/talon_one/models/okta_event.rb +229 -0
- data/lib/talon_one/models/okta_event_payload.rb +212 -0
- data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
- data/lib/talon_one/models/okta_event_target.rb +243 -0
- data/lib/talon_one/models/projected_tier.rb +232 -0
- data/lib/talon_one/models/referral.rb +1 -1
- data/lib/talon_one/models/referral_constraints.rb +1 -1
- data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
- data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
- data/lib/talon_one/models/revision.rb +319 -0
- data/lib/talon_one/models/revision_activation.rb +206 -0
- data/lib/talon_one/models/revision_version.rb +466 -0
- data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
- data/lib/talon_one/models/rule_failure_reason.rb +24 -4
- data/lib/talon_one/models/scim_base_user.rb +237 -0
- data/lib/talon_one/models/scim_base_user_name.rb +208 -0
- data/lib/talon_one/models/scim_new_user.rb +237 -0
- data/lib/talon_one/models/scim_patch_operation.rb +267 -0
- data/lib/talon_one/models/scim_patch_request.rb +226 -0
- data/lib/talon_one/models/scim_resource.rb +228 -0
- data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
- data/lib/talon_one/models/scim_schema_resource.rb +239 -0
- data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
- data/lib/talon_one/models/scim_service_provider_config_response.rb +256 -0
- data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
- data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
- data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
- data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
- data/lib/talon_one/models/scim_user.rb +252 -0
- data/lib/talon_one/models/scim_users_list_response.rb +236 -0
- data/lib/talon_one/models/sso_config.rb +14 -4
- data/lib/talon_one/models/tier.rb +12 -2
- data/lib/talon_one/models/transfer_loyalty_card.rb +14 -4
- data/lib/talon_one/models/update_application.rb +24 -4
- data/lib/talon_one/models/update_application_cif.rb +237 -0
- data/lib/talon_one/models/update_campaign.rb +1 -1
- data/lib/talon_one/models/update_coupon.rb +1 -1
- data/lib/talon_one/models/update_coupon_batch.rb +1 -1
- data/lib/talon_one/models/update_loyalty_card.rb +15 -5
- data/lib/talon_one/models/update_loyalty_program.rb +44 -25
- data/lib/talon_one/models/update_referral.rb +1 -1
- data/lib/talon_one/models/update_referral_batch.rb +1 -1
- data/lib/talon_one/models/user.rb +14 -4
- data/lib/talon_one/models/webhook.rb +11 -1
- data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +11 -1
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +54 -11
- data/spec/api/integration_api_spec.rb +18 -3
- data/spec/api/management_api_spec.rb +227 -23
- data/spec/models/achievement_progress_spec.rb +6 -0
- data/spec/models/additional_campaign_properties_spec.rb +7 -1
- data/spec/models/analytics_data_point_spec.rb +47 -0
- data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
- data/spec/models/application_campaign_analytics_spec.rb +1 -19
- data/spec/models/application_campaign_stats_spec.rb +0 -6
- data/spec/models/application_cif_expression_spec.rb +71 -0
- data/spec/models/application_cif_spec.rb +89 -0
- data/spec/models/application_spec.rb +12 -0
- data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
- data/spec/models/attribute_spec.rb +1 -1
- data/spec/models/base_loyalty_program_spec.rb +18 -6
- data/spec/models/base_notification_spec.rb +1 -1
- data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
- data/spec/models/campaign_notification_policy_spec.rb +6 -0
- data/spec/models/campaign_spec.rb +43 -1
- data/spec/models/campaign_store_budget_spec.rb +65 -0
- data/spec/models/campaign_versions_spec.rb +71 -0
- data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
- data/spec/models/coupon_deletion_filters_spec.rb +123 -0
- data/spec/models/coupon_deletion_job_spec.rb +107 -0
- data/spec/models/effect_entity_spec.rb +24 -0
- data/spec/models/effect_spec.rb +24 -0
- data/spec/models/environment_spec.rb +6 -0
- data/spec/models/generate_campaign_description_spec.rb +47 -0
- data/spec/models/generate_campaign_tags_spec.rb +41 -0
- data/spec/models/generate_item_filter_description_spec.rb +41 -0
- data/spec/models/generate_loyalty_card_spec.rb +51 -0
- data/spec/models/generate_rule_title_rule_spec.rb +47 -0
- data/spec/models/generate_rule_title_spec.rb +47 -0
- data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
- data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
- data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
- data/spec/models/loyalty_card_batch_spec.rb +57 -0
- data/spec/models/loyalty_card_spec.rb +12 -0
- data/spec/models/loyalty_program_spec.rb +30 -6
- data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
- data/spec/models/new_application_cif_expression_spec.rb +53 -0
- data/spec/models/new_application_cif_spec.rb +71 -0
- data/spec/models/new_application_spec.rb +6 -0
- data/spec/models/new_attribute_spec.rb +1 -1
- data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
- data/spec/models/new_loyalty_program_spec.rb +18 -6
- data/spec/models/new_notification_test_spec.rb +1 -1
- data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
- data/spec/models/new_revision_version_spec.rb +105 -0
- data/spec/models/new_webhook_spec.rb +6 -0
- data/spec/models/okta_event_payload_data_spec.rb +41 -0
- data/spec/models/okta_event_payload_spec.rb +41 -0
- data/spec/models/okta_event_spec.rb +47 -0
- data/spec/models/okta_event_target_spec.rb +53 -0
- data/spec/models/projected_tier_spec.rb +53 -0
- data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
- data/spec/models/reject_referral_effect_props_spec.rb +6 -0
- data/spec/models/revision_activation_spec.rb +41 -0
- data/spec/models/revision_spec.rb +95 -0
- data/spec/models/revision_version_spec.rb +153 -0
- data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
- data/spec/models/rule_failure_reason_spec.rb +12 -0
- data/spec/models/scim_base_user_name_spec.rb +41 -0
- data/spec/models/scim_base_user_spec.rb +59 -0
- data/spec/models/scim_new_user_spec.rb +59 -0
- data/spec/models/scim_patch_operation_spec.rb +57 -0
- data/spec/models/scim_patch_request_spec.rb +47 -0
- data/spec/models/scim_resource_spec.rb +53 -0
- data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
- data/spec/models/scim_schema_resource_spec.rb +59 -0
- data/spec/models/scim_schemas_list_response_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
- data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_spec.rb +71 -0
- data/spec/models/scim_user_spec.rb +65 -0
- data/spec/models/scim_users_list_response_spec.rb +53 -0
- data/spec/models/sso_config_spec.rb +6 -0
- data/spec/models/tier_spec.rb +6 -0
- data/spec/models/transfer_loyalty_card_spec.rb +6 -0
- data/spec/models/update_application_cif_spec.rb +59 -0
- data/spec/models/update_application_spec.rb +12 -0
- data/spec/models/update_loyalty_card_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +18 -6
- data/spec/models/user_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
- metadata +219 -3
data/docs/IntegrationApi.md
CHANGED
@@ -12,6 +12,7 @@ Method | HTTP request | Description
|
|
12
12
|
[**delete_audience_v2**](IntegrationApi.md#delete_audience_v2) | **DELETE** /v2/audiences/{audienceId} | Delete audience
|
13
13
|
[**delete_coupon_reservation**](IntegrationApi.md#delete_coupon_reservation) | **DELETE** /v1/coupon_reservations/{couponValue} | Delete coupon reservations
|
14
14
|
[**delete_customer_data**](IntegrationApi.md#delete_customer_data) | **DELETE** /v1/customer_data/{integrationId} | Delete customer's personal data
|
15
|
+
[**generate_loyalty_card**](IntegrationApi.md#generate_loyalty_card) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card
|
15
16
|
[**get_customer_inventory**](IntegrationApi.md#get_customer_inventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | List customer data
|
16
17
|
[**get_customer_session**](IntegrationApi.md#get_customer_session) | **GET** /v2/customer_sessions/{customerSessionId} | Get customer session
|
17
18
|
[**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)
|
|
471
472
|
- **Accept**: application/json
|
472
473
|
|
473
474
|
|
475
|
+
## generate_loyalty_card
|
476
|
+
|
477
|
+
> LoyaltyCard generate_loyalty_card(loyalty_program_id, body)
|
478
|
+
|
479
|
+
Generate loyalty card
|
480
|
+
|
481
|
+
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.
|
482
|
+
|
483
|
+
### Example
|
484
|
+
|
485
|
+
```ruby
|
486
|
+
# load the gem
|
487
|
+
require 'talon_one'
|
488
|
+
# setup authorization
|
489
|
+
TalonOne.configure do |config|
|
490
|
+
# Configure API key authorization: api_key_v1
|
491
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
492
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
493
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
494
|
+
end
|
495
|
+
|
496
|
+
api_instance = TalonOne::IntegrationApi.new
|
497
|
+
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.
|
498
|
+
body = TalonOne::GenerateLoyaltyCard.new # GenerateLoyaltyCard | body
|
499
|
+
|
500
|
+
begin
|
501
|
+
#Generate loyalty card
|
502
|
+
result = api_instance.generate_loyalty_card(loyalty_program_id, body)
|
503
|
+
p result
|
504
|
+
rescue TalonOne::ApiError => e
|
505
|
+
puts "Exception when calling IntegrationApi->generate_loyalty_card: #{e}"
|
506
|
+
end
|
507
|
+
```
|
508
|
+
|
509
|
+
### Parameters
|
510
|
+
|
511
|
+
|
512
|
+
Name | Type | Description | Notes
|
513
|
+
------------- | ------------- | ------------- | -------------
|
514
|
+
**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. |
|
515
|
+
**body** | [**GenerateLoyaltyCard**](GenerateLoyaltyCard.md)| body |
|
516
|
+
|
517
|
+
### Return type
|
518
|
+
|
519
|
+
[**LoyaltyCard**](LoyaltyCard.md)
|
520
|
+
|
521
|
+
### Authorization
|
522
|
+
|
523
|
+
[api_key_v1](../README.md#api_key_v1)
|
524
|
+
|
525
|
+
### HTTP request headers
|
526
|
+
|
527
|
+
- **Content-Type**: application/json
|
528
|
+
- **Accept**: application/json
|
529
|
+
|
530
|
+
|
474
531
|
## get_customer_inventory
|
475
532
|
|
476
533
|
> CustomerInventory get_customer_inventory(integration_id, opts)
|
@@ -595,7 +652,7 @@ Name | Type | Description | Notes
|
|
595
652
|
|
596
653
|
## get_loyalty_balances
|
597
654
|
|
598
|
-
>
|
655
|
+
> LoyaltyBalancesWithTiers get_loyalty_balances(loyalty_program_id, integration_id, opts)
|
599
656
|
|
600
657
|
Get customer's loyalty points
|
601
658
|
|
@@ -619,7 +676,9 @@ loyalty_program_id = 56 # Integer | Identifier of the profile-based loyalty prog
|
|
619
676
|
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.
|
620
677
|
opts = {
|
621
678
|
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.
|
622
|
-
subledger_id: 'subledger_id_example' # String | The ID of the subledger by which we filter the data.
|
679
|
+
subledger_id: 'subledger_id_example', # String | The ID of the subledger by which we filter the data.
|
680
|
+
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.
|
681
|
+
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.
|
623
682
|
}
|
624
683
|
|
625
684
|
begin
|
@@ -640,10 +699,12 @@ Name | Type | Description | Notes
|
|
640
699
|
**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. |
|
641
700
|
**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]
|
642
701
|
**subledger_id** | **String**| The ID of the subledger by which we filter the data. | [optional]
|
702
|
+
**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]
|
703
|
+
**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]
|
643
704
|
|
644
705
|
### Return type
|
645
706
|
|
646
|
-
[**
|
707
|
+
[**LoyaltyBalancesWithTiers**](LoyaltyBalancesWithTiers.md)
|
647
708
|
|
648
709
|
### Authorization
|
649
710
|
|
@@ -1221,7 +1282,7 @@ Name | Type | Description | Notes
|
|
1221
1282
|
|
1222
1283
|
Sync cart item catalog
|
1223
1284
|
|
1224
|
-
Perform
|
1285
|
+
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>
|
1225
1286
|
|
1226
1287
|
### Example
|
1227
1288
|
|
@@ -1640,7 +1701,7 @@ api_instance = TalonOne::IntegrationApi.new
|
|
1640
1701
|
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.
|
1641
1702
|
body = TalonOne::IntegrationRequest.new # IntegrationRequest | body
|
1642
1703
|
opts = {
|
1643
|
-
dry: true, # Boolean | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint
|
1704
|
+
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).
|
1644
1705
|
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`.
|
1645
1706
|
}
|
1646
1707
|
|
@@ -1660,7 +1721,7 @@ Name | Type | Description | Notes
|
|
1660
1721
|
------------- | ------------- | ------------- | -------------
|
1661
1722
|
**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. |
|
1662
1723
|
**body** | [**IntegrationRequest**](IntegrationRequest.md)| body |
|
1663
|
-
**dry** | **Boolean**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint
|
1724
|
+
**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]
|
1664
1725
|
**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]
|
1665
1726
|
|
1666
1727
|
### Return type
|
data/docs/IntegrationCoupon.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional]
|
13
13
|
**reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional]
|
14
14
|
**start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional]
|
15
|
-
**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted
|
15
|
+
**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional]
|
16
16
|
**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]
|
17
17
|
**usage_counter** | **Integer** | The number of times the coupon has been successfully redeemed. |
|
18
18
|
**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]
|
data/docs/InventoryCoupon.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**discount_limit** | **Float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional]
|
13
13
|
**reservation_limit** | **Integer** | The number of reservations that can be made with this coupon code. | [optional]
|
14
14
|
**start_date** | **DateTime** | Timestamp at which point the coupon becomes valid. | [optional]
|
15
|
-
**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted
|
15
|
+
**expiry_date** | **DateTime** | Expiration date of the coupon. Coupon never expires if this is omitted. | [optional]
|
16
16
|
**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]
|
17
17
|
**usage_counter** | **Integer** | The number of times the coupon has been successfully redeemed. |
|
18
18
|
**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]
|
data/docs/InventoryReferral.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**id** | **Integer** | Internal ID of this entity. |
|
8
8
|
**created** | **DateTime** | The time this entity was created. |
|
9
9
|
**start_date** | **DateTime** | Timestamp at which point the referral code becomes valid. | [optional]
|
10
|
-
**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted
|
10
|
+
**expiry_date** | **DateTime** | Expiration date of the referral code. Referral never expires if this is omitted. | [optional]
|
11
11
|
**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. |
|
12
12
|
**campaign_id** | **Integer** | ID of the campaign from which the referral received the referral code. |
|
13
13
|
**advocate_profile_integration_id** | **String** | The Integration ID of the Advocate's Profile. |
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# TalonOne::LoyaltyBalanceWithTier
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**active_points** | **Float** | Total amount of points awarded to this customer and available to spend. | [optional]
|
8
|
+
**pending_points** | **Float** | Total amount of points awarded to this customer but not available until their start date. | [optional]
|
9
|
+
**spent_points** | **Float** | Total amount of points already spent by this customer. | [optional]
|
10
|
+
**expired_points** | **Float** | Total amount of points awarded but never redeemed. They cannot be used anymore. | [optional]
|
11
|
+
**current_tier** | [**Tier**](Tier.md) | | [optional]
|
12
|
+
**projected_tier** | [**ProjectedTier**](ProjectedTier.md) | | [optional]
|
13
|
+
**points_to_next_tier** | **Float** | The number of points required to move up a tier. | [optional]
|
14
|
+
**next_tier_name** | **String** | The name of the tier consecutive to the current tier. | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'TalonOne'
|
20
|
+
|
21
|
+
instance = TalonOne::LoyaltyBalanceWithTier.new(active_points: 286.0,
|
22
|
+
pending_points: 50.0,
|
23
|
+
spent_points: 150.0,
|
24
|
+
expired_points: 286.0,
|
25
|
+
current_tier: null,
|
26
|
+
projected_tier: null,
|
27
|
+
points_to_next_tier: 20.0,
|
28
|
+
next_tier_name: silver)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# TalonOne::LoyaltyBalancesWithTiers
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**balance** | [**LoyaltyBalanceWithTier**](LoyaltyBalanceWithTier.md) | | [optional]
|
8
|
+
**subledger_balances** | [**Hash<String, LoyaltyBalanceWithTier>**](LoyaltyBalanceWithTier.md) | Map of the loyalty balances of the subledgers of a ledger. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'TalonOne'
|
14
|
+
|
15
|
+
instance = TalonOne::LoyaltyBalancesWithTiers.new(balance: null,
|
16
|
+
subledger_balances: {"mysubledger":{"activePoints":286,"pendingPoints":50,"spentPoints":150,"expiredPoints":25}})
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/LoyaltyCard.md
CHANGED
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
|
|
7
7
|
**id** | **Integer** | Internal ID of this entity. |
|
8
8
|
**created** | **DateTime** | The time this entity was created. |
|
9
9
|
**program_id** | **Integer** | The ID of the loyalty program that owns this entity. |
|
10
|
-
**status** | **String** | Status of the loyalty card. Can be
|
10
|
+
**status** | **String** | Status of the loyalty card. Can be `active` or `inactive`. |
|
11
|
+
**block_reason** | **String** | Reason for transferring and blocking the loyalty card. | [optional]
|
11
12
|
**identifier** | **String** | The alphanumeric identifier of the loyalty card. |
|
12
13
|
**users_per_card_limit** | **Integer** | The max amount of customer profiles that can be linked to the card. 0 means unlimited. |
|
13
14
|
**profiles** | [**Array<LoyaltyCardProfileRegistration>**](LoyaltyCardProfileRegistration.md) | Integration IDs of the customers profiles linked to the card. | [optional]
|
@@ -16,6 +17,7 @@ Name | Type | Description | Notes
|
|
16
17
|
**modified** | **DateTime** | Timestamp of the most recent update of the loyalty card. | [optional]
|
17
18
|
**old_card_identifier** | **String** | The alphanumeric identifier of the loyalty card. | [optional]
|
18
19
|
**new_card_identifier** | **String** | The alphanumeric identifier of the loyalty card. | [optional]
|
20
|
+
**batch_id** | **String** | The ID of the batch in which the loyalty card was created. | [optional]
|
19
21
|
|
20
22
|
## Code Sample
|
21
23
|
|
@@ -26,6 +28,7 @@ instance = TalonOne::LoyaltyCard.new(id: 6,
|
|
26
28
|
created: 2020-06-10T09:05:27.993483Z,
|
27
29
|
program_id: 125,
|
28
30
|
status: active,
|
31
|
+
block_reason: Current card lost. Customer needs a new card.,
|
29
32
|
identifier: summer-loyalty-card-0543,
|
30
33
|
users_per_card_limit: 111,
|
31
34
|
profiles: null,
|
@@ -33,7 +36,8 @@ instance = TalonOne::LoyaltyCard.new(id: 6,
|
|
33
36
|
subledgers: null,
|
34
37
|
modified: 2021-09-12T10:12:42Z,
|
35
38
|
old_card_identifier: summer-loyalty-card-0543,
|
36
|
-
new_card_identifier: summer-loyalty-card-0543
|
39
|
+
new_card_identifier: summer-loyalty-card-0543,
|
40
|
+
batch_id: wdefpov)
|
37
41
|
```
|
38
42
|
|
39
43
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# TalonOne::LoyaltyCardBatch
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**number_of_cards** | **Integer** | Number of loyalty cards in the batch. |
|
8
|
+
**batch_id** | **String** | ID of the loyalty card batch. | [optional]
|
9
|
+
**status** | **String** | Status of the loyalty cards in the batch. | [optional] [default to 'active']
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'TalonOne'
|
15
|
+
|
16
|
+
instance = TalonOne::LoyaltyCardBatch.new(number_of_cards: 5000,
|
17
|
+
batch_id: hwernpjz,
|
18
|
+
status: active)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# TalonOne::LoyaltyCardBatchResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**number_of_cards_generated** | **Integer** | Number of loyalty cards in the batch. |
|
8
|
+
**batch_id** | **String** | ID of the loyalty card batch. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'TalonOne'
|
14
|
+
|
15
|
+
instance = TalonOne::LoyaltyCardBatchResponse.new(number_of_cards_generated: 5000,
|
16
|
+
batch_id: hwernpjz)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/LoyaltyProgram.md
CHANGED
@@ -14,18 +14,22 @@ Name | Type | Description | Notes
|
|
14
14
|
**allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. |
|
15
15
|
**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]
|
16
16
|
**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. |
|
17
|
-
**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]
|
18
|
-
**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]
|
19
|
-
**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]
|
20
17
|
**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]
|
18
|
+
**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]
|
19
|
+
**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]
|
20
|
+
**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]
|
21
|
+
**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]
|
22
|
+
**card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional]
|
21
23
|
**account_id** | **Integer** | The ID of the Talon.One account that owns this program. |
|
22
24
|
**name** | **String** | The internal name for the Loyalty Program. This is an immutable value. |
|
23
25
|
**tiers** | [**Array<LoyaltyTier>**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional]
|
24
26
|
**timezone** | **String** | A string containing an IANA timezone descriptor. |
|
25
27
|
**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]
|
26
28
|
**can_update_tiers** | **Boolean** | `True` if the tier definitions can be updated. | [optional] [default to false]
|
27
|
-
**can_update_join_policy** | **Boolean** |
|
29
|
+
**can_update_join_policy** | **Boolean** | `True` if the program join policy can be updated. | [optional]
|
30
|
+
**can_update_tier_expiration_policy** | **Boolean** | `True` if the tier expiration policy can be updated. | [optional]
|
28
31
|
**can_upgrade_to_advanced_tiers** | **Boolean** | `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. | [optional] [default to false]
|
32
|
+
**can_update_subledgers** | **Boolean** | `True` if the `allowSubledger` property can be updated in the loyalty program. | [optional] [default to false]
|
29
33
|
|
30
34
|
## Code Sample
|
31
35
|
|
@@ -42,10 +46,12 @@ instance = TalonOne::LoyaltyProgram.new(id: null,
|
|
42
46
|
allow_subledger: false,
|
43
47
|
users_per_card_limit: 111,
|
44
48
|
sandbox: true,
|
49
|
+
program_join_policy: null,
|
45
50
|
tiers_expiration_policy: null,
|
51
|
+
tier_cycle_start_date: 2021-09-12T10:12:42Z,
|
46
52
|
tiers_expire_in: 27W_U,
|
47
53
|
tiers_downgrade_policy: null,
|
48
|
-
|
54
|
+
card_code_settings: null,
|
49
55
|
account_id: 1,
|
50
56
|
name: my_program,
|
51
57
|
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,
|
|
53
59
|
card_based: true,
|
54
60
|
can_update_tiers: true,
|
55
61
|
can_update_join_policy: true,
|
56
|
-
|
62
|
+
can_update_tier_expiration_policy: true,
|
63
|
+
can_upgrade_to_advanced_tiers: true,
|
64
|
+
can_update_subledgers: true)
|
57
65
|
```
|
58
66
|
|
59
67
|
|