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.
Files changed (327) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +77 -17
  3. data/docs/AchievementProgress.md +2 -0
  4. data/docs/AdditionalCampaignProperties.md +3 -1
  5. data/docs/AnalyticsDataPoint.md +19 -0
  6. data/docs/AnalyticsDataPointWithTrend.md +19 -0
  7. data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
  8. data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
  9. data/docs/Application.md +4 -0
  10. data/docs/ApplicationAnalyticsDataPoint.md +6 -6
  11. data/docs/ApplicationCIF.md +33 -0
  12. data/docs/ApplicationCIFExpression.md +27 -0
  13. data/docs/ApplicationCampaignAnalytics.md +13 -19
  14. data/docs/ApplicationCampaignStats.md +1 -3
  15. data/docs/AsyncCouponDeletionJobResponse.md +17 -0
  16. data/docs/BaseLoyaltyProgram.md +8 -4
  17. data/docs/BaseNotification.md +1 -1
  18. data/docs/BaseNotificationEntity.md +1 -1
  19. data/docs/Campaign.md +15 -1
  20. data/docs/CampaignCollectionEditedNotification.md +21 -0
  21. data/docs/CampaignNotificationPolicy.md +3 -1
  22. data/docs/CampaignStateChangedNotification.md +2 -2
  23. data/docs/CampaignStoreBudget.md +25 -0
  24. data/docs/CampaignVersions.md +27 -0
  25. data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
  26. data/docs/CartItem.md +1 -1
  27. data/docs/CodeGeneratorSettings.md +1 -1
  28. data/docs/Coupon.md +1 -1
  29. data/docs/CouponConstraints.md +1 -1
  30. data/docs/CouponCreationJob.md +1 -1
  31. data/docs/CouponDeletionFilters.md +43 -0
  32. data/docs/CouponDeletionJob.md +39 -0
  33. data/docs/CustomerSessionV2.md +2 -2
  34. data/docs/Effect.md +8 -0
  35. data/docs/EffectEntity.md +9 -1
  36. data/docs/Environment.md +3 -1
  37. data/docs/Event.md +1 -1
  38. data/docs/GenerateCampaignDescription.md +19 -0
  39. data/docs/GenerateCampaignTags.md +17 -0
  40. data/docs/GenerateItemFilterDescription.md +17 -0
  41. data/docs/GenerateLoyaltyCard.md +19 -0
  42. data/docs/GenerateRuleTitle.md +19 -0
  43. data/docs/GenerateRuleTitleRule.md +19 -0
  44. data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
  45. data/docs/IntegrationApi.md +67 -6
  46. data/docs/IntegrationCoupon.md +1 -1
  47. data/docs/InventoryCoupon.md +1 -1
  48. data/docs/InventoryReferral.md +1 -1
  49. data/docs/LoyaltyBalanceWithTier.md +31 -0
  50. data/docs/LoyaltyBalancesWithTiers.md +19 -0
  51. data/docs/LoyaltyCard.md +6 -2
  52. data/docs/LoyaltyCardBatch.md +21 -0
  53. data/docs/LoyaltyCardBatchResponse.md +19 -0
  54. data/docs/LoyaltyProgram.md +14 -6
  55. data/docs/ManagementApi.md +1044 -69
  56. data/docs/MessageLogResponse.md +3 -3
  57. data/docs/NewAppWideCouponDeletionJob.md +19 -0
  58. data/docs/NewApplication.md +3 -1
  59. data/docs/NewApplicationCIF.md +27 -0
  60. data/docs/NewApplicationCIFExpression.md +21 -0
  61. data/docs/NewBaseNotification.md +1 -1
  62. data/docs/NewCouponCreationJob.md +1 -1
  63. data/docs/NewCouponDeletionJob.md +17 -0
  64. data/docs/NewCoupons.md +1 -1
  65. data/docs/NewCouponsForMultipleRecipients.md +1 -1
  66. data/docs/NewCustomerSessionV2.md +2 -2
  67. data/docs/NewLoyaltyProgram.md +8 -4
  68. data/docs/NewOutgoingIntegrationWebhook.md +2 -0
  69. data/docs/NewReferral.md +1 -1
  70. data/docs/NewReferralsForMultipleAdvocates.md +1 -1
  71. data/docs/NewRevisionVersion.md +37 -0
  72. data/docs/NewWebhook.md +2 -0
  73. data/docs/OktaEvent.md +19 -0
  74. data/docs/OktaEventPayload.md +17 -0
  75. data/docs/OktaEventPayloadData.md +17 -0
  76. data/docs/OktaEventTarget.md +21 -0
  77. data/docs/ProjectedTier.md +21 -0
  78. data/docs/Referral.md +1 -1
  79. data/docs/ReferralConstraints.md +1 -1
  80. data/docs/RejectCouponEffectProps.md +3 -1
  81. data/docs/RejectReferralEffectProps.md +3 -1
  82. data/docs/Revision.md +35 -0
  83. data/docs/RevisionActivation.md +17 -0
  84. data/docs/RevisionVersion.md +53 -0
  85. data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
  86. data/docs/RuleFailureReason.md +5 -1
  87. data/docs/SSOConfig.md +3 -1
  88. data/docs/ScimBaseUser.md +23 -0
  89. data/docs/ScimBaseUserName.md +17 -0
  90. data/docs/ScimNewUser.md +23 -0
  91. data/docs/ScimPatchOperation.md +21 -0
  92. data/docs/ScimPatchRequest.md +19 -0
  93. data/docs/ScimResource.md +21 -0
  94. data/docs/ScimResourceTypesListResponse.md +17 -0
  95. data/docs/ScimSchemaResource.md +23 -0
  96. data/docs/ScimSchemasListResponse.md +21 -0
  97. data/docs/ScimServiceProviderConfigResponse.md +27 -0
  98. data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
  99. data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
  100. data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
  101. data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
  102. data/docs/ScimUser.md +25 -0
  103. data/docs/ScimUsersListResponse.md +21 -0
  104. data/docs/Tier.md +3 -1
  105. data/docs/TransferLoyaltyCard.md +3 -1
  106. data/docs/UpdateApplication.md +5 -1
  107. data/docs/UpdateApplicationCIF.md +23 -0
  108. data/docs/UpdateCampaign.md +1 -1
  109. data/docs/UpdateCoupon.md +1 -1
  110. data/docs/UpdateCouponBatch.md +1 -1
  111. data/docs/UpdateLoyaltyCard.md +4 -2
  112. data/docs/UpdateLoyaltyProgram.md +8 -4
  113. data/docs/UpdateReferral.md +1 -1
  114. data/docs/UpdateReferralBatch.md +1 -1
  115. data/docs/User.md +3 -1
  116. data/docs/Webhook.md +2 -0
  117. data/docs/WebhookWithOutgoingIntegrationDetails.md +2 -0
  118. data/lib/talon_one/api/integration_api.rb +83 -7
  119. data/lib/talon_one/api/management_api.rb +1127 -78
  120. data/lib/talon_one/models/achievement_progress.rb +16 -1
  121. data/lib/talon_one/models/additional_campaign_properties.rb +21 -6
  122. data/lib/talon_one/models/analytics_data_point.rb +225 -0
  123. data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
  124. data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
  125. data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
  126. data/lib/talon_one/models/application.rb +21 -1
  127. data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
  128. data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
  129. data/lib/talon_one/models/application_campaign_stats.rb +1 -16
  130. data/lib/talon_one/models/application_cif.rb +308 -0
  131. data/lib/talon_one/models/application_cif_expression.rb +275 -0
  132. data/lib/talon_one/models/async_coupon_deletion_job_response.rb +213 -0
  133. data/lib/talon_one/models/attribute.rb +2 -2
  134. data/lib/talon_one/models/base_loyalty_program.rb +44 -25
  135. data/lib/talon_one/models/base_notification.rb +3 -2
  136. data/lib/talon_one/models/base_notification_entity.rb +1 -0
  137. data/lib/talon_one/models/campaign.rb +83 -6
  138. data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
  139. data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
  140. data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
  141. data/lib/talon_one/models/campaign_store_budget.rb +275 -0
  142. data/lib/talon_one/models/campaign_versions.rb +259 -0
  143. data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
  144. data/lib/talon_one/models/cart_item.rb +1 -1
  145. data/lib/talon_one/models/code_generator_settings.rb +1 -1
  146. data/lib/talon_one/models/coupon.rb +1 -1
  147. data/lib/talon_one/models/coupon_constraints.rb +1 -1
  148. data/lib/talon_one/models/coupon_creation_job.rb +1 -1
  149. data/lib/talon_one/models/coupon_deletion_filters.rb +375 -0
  150. data/lib/talon_one/models/coupon_deletion_job.rb +370 -0
  151. data/lib/talon_one/models/customer_session_v2.rb +2 -2
  152. data/lib/talon_one/models/effect.rb +41 -1
  153. data/lib/talon_one/models/effect_entity.rb +44 -4
  154. data/lib/talon_one/models/environment.rb +16 -4
  155. data/lib/talon_one/models/event.rb +0 -5
  156. data/lib/talon_one/models/generate_campaign_description.rb +227 -0
  157. data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
  158. data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
  159. data/lib/talon_one/models/generate_loyalty_card.rb +256 -0
  160. data/lib/talon_one/models/generate_rule_title.rb +226 -0
  161. data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
  162. data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
  163. data/lib/talon_one/models/integration_coupon.rb +1 -1
  164. data/lib/talon_one/models/inventory_coupon.rb +1 -1
  165. data/lib/talon_one/models/inventory_referral.rb +1 -1
  166. data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
  167. data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
  168. data/lib/talon_one/models/loyalty_card.rb +25 -5
  169. data/lib/talon_one/models/loyalty_card_batch.rb +304 -0
  170. data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
  171. data/lib/talon_one/models/loyalty_program.rb +70 -29
  172. data/lib/talon_one/models/message_log_response.rb +3 -22
  173. data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
  174. data/lib/talon_one/models/new_application.rb +14 -4
  175. data/lib/talon_one/models/new_application_cif.rb +262 -0
  176. data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
  177. data/lib/talon_one/models/new_attribute.rb +2 -2
  178. data/lib/talon_one/models/new_base_notification.rb +1 -0
  179. data/lib/talon_one/models/new_coupon_creation_job.rb +1 -1
  180. data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
  181. data/lib/talon_one/models/new_coupons.rb +1 -1
  182. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -1
  183. data/lib/talon_one/models/new_customer_session_v2.rb +2 -2
  184. data/lib/talon_one/models/new_loyalty_program.rb +44 -25
  185. data/lib/talon_one/models/new_notification_test.rb +2 -2
  186. data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
  187. data/lib/talon_one/models/new_referral.rb +1 -1
  188. data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -1
  189. data/lib/talon_one/models/new_revision_version.rb +352 -0
  190. data/lib/talon_one/models/new_webhook.rb +11 -1
  191. data/lib/talon_one/models/okta_event.rb +229 -0
  192. data/lib/talon_one/models/okta_event_payload.rb +212 -0
  193. data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
  194. data/lib/talon_one/models/okta_event_target.rb +243 -0
  195. data/lib/talon_one/models/projected_tier.rb +232 -0
  196. data/lib/talon_one/models/referral.rb +1 -1
  197. data/lib/talon_one/models/referral_constraints.rb +1 -1
  198. data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
  199. data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
  200. data/lib/talon_one/models/revision.rb +319 -0
  201. data/lib/talon_one/models/revision_activation.rb +206 -0
  202. data/lib/talon_one/models/revision_version.rb +466 -0
  203. data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
  204. data/lib/talon_one/models/rule_failure_reason.rb +24 -4
  205. data/lib/talon_one/models/scim_base_user.rb +237 -0
  206. data/lib/talon_one/models/scim_base_user_name.rb +208 -0
  207. data/lib/talon_one/models/scim_new_user.rb +237 -0
  208. data/lib/talon_one/models/scim_patch_operation.rb +267 -0
  209. data/lib/talon_one/models/scim_patch_request.rb +226 -0
  210. data/lib/talon_one/models/scim_resource.rb +228 -0
  211. data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
  212. data/lib/talon_one/models/scim_schema_resource.rb +239 -0
  213. data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
  214. data/lib/talon_one/models/scim_service_provider_config_response.rb +256 -0
  215. data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
  216. data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
  217. data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
  218. data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
  219. data/lib/talon_one/models/scim_user.rb +252 -0
  220. data/lib/talon_one/models/scim_users_list_response.rb +236 -0
  221. data/lib/talon_one/models/sso_config.rb +14 -4
  222. data/lib/talon_one/models/tier.rb +12 -2
  223. data/lib/talon_one/models/transfer_loyalty_card.rb +14 -4
  224. data/lib/talon_one/models/update_application.rb +24 -4
  225. data/lib/talon_one/models/update_application_cif.rb +237 -0
  226. data/lib/talon_one/models/update_campaign.rb +1 -1
  227. data/lib/talon_one/models/update_coupon.rb +1 -1
  228. data/lib/talon_one/models/update_coupon_batch.rb +1 -1
  229. data/lib/talon_one/models/update_loyalty_card.rb +15 -5
  230. data/lib/talon_one/models/update_loyalty_program.rb +44 -25
  231. data/lib/talon_one/models/update_referral.rb +1 -1
  232. data/lib/talon_one/models/update_referral_batch.rb +1 -1
  233. data/lib/talon_one/models/user.rb +14 -4
  234. data/lib/talon_one/models/webhook.rb +11 -1
  235. data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +11 -1
  236. data/lib/talon_one/version.rb +1 -1
  237. data/lib/talon_one.rb +54 -11
  238. data/spec/api/integration_api_spec.rb +18 -3
  239. data/spec/api/management_api_spec.rb +227 -23
  240. data/spec/models/achievement_progress_spec.rb +6 -0
  241. data/spec/models/additional_campaign_properties_spec.rb +7 -1
  242. data/spec/models/analytics_data_point_spec.rb +47 -0
  243. data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
  244. data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
  245. data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
  246. data/spec/models/application_campaign_analytics_spec.rb +1 -19
  247. data/spec/models/application_campaign_stats_spec.rb +0 -6
  248. data/spec/models/application_cif_expression_spec.rb +71 -0
  249. data/spec/models/application_cif_spec.rb +89 -0
  250. data/spec/models/application_spec.rb +12 -0
  251. data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
  252. data/spec/models/attribute_spec.rb +1 -1
  253. data/spec/models/base_loyalty_program_spec.rb +18 -6
  254. data/spec/models/base_notification_spec.rb +1 -1
  255. data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
  256. data/spec/models/campaign_notification_policy_spec.rb +6 -0
  257. data/spec/models/campaign_spec.rb +43 -1
  258. data/spec/models/campaign_store_budget_spec.rb +65 -0
  259. data/spec/models/campaign_versions_spec.rb +71 -0
  260. data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
  261. data/spec/models/coupon_deletion_filters_spec.rb +123 -0
  262. data/spec/models/coupon_deletion_job_spec.rb +107 -0
  263. data/spec/models/effect_entity_spec.rb +24 -0
  264. data/spec/models/effect_spec.rb +24 -0
  265. data/spec/models/environment_spec.rb +6 -0
  266. data/spec/models/generate_campaign_description_spec.rb +47 -0
  267. data/spec/models/generate_campaign_tags_spec.rb +41 -0
  268. data/spec/models/generate_item_filter_description_spec.rb +41 -0
  269. data/spec/models/generate_loyalty_card_spec.rb +51 -0
  270. data/spec/models/generate_rule_title_rule_spec.rb +47 -0
  271. data/spec/models/generate_rule_title_spec.rb +47 -0
  272. data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
  273. data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
  274. data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
  275. data/spec/models/loyalty_card_batch_spec.rb +57 -0
  276. data/spec/models/loyalty_card_spec.rb +12 -0
  277. data/spec/models/loyalty_program_spec.rb +30 -6
  278. data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
  279. data/spec/models/new_application_cif_expression_spec.rb +53 -0
  280. data/spec/models/new_application_cif_spec.rb +71 -0
  281. data/spec/models/new_application_spec.rb +6 -0
  282. data/spec/models/new_attribute_spec.rb +1 -1
  283. data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
  284. data/spec/models/new_loyalty_program_spec.rb +18 -6
  285. data/spec/models/new_notification_test_spec.rb +1 -1
  286. data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
  287. data/spec/models/new_revision_version_spec.rb +105 -0
  288. data/spec/models/new_webhook_spec.rb +6 -0
  289. data/spec/models/okta_event_payload_data_spec.rb +41 -0
  290. data/spec/models/okta_event_payload_spec.rb +41 -0
  291. data/spec/models/okta_event_spec.rb +47 -0
  292. data/spec/models/okta_event_target_spec.rb +53 -0
  293. data/spec/models/projected_tier_spec.rb +53 -0
  294. data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
  295. data/spec/models/reject_referral_effect_props_spec.rb +6 -0
  296. data/spec/models/revision_activation_spec.rb +41 -0
  297. data/spec/models/revision_spec.rb +95 -0
  298. data/spec/models/revision_version_spec.rb +153 -0
  299. data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
  300. data/spec/models/rule_failure_reason_spec.rb +12 -0
  301. data/spec/models/scim_base_user_name_spec.rb +41 -0
  302. data/spec/models/scim_base_user_spec.rb +59 -0
  303. data/spec/models/scim_new_user_spec.rb +59 -0
  304. data/spec/models/scim_patch_operation_spec.rb +57 -0
  305. data/spec/models/scim_patch_request_spec.rb +47 -0
  306. data/spec/models/scim_resource_spec.rb +53 -0
  307. data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
  308. data/spec/models/scim_schema_resource_spec.rb +59 -0
  309. data/spec/models/scim_schemas_list_response_spec.rb +53 -0
  310. data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
  311. data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
  312. data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
  313. data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
  314. data/spec/models/scim_service_provider_config_response_spec.rb +71 -0
  315. data/spec/models/scim_user_spec.rb +65 -0
  316. data/spec/models/scim_users_list_response_spec.rb +53 -0
  317. data/spec/models/sso_config_spec.rb +6 -0
  318. data/spec/models/tier_spec.rb +6 -0
  319. data/spec/models/transfer_loyalty_card_spec.rb +6 -0
  320. data/spec/models/update_application_cif_spec.rb +59 -0
  321. data/spec/models/update_application_spec.rb +12 -0
  322. data/spec/models/update_loyalty_card_spec.rb +6 -0
  323. data/spec/models/update_loyalty_program_spec.rb +18 -6
  324. data/spec/models/user_spec.rb +6 -0
  325. data/spec/models/webhook_spec.rb +6 -0
  326. data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
  327. metadata +219 -3
