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
@@ -0,0 +1,288 @@
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
+ # The properties specific to the \"rollbackIncreasedAchievementProgress\" effect. This gets triggered whenever a closed session where the `increaseAchievementProgress` effect was triggered is cancelled. This is applicable only when the customer has not completed the achievement.
17
+ class RollbackIncreasedAchievementProgressEffectProps
18
+ # The internal ID of the achievement.
19
+ attr_accessor :achievement_id
20
+
21
+ # The name of the achievement.
22
+ attr_accessor :achievement_name
23
+
24
+ # The internal ID of the achievement progress tracker.
25
+ attr_accessor :progress_tracker_id
26
+
27
+ # The value by which the customer's current progress in the achievement is decreased.
28
+ attr_accessor :decrease_progress_by
29
+
30
+ # The current progress of the customer in the achievement.
31
+ attr_accessor :current_progress
32
+
33
+ # The target value to complete the achievement.
34
+ attr_accessor :target
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'achievement_id' => :'achievementId',
40
+ :'achievement_name' => :'achievementName',
41
+ :'progress_tracker_id' => :'progressTrackerId',
42
+ :'decrease_progress_by' => :'decreaseProgressBy',
43
+ :'current_progress' => :'currentProgress',
44
+ :'target' => :'target'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'achievement_id' => :'Integer',
52
+ :'achievement_name' => :'String',
53
+ :'progress_tracker_id' => :'Integer',
54
+ :'decrease_progress_by' => :'Float',
55
+ :'current_progress' => :'Float',
56
+ :'target' => :'Float'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::RollbackIncreasedAchievementProgressEffectProps` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::RollbackIncreasedAchievementProgressEffectProps`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'achievement_id')
82
+ self.achievement_id = attributes[:'achievement_id']
83
+ end
84
+
85
+ if attributes.key?(:'achievement_name')
86
+ self.achievement_name = attributes[:'achievement_name']
87
+ end
88
+
89
+ if attributes.key?(:'progress_tracker_id')
90
+ self.progress_tracker_id = attributes[:'progress_tracker_id']
91
+ end
92
+
93
+ if attributes.key?(:'decrease_progress_by')
94
+ self.decrease_progress_by = attributes[:'decrease_progress_by']
95
+ end
96
+
97
+ if attributes.key?(:'current_progress')
98
+ self.current_progress = attributes[:'current_progress']
99
+ end
100
+
101
+ if attributes.key?(:'target')
102
+ self.target = attributes[:'target']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ if @achievement_id.nil?
111
+ invalid_properties.push('invalid value for "achievement_id", achievement_id cannot be nil.')
112
+ end
113
+
114
+ if @achievement_name.nil?
115
+ invalid_properties.push('invalid value for "achievement_name", achievement_name cannot be nil.')
116
+ end
117
+
118
+ if @progress_tracker_id.nil?
119
+ invalid_properties.push('invalid value for "progress_tracker_id", progress_tracker_id cannot be nil.')
120
+ end
121
+
122
+ if @decrease_progress_by.nil?
123
+ invalid_properties.push('invalid value for "decrease_progress_by", decrease_progress_by cannot be nil.')
124
+ end
125
+
126
+ if @current_progress.nil?
127
+ invalid_properties.push('invalid value for "current_progress", current_progress cannot be nil.')
128
+ end
129
+
130
+ if @target.nil?
131
+ invalid_properties.push('invalid value for "target", target cannot be nil.')
132
+ end
133
+
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ return false if @achievement_id.nil?
141
+ return false if @achievement_name.nil?
142
+ return false if @progress_tracker_id.nil?
143
+ return false if @decrease_progress_by.nil?
144
+ return false if @current_progress.nil?
145
+ return false if @target.nil?
146
+ true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ achievement_id == o.achievement_id &&
155
+ achievement_name == o.achievement_name &&
156
+ progress_tracker_id == o.progress_tracker_id &&
157
+ decrease_progress_by == o.decrease_progress_by &&
158
+ current_progress == o.current_progress &&
159
+ target == o.target
160
+ end
161
+
162
+ # @see the `==` method
163
+ # @param [Object] Object to be compared
164
+ def eql?(o)
165
+ self == o
166
+ end
167
+
168
+ # Calculates hash code according to all attributes.
169
+ # @return [Integer] Hash code
170
+ def hash
171
+ [achievement_id, achievement_name, progress_tracker_id, decrease_progress_by, current_progress, target].hash
172
+ end
173
+
174
+ # Builds the object from hash
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ # @return [Object] Returns the model itself
177
+ def self.build_from_hash(attributes)
178
+ new.build_from_hash(attributes)
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def build_from_hash(attributes)
185
+ return nil unless attributes.is_a?(Hash)
186
+ self.class.openapi_types.each_pair do |key, type|
187
+ if type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
191
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
192
+ end
193
+ elsif !attributes[self.class.attribute_map[key]].nil?
194
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :DateTime
208
+ DateTime.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :Boolean
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ TalonOne.const_get(type).build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end
287
+ end
288
+ end
@@ -51,6 +51,12 @@ module TalonOne
51
51
  # More details about the failure.
