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
@@ -15,6 +15,7 @@ require 'date'
|
|
15
15
|
module TalonOne
|
16
16
|
#
|
17
17
|
class BaseNotification
|
18
|
+
# Indicates which notification properties to apply.
|
18
19
|
attr_accessor :policy
|
19
20
|
|
20
21
|
# Indicates whether the notification is activated.
|
@@ -151,7 +152,7 @@ module TalonOne
|
|
151
152
|
return false if @id.nil?
|
152
153
|
return false if @id < 1
|
153
154
|
return false if @type.nil?
|
154
|
-
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"])
|
155
|
+
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"])
|
155
156
|
return false unless type_validator.valid?(@type)
|
156
157
|
true
|
157
158
|
end
|
@@ -173,7 +174,7 @@ module TalonOne
|
|
173
174
|
# Custom attribute writer method checking allowed values (enum).
|
174
175
|
# @param [Object] type Object to be assigned
|
175
176
|
def type=(type)
|
176
|
-
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"])
|
177
|
+
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"])
|
177
178
|
unless validator.valid?(type)
|
178
179
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
179
180
|
end
|
@@ -136,6 +136,27 @@ module TalonOne
|
|
136
136
|
# A campaign state described exactly as in the Campaign Manager.
|
137
137
|
attr_accessor :frontend_state
|
138
138
|
|
139
|
+
# Indicates whether the linked stores were imported via a CSV file.
|
140
|
+
attr_accessor :stores_imported
|
141
|
+
|
142
|
+
# ID of the revision that was last activated on this campaign.
|
143
|
+
attr_accessor :active_revision_id
|
144
|
+
|
145
|
+
# ID of the revision version that is active on the campaign.
|
146
|
+
attr_accessor :active_revision_version_id
|
147
|
+
|
148
|
+
# Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign.
|
149
|
+
attr_accessor :version
|
150
|
+
|
151
|
+
# ID of the revision currently being modified for the campaign.
|
152
|
+
attr_accessor :current_revision_id
|
153
|
+
|
154
|
+
# ID of the latest version applied on the current revision.
|
155
|
+
attr_accessor :current_revision_version_id
|
156
|
+
|
157
|
+
# Flag for determining whether we use current revision when sending requests with staging API key.
|
158
|
+
attr_accessor :stage_revision
|
159
|
+
|
139
160
|
class EnumAttributeValidator
|
140
161
|
attr_reader :datatype
|
141
162
|
attr_reader :allowable_values
|
@@ -201,7 +222,14 @@ module TalonOne
|
|
201
222
|
:'created_by' => :'createdBy',
|
202
223
|
:'updated_by' => :'updatedBy',
|
203
224
|
:'template_id' => :'templateId',
|
204
|
-
:'frontend_state' => :'frontendState'
|
225
|
+
:'frontend_state' => :'frontendState',
|
226
|
+
:'stores_imported' => :'storesImported',
|
227
|
+
:'active_revision_id' => :'activeRevisionId',
|
228
|
+
:'active_revision_version_id' => :'activeRevisionVersionId',
|
229
|
+
:'version' => :'version',
|
230
|
+
:'current_revision_id' => :'currentRevisionId',
|
231
|
+
:'current_revision_version_id' => :'currentRevisionVersionId',
|
232
|
+
:'stage_revision' => :'stageRevision'
|
205
233
|
}
|
206
234
|
end
|
207
235
|
|
@@ -248,7 +276,14 @@ module TalonOne
|
|
248
276
|
:'created_by' => :'String',
|
249
277
|
:'updated_by' => :'String',
|
250
278
|
:'template_id' => :'Integer',
|
251
|
-
:'frontend_state' => :'String'
|
279
|
+
:'frontend_state' => :'String',
|
280
|
+
:'stores_imported' => :'Boolean',
|
281
|
+
:'active_revision_id' => :'Integer',
|
282
|
+
:'active_revision_version_id' => :'Integer',
|
283
|
+
:'version' => :'Integer',
|
284
|
+
:'current_revision_id' => :'Integer',
|
285
|
+
:'current_revision_version_id' => :'Integer',
|
286
|
+
:'stage_revision' => :'Boolean'
|
252
287
|
}
|
253
288
|
end
|
254
289
|
|
@@ -452,6 +487,36 @@ module TalonOne
|
|
452
487
|
if attributes.key?(:'frontend_state')
|
453
488
|
self.frontend_state = attributes[:'frontend_state']
|
454
489
|
end
|
490
|
+
|
491
|
+
if attributes.key?(:'stores_imported')
|
492
|
+
self.stores_imported = attributes[:'stores_imported']
|
493
|
+
end
|
494
|
+
|
495
|
+
if attributes.key?(:'active_revision_id')
|
496
|
+
self.active_revision_id = attributes[:'active_revision_id']
|
497
|
+
end
|
498
|
+
|
499
|
+
if attributes.key?(:'active_revision_version_id')
|
500
|
+
self.active_revision_version_id = attributes[:'active_revision_version_id']
|
501
|
+
end
|
502
|
+
|
503
|
+
if attributes.key?(:'version')
|
504
|
+
self.version = attributes[:'version']
|
505
|
+
end
|
506
|
+
|
507
|
+
if attributes.key?(:'current_revision_id')
|
508
|
+
self.current_revision_id = attributes[:'current_revision_id']
|
509
|
+
end
|
510
|
+
|
511
|
+
if attributes.key?(:'current_revision_version_id')
|
512
|
+
self.current_revision_version_id = attributes[:'current_revision_version_id']
|
513
|
+
end
|
514
|
+
|
515
|
+
if attributes.key?(:'stage_revision')
|
516
|
+
self.stage_revision = attributes[:'stage_revision']
|
517
|
+
else
|
518
|
+
self.stage_revision = false
|
519
|
+
end
|
455
520
|
end
|
456
521
|
|
457
522
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -514,6 +579,10 @@ module TalonOne
|
|
514
579
|
invalid_properties.push('invalid value for "frontend_state", frontend_state cannot be nil.')
|
515
580
|
end
|
516
581
|
|
582
|
+
if @stores_imported.nil?
|
583
|
+
invalid_properties.push('invalid value for "stores_imported", stores_imported cannot be nil.')
|
584
|
+
end
|
585
|
+
|
517
586
|
invalid_properties
|
518
587
|
end
|
519
588
|
|
@@ -538,8 +607,9 @@ module TalonOne
|
|
538
607
|
return false unless type_validator.valid?(@type)
|
539
608
|
return false if @budgets.nil?
|
540
609
|
return false if @frontend_state.nil?
|
541
|
-
frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "
|
610
|
+
frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"])
|
542
611
|
return false unless frontend_state_validator.valid?(@frontend_state)
|
612
|
+
return false if @stores_imported.nil?
|
543
613
|
true
|
544
614
|
end
|
545
615
|
|
@@ -580,7 +650,7 @@ module TalonOne
|
|
580
650
|
# Custom attribute writer method checking allowed values (enum).
|
581
651
|
# @param [Object] frontend_state Object to be assigned
|
582
652
|
def frontend_state=(frontend_state)
|
583
|
-
validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "
|
653
|
+
validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"])
|
584
654
|
unless validator.valid?(frontend_state)
|
585
655
|
fail ArgumentError, "invalid value for \"frontend_state\", must be one of #{validator.allowable_values}."
|
586
656
|
end
|
@@ -632,7 +702,14 @@ module TalonOne
|
|
632
702
|
created_by == o.created_by &&
|
633
703
|
updated_by == o.updated_by &&
|
634
704
|
template_id == o.template_id &&
|
635
|
-
frontend_state == o.frontend_state
|
705
|
+
frontend_state == o.frontend_state &&
|
706
|
+
stores_imported == o.stores_imported &&
|
707
|
+
active_revision_id == o.active_revision_id &&
|
708
|
+
active_revision_version_id == o.active_revision_version_id &&
|
709
|
+
version == o.version &&
|
710
|
+
current_revision_id == o.current_revision_id &&
|
711
|
+
current_revision_version_id == o.current_revision_version_id &&
|
712
|
+
stage_revision == o.stage_revision
|
636
713
|
end
|
637
714
|
|
638
715
|
# @see the `==` method
|
@@ -644,7 +721,7 @@ module TalonOne
|
|
644
721
|
# Calculates hash code according to all attributes.
|
645
722
|
# @return [Integer] Hash code
|
646
723
|
def hash
|
647
|
-
[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
|
724
|
+
[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
|
648
725
|
end
|
649
726
|
|
650
727
|
# Builds the object from hash
|
@@ -0,0 +1,235 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#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}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
# A notification regarding a collection that was edited.
|
17
|
+
class CampaignCollectionEditedNotification
|
18
|
+
attr_accessor :campaign
|
19
|
+
|
20
|
+
attr_accessor :ruleset
|
21
|
+
|
22
|
+
attr_accessor :collection
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'campaign' => :'campaign',
|
28
|
+
:'ruleset' => :'ruleset',
|
29
|
+
:'collection' => :'collection'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'campaign' => :'Campaign',
|
37
|
+
:'ruleset' => :'Ruleset',
|
38
|
+
:'collection' => :'CollectionWithoutPayload'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CampaignCollectionEditedNotification` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
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
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'campaign')
|
64
|
+
self.campaign = attributes[:'campaign']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.key?(:'ruleset')
|
68
|
+
self.ruleset = attributes[:'ruleset']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'collection')
|
72
|
+
self.collection = attributes[:'collection']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
if @campaign.nil?
|
81
|
+
invalid_properties.push('invalid value for "campaign", campaign cannot be nil.')
|
82
|
+
end
|
83
|
+
|
84
|
+
if @collection.nil?
|
85
|
+
invalid_properties.push('invalid value for "collection", collection cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
return false if @campaign.nil?
|
95
|
+
return false if @collection.nil?
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def ==(o)
|
102
|
+
return true if self.equal?(o)
|
103
|
+
self.class == o.class &&
|
104
|
+
campaign == o.campaign &&
|
105
|
+
ruleset == o.ruleset &&
|
106
|
+
collection == o.collection
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Integer] Hash code
|
117
|
+
def hash
|
118
|
+
[campaign, ruleset, collection].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def self.build_from_hash(attributes)
|
125
|
+
new.build_from_hash(attributes)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
self.class.openapi_types.each_pair do |key, type|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :DateTime
|
155
|
+
DateTime.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
TalonOne.const_get(type).build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
if value.nil?
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
210
|
+
end
|
211
|
+
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
@@ -17,17 +17,22 @@ module TalonOne
|
|
17
17
|
# Notification name.
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
+
# Indicates whether batching is activated.
|
21
|
+
attr_accessor :batching_enabled
|
22
|
+
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
23
|
-
:'name' => :'name'
|
26
|
+
:'name' => :'name',
|
27
|
+
:'batching_enabled' => :'batchingEnabled'
|
24
28
|
}
|
25
29
|
end
|
26
30
|
|
27
31
|
# Attribute type mapping.
|
28
32
|
def self.openapi_types
|
29
33
|
{
|
30
|
-
:'name' => :'String'
|
34
|
+
:'name' => :'String',
|
35
|
+
:'batching_enabled' => :'Boolean'
|
31
36
|
}
|
32
37
|
end
|
33
38
|
|
@@ -55,6 +60,12 @@ module TalonOne
|
|
55
60
|
if attributes.key?(:'name')
|
56
61
|
self.name = attributes[:'name']
|
57
62
|
end
|
63
|
+
|
64
|
+
if attributes.key?(:'batching_enabled')
|
65
|
+
self.batching_enabled = attributes[:'batching_enabled']
|
66
|
+
else
|
67
|
+
self.batching_enabled = true
|
68
|
+
end
|
58
69
|
end
|
59
70
|
|
60
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -99,7 +110,8 @@ module TalonOne
|
|
99
110
|
def ==(o)
|
100
111
|
return true if self.equal?(o)
|
101
112
|
self.class == o.class &&
|
102
|
-
name == o.name
|
113
|
+
name == o.name &&
|
114
|
+
batching_enabled == o.batching_enabled
|
103
115
|
end
|
104
116
|
|
105
117
|
# @see the `==` method
|
@@ -111,7 +123,7 @@ module TalonOne
|
|
111
123
|
# Calculates hash code according to all attributes.
|
112
124
|
# @return [Integer] Hash code
|
113
125
|
def hash
|
114
|
-
[name].hash
|
126
|
+
[name, batching_enabled].hash
|
115
127
|
end
|
116
128
|
|
117
129
|
# Builds the object from hash
|
@@ -17,10 +17,10 @@ module TalonOne
|
|
17
17
|
class CampaignStateChangedNotification
|
18
18
|
attr_accessor :campaign
|
19
19
|
|
20
|
-
# The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', '
|
20
|
+
# The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived']
|
21
21
|
attr_accessor :old_state
|
22
22
|
|
23
|
-
# The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', '
|
23
|
+
# The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'archived']
|
24
24
|
attr_accessor :new_state
|
25
25
|
|
26
26
|
attr_accessor :ruleset
|