@@ -45,17 +45,22 @@ module TalonOne
45
45
  # 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.
46
46
  attr_accessor :sandbox
47
47
 
48
- # 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.
48
+ # 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.
49
+ attr_accessor :program_join_policy
50
+
51
+ # 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`.
49
52
  attr_accessor :tiers_expiration_policy
50
53
 
51
- # 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.
54
+ # 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`.
55
+ attr_accessor :tier_cycle_start_date
56
+
57
+ # 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.
52
58
  attr_accessor :tiers_expire_in
53
59
 
54
- # 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.
60
+ # 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.
55
61
  attr_accessor :tiers_downgrade_policy
56
62
 
57
- # 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.
58
- attr_accessor :program_join_policy
63
+ attr_accessor :card_code_settings
59
64
 
60
65
  # The ID of the Talon.One account that owns this program.
61
66
  attr_accessor :account_id
@@ -75,12 +80,18 @@ module TalonOne
75
80
  # `True` if the tier definitions can be updated.
76
81
  attr_accessor :can_update_tiers
77
82
 
78
- # Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`.
83
+ # `True` if the program join policy can be updated.
79
84
  attr_accessor :can_update_join_policy
80
85
 
86
+ # `True` if the tier expiration policy can be updated.
87
+ attr_accessor :can_update_tier_expiration_policy
88
+
81
89
  # `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties.