52
52
  attr_accessor :details
53
53
 
54
+ # The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation).
55
+ attr_accessor :evaluation_group_id
56
+
57
+ # The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-
58
+ attr_accessor :evaluation_group_mode
59
+
54
60
  # Attribute mapping from ruby-style variable name to JSON key.
55
61
  def self.attribute_map
56
62
  {
@@ -65,7 +71,9 @@ module TalonOne
65
71
  :'rule_name' => :'ruleName',
66
72
  :'condition_index' => :'conditionIndex',
67
73
  :'effect_index' => :'effectIndex',
68
- :'details' => :'details'
74
+ :'details' => :'details',
75
+ :'evaluation_group_id' => :'evaluationGroupID',
76
+ :'evaluation_group_mode' => :'evaluationGroupMode'
69
77
  }
70
78
  end
71
79
 
@@ -83,7 +91,9 @@ module TalonOne
83
91
  :'rule_name' => :'String',
84
92
  :'condition_index' => :'Integer',
85
93
  :'effect_index' => :'Integer',
86
- :'details' => :'String'
94
+ :'details' => :'String',
95
+ :'evaluation_group_id' => :'Integer',
96
+ :'evaluation_group_mode' => :'String'
87
97
  }
88
98
  end
89
99
 
@@ -155,6 +165,14 @@ module TalonOne
155
165
  if attributes.key?(:'details')
156
166
  self.details = attributes[:'details']
157
167
  end
168
+
169
+ if attributes.key?(:'evaluation_group_id')
170
+ self.evaluation_group_id = attributes[:'evaluation_group_id']
171
+ end
172
+
173
+ if attributes.key?(:'evaluation_group_mode')
174
+ self.evaluation_group_mode = attributes[:'evaluation_group_mode']
175
+ end
158
176
  end
159
177
 
160
178
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -211,7 +229,9 @@ module TalonOne
211
229
  rule_name == o.rule_name &&
212
230
  condition_index == o.condition_index &&
213
231
  effect_index == o.effect_index &&
214
- details == o.details
232
+ details == o.details &&
233
+ evaluation_group_id == o.evaluation_group_id &&
234
+ evaluation_group_mode == o.evaluation_group_mode
215
235
  end
216
236
 
217
237
  # @see the `==` method
@@ -223,7 +243,7 @@ module TalonOne
223
243
  # Calculates hash code according to all attributes.
224
244
  # @return [Integer] Hash code
225
245
  def hash
226
- [campaign_id, campaign_name, ruleset_id, coupon_id, coupon_value, referral_id, referral_value, rule_index, rule_name, condition_index, effect_index, details].hash
246
+ [campaign_id, campaign_name, ruleset_id, coupon_id, coupon_value, referral_id, referral_value, rule_index, rule_name, condition_index, effect_index, details, evaluation_group_id, evaluation_group_mode].hash
227
247
  end
228
248
 
229
249
  # Builds the object from hash
@@ -0,0 +1,237 @@
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
+ # Schema definition for base user fields, provisioned using the SCIM protocol and used by Talon.One.
17
+ class ScimBaseUser
18
+ # Status of the user.
19
+ attr_accessor :active
20
+
21
+ # Display name of the user.
22
+ attr_accessor :display_name
23
+
24
+ # Unique identifier of the user. This is usually an email address.
25
+ attr_accessor :user_name
26
+
27
+ attr_accessor :name
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'active' => :'active',
33
+ :'display_name' => :'displayName',
34
+ :'user_name' => :'userName',
35
+ :'name' => :'name'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'active' => :'Boolean',
43
+ :'display_name' => :'String',
44
+ :'user_name' => :'String',
45
+ :'name' => :'ScimBaseUserName'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ScimBaseUser` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ScimBaseUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'active')
71
+ self.active = attributes[:'active']
72
+ end
73
+
74
+ if attributes.key?(:'display_name')
75
+ self.display_name = attributes[:'display_name']
76
+ end
77
+
78
+ if attributes.key?(:'user_name')
79
+ self.user_name = attributes[:'user_name']
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ active == o.active &&
106
+ display_name == o.display_name &&
107
+ user_name == o.user_name &&
108
+ name == o.name
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [active, display_name, user_name, name].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ new.build_from_hash(attributes)
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.openapi_types.each_pair do |key, type|
136
+ if type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ TalonOne.const_get(type).build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+ end
237
+ end