82
90
  attr_accessor :can_upgrade_to_advanced_tiers
83
91
 
92
+ # `True` if the `allowSubledger` property can be updated in the loyalty program.
93
+ attr_accessor :can_update_subledgers
94
+
84
95
  class EnumAttributeValidator
85
96
  attr_reader :datatype
86
97
  attr_reader :allowable_values
@@ -116,10 +127,12 @@ module TalonOne
116
127
  :'allow_subledger' => :'allowSubledger',
117
128
  :'users_per_card_limit' => :'usersPerCardLimit',
118
129
  :'sandbox' => :'sandbox',
130
+ :'program_join_policy' => :'programJoinPolicy',
119
131
  :'tiers_expiration_policy' => :'tiersExpirationPolicy',
132
+ :'tier_cycle_start_date' => :'tierCycleStartDate',
120
133
  :'tiers_expire_in' => :'tiersExpireIn',
121
134
  :'tiers_downgrade_policy' => :'tiersDowngradePolicy',
122
- :'program_join_policy' => :'programJoinPolicy',
135
+ :'card_code_settings' => :'cardCodeSettings',
123
136
  :'account_id' => :'accountID',
124
137
  :'name' => :'name',
125
138
  :'tiers' => :'tiers',
@@ -127,7 +140,9 @@ module TalonOne
127
140
  :'card_based' => :'cardBased',
128
141
  :'can_update_tiers' => :'canUpdateTiers',
129
142
  :'can_update_join_policy' => :'canUpdateJoinPolicy',
130
- :'can_upgrade_to_advanced_tiers' => :'canUpgradeToAdvancedTiers'
143
+ :'can_update_tier_expiration_policy' => :'canUpdateTierExpirationPolicy',
144
+ :'can_upgrade_to_advanced_tiers' => :'canUpgradeToAdvancedTiers',
145
+ :'can_update_subledgers' => :'canUpdateSubledgers'
131
146
  }
132
147
  end
133
148
 
@@ -144,10 +159,12 @@ module TalonOne
144
159
  :'allow_subledger' => :'Boolean',
145
160
  :'users_per_card_limit' => :'Integer',
146
161
  :'sandbox' => :'Boolean',
162
+ :'program_join_policy' => :'String',
147
163
  :'tiers_expiration_policy' => :'String',
164
+ :'tier_cycle_start_date' => :'DateTime',
148
165
  :'tiers_expire_in' => :'String',
149
166
  :'tiers_downgrade_policy' => :'String',
150
- :'program_join_policy' => :'String',
167
+ :'card_code_settings' => :'CodeGeneratorSettings',
151
168
  :'account_id' => :'Integer',
152
169
  :'name' => :'String',
153
170
  :'tiers' => :'Array<LoyaltyTier>',
@@ -155,7 +172,9 @@ module TalonOne
155
172
  :'card_based' => :'Boolean',
156
173
  :'can_update_tiers' => :'Boolean',
157
174
  :'can_update_join_policy' => :'Boolean',
158
- :'can_upgrade_to_advanced_tiers' => :'Boolean'
175
+ :'can_update_tier_expiration_policy' => :'Boolean',
176
+ :'can_upgrade_to_advanced_tiers' => :'Boolean',
177
+ :'can_update_subledgers' => :'Boolean'
159
178
  }
160
179
  end
161
180
 
@@ -222,10 +241,18 @@ module TalonOne
222
241
  self.sandbox = attributes[:'sandbox']
223
242
  end
224
243
 
244
+ if attributes.key?(:'program_join_policy')
245
+ self.program_join_policy = attributes[:'program_join_policy']
246
+ end
247
+
225
248
  if attributes.key?(:'tiers_expiration_policy')
226
249
  self.tiers_expiration_policy = attributes[:'tiers_expiration_policy']
227
250
  end
228
251
 
252
+ if attributes.key?(:'tier_cycle_start_date')
253
+ self.tier_cycle_start_date = attributes[:'tier_cycle_start_date']
254
+ end
255
+
229
256
  if attributes.key?(:'tiers_expire_in')
230
257
  self.tiers_expire_in = attributes[:'tiers_expire_in']
231
258
  end
@@ -234,8 +261,8 @@ module TalonOne
234
261
  self.tiers_downgrade_policy = attributes[:'tiers_downgrade_policy']
235
262
  end
236
263
 
237
- if attributes.key?(:'program_join_policy')
238
- self.program_join_policy = attributes[:'program_join_policy']
264
+ if attributes.key?(:'card_code_settings')
265
+ self.card_code_settings = attributes[:'card_code_settings']
239
266
  end
240
267
 
241
268
  if attributes.key?(:'account_id')
@@ -272,11 +299,21 @@ module TalonOne
272
299
  self.can_update_join_policy = attributes[:'can_update_join_policy']
273
300
  end
274
301
 
302
+ if attributes.key?(:'can_update_tier_expiration_policy')
303
+ self.can_update_tier_expiration_policy = attributes[:'can_update_tier_expiration_policy']
304
+ end
305
+
275
306
  if attributes.key?(:'can_upgrade_to_advanced_tiers')
276
307
  self.can_upgrade_to_advanced_tiers = attributes[:'can_upgrade_to_advanced_tiers']
277
308
  else
278
309
  self.can_upgrade_to_advanced_tiers = false
279
310
  end
311
+
312
+ if attributes.key?(:'can_update_subledgers')
313
+ self.can_update_subledgers = attributes[:'can_update_subledgers']
314
+ else
315
+ self.can_update_subledgers = false
316
+ end
280
317
  end
281
318
 
282
319
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -359,12 +396,12 @@ module TalonOne
359
396
  return false if @allow_subledger.nil?
360
397
  return false if !@users_per_card_limit.nil? && @users_per_card_limit < 0
361
398
  return false if @sandbox.nil?
362
- tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"])
399
+ program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"])
400
+ return false unless program_join_policy_validator.valid?(@program_join_policy)
401
+ tiers_expiration_policy_validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"])
363
402
  return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy)
364
403
  tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"])
365
404
  return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy)
366
- program_join_policy_validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"])
367
- return false unless program_join_policy_validator.valid?(@program_join_policy)
368
405
  return false if @account_id.nil?
369
406
  return false if @name.nil?
370
407
  return false if @timezone.nil?
@@ -383,10 +420,20 @@ module TalonOne
383
420
  @users_per_card_limit = users_per_card_limit
384
421
  end
385
422
 
423
+ # Custom attribute writer method checking allowed values (enum).
424
+ # @param [Object] program_join_policy Object to be assigned
425
+ def program_join_policy=(program_join_policy)
426
+ validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"])
427
+ unless validator.valid?(program_join_policy)
428
+ fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}."
429
+ end
430
+ @program_join_policy = program_join_policy
431
+ end
432
+
386
433
  # Custom attribute writer method checking allowed values (enum).
387
434
  # @param [Object] tiers_expiration_policy Object to be assigned
388
435
  def tiers_expiration_policy=(tiers_expiration_policy)
389
- validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date"])
436
+ validator = EnumAttributeValidator.new('String', ["tier_start_date", "program_join_date", "customer_attribute", "absolute_expiration"])
390
437
  unless validator.valid?(tiers_expiration_policy)
391
438
  fail ArgumentError, "invalid value for \"tiers_expiration_policy\", must be one of #{validator.allowable_values}."
392
439
  end
@@ -403,16 +450,6 @@ module TalonOne
403
450
  @tiers_downgrade_policy = tiers_downgrade_policy
404
451
  end
405
452
 
406
- # Custom attribute writer method checking allowed values (enum).
407
- # @param [Object] program_join_policy Object to be assigned
408
- def program_join_policy=(program_join_policy)
409
- validator = EnumAttributeValidator.new('String', ["not_join", "points_activated", "points_earned"])
410
- unless validator.valid?(program_join_policy)
411
- fail ArgumentError, "invalid value for \"program_join_policy\", must be one of #{validator.allowable_values}."
412
- end
413
- @program_join_policy = program_join_policy
414
- end
415
-
416
453
  # Custom attribute writer method with validation
417
454
  # @param [Object] timezone Value to be assigned
418
455
  def timezone=(timezone)
@@ -442,10 +479,12 @@ module TalonOne
442
479
  allow_subledger == o.allow_subledger &&
443
480
  users_per_card_limit == o.users_per_card_limit &&
444
481
  sandbox == o.sandbox &&
482
+ program_join_policy == o.program_join_policy &&
445
483
  tiers_expiration_policy == o.tiers_expiration_policy &&
484
+ tier_cycle_start_date == o.tier_cycle_start_date &&
446
485
  tiers_expire_in == o.tiers_expire_in &&
447
486
  tiers_downgrade_policy == o.tiers_downgrade_policy &&
448
- program_join_policy == o.program_join_policy &&
487
+ card_code_settings == o.card_code_settings &&
449
488
  account_id == o.account_id &&
450
489
  name == o.name &&
451
490
  tiers == o.tiers &&
@@ -453,7 +492,9 @@ module TalonOne
453
492
  card_based == o.card_based &&
454
493
  can_update_tiers == o.can_update_tiers &&
455
494
  can_update_join_policy == o.can_update_join_policy &&
456
- can_upgrade_to_advanced_tiers == o.can_upgrade_to_advanced_tiers
495
+ can_update_tier_expiration_policy == o.can_update_tier_expiration_policy &&
496
+ can_upgrade_to_advanced_tiers == o.can_upgrade_to_advanced_tiers &&
497
+ can_update_subledgers == o.can_update_subledgers
457
498
  end
458
499
 
459
500
  # @see the `==` method
@@ -465,7 +506,7 @@ module TalonOne
465
506
  # Calculates hash code according to all attributes.
466
507
  # @return [Integer] Hash code
467
508
  def hash
468
- [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
509
+ [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
469
510
  end
470
511
 
471
512
  # Builds the object from hash
@@ -80,45 +80,26 @@ module TalonOne
80
80
  # @return Array for valid properties with the reasons
81
81
  def list_invalid_properties
82
82
  invalid_properties = Array.new
83
- if @created_at.nil?
84
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
85
- end
86
-
87
- if @response.nil?
88
- invalid_properties.push('invalid value for "response", response cannot be nil.')
89
- end
90
-
91
83
  pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
92
- if @response !~ pattern
84
+ if !@response.nil? && @response !~ pattern
93
85
  invalid_properties.push("invalid value for \"response\", must conform to the pattern #{pattern}.")
94
86
  end
95
87
 
96
- if @status.nil?
97
- invalid_properties.push('invalid value for "status", status cannot be nil.')
98
- end
99
-
100
88
  invalid_properties
101
89
  end
102
90
 
103
91
  # Check to see if the all the properties in the model are valid
104
92
  # @return true if the model is valid
105
93
  def valid?
106
- return false if @created_at.nil?
107
- return false if @response.nil?
108
- return false if @response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
109
- return false if @status.nil?
94
+ return false if !@response.nil? && @response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
110
95
  true
111
96
  end
112
97
 
113
98
  # Custom attribute writer method with validation
114
99
  # @param [Object] response Value to be assigned
115
100
  def response=(response)
116
- if response.nil?
117
- fail ArgumentError, 'response cannot be nil'
118
- end
119
-
120
101
  pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
121
- if response !~ pattern
102
+ if !response.nil? && response !~ pattern
122
103
  fail ArgumentError, "invalid value for \"response\", must conform to the pattern #{pattern}."
123
104
  end
124
105
 
@@ -0,0 +1,227 @@
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
+ class NewAppWideCouponDeletionJob
17
+ attr_accessor :filters
18
+
19
+ attr_accessor :campaignids
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'filters' => :'filters',
25
+ :'campaignids' => :'campaignids'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'filters' => :'CouponDeletionFilters',
33
+ :'campaignids' => :'Array<Integer>'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewAppWideCouponDeletionJob` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ 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
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'filters')
59
+ self.filters = attributes[:'filters']
60
+ end
61
+
62
+ if attributes.key?(:'campaignids')
63
+ if (value = attributes[:'campaignids']).is_a?(Array)
64
+ self.campaignids = value
65
+ end
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @filters.nil?
74
+ invalid_properties.push('invalid value for "filters", filters cannot be nil.')
75
+ end
76
+
77
+ if @campaignids.nil?
78
+ invalid_properties.push('invalid value for "campaignids", campaignids cannot be nil.')
79
+ end
80
+
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return false if @filters.nil?
88
+ return false if @campaignids.nil?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ filters == o.filters &&
98
+ campaignids == o.campaignids
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ def hash
110
+ [filters, campaignids].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def self.build_from_hash(attributes)
117
+ new.build_from_hash(attributes)
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ self.class.openapi_types.each_pair do |key, type|
126
+ if type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ TalonOne.const_get(type).build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+ end
227
+ end
@@ -58,6 +58,9 @@ module TalonOne
58
58
  # Hex key for HMAC-signing API calls as coming from this application (16 hex digits).
59
59
  attr_accessor :key
60
60
 
61
+ # Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled.
62
+ attr_accessor :enable_campaign_state_management
63
+
61
64
  class EnumAttributeValidator
62
65
  attr_reader :datatype
63
66
  attr_reader :allowable_values
@@ -97,7 +100,8 @@ module TalonOne
97
100
  :'sandbox' => :'sandbox',
98
101
  :'enable_partial_discounts' => :'enablePartialDiscounts',
99
102
  :'default_discount_additional_cost_per_item_scope' => :'defaultDiscountAdditionalCostPerItemScope',
100
- :'key' => :'key'
103
+ :'key' => :'key',
104
+ :'enable_campaign_state_management' => :'enableCampaignStateManagement'
101
105
  }
102
106
  end
103
107
 
@@ -118,7 +122,8 @@ module TalonOne
118
122
  :'sandbox' => :'Boolean',
119
123
  :'enable_partial_discounts' => :'Boolean',
120
124
  :'default_discount_additional_cost_per_item_scope' => :'String',
121
- :'key' => :'String'
125
+ :'key' => :'String',
126
+ :'enable_campaign_state_management' => :'Boolean'
122
127
  }
123
128
  end
124
129
 
@@ -204,6 +209,10 @@ module TalonOne
204
209
  if attributes.key?(:'key')
205
210
  self.key = attributes[:'key']
206
211
  end
212
+
213
+ if attributes.key?(:'enable_campaign_state_management')
214
+ self.enable_campaign_state_management = attributes[:'enable_campaign_state_management']
215
+ end
207
216
  end
208
217
 
209
218
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -363,7 +372,8 @@ module TalonOne
363
372
  sandbox == o.sandbox &&
364
373
  enable_partial_discounts == o.enable_partial_discounts &&
365
374
  default_discount_additional_cost_per_item_scope == o.default_discount_additional_cost_per_item_scope &&
366
- key == o.key
375
+ key == o.key &&
376
+ enable_campaign_state_management == o.enable_campaign_state_management
367
377
  end
368
378
 
369
379
  # @see the `==` method
@@ -375,7 +385,7 @@ module TalonOne
375
385
  # Calculates hash code according to all attributes.
376
386
  # @return [Integer] Hash code
377
387
  def hash
378
- [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
388
+ [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
379
389
  end
380
390
 
381
391
  # Builds the object from hash