talon_one 4.0.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +83 -18
  3. data/docs/AchievementProgress.md +2 -0
  4. data/docs/ActivateUserRequest.md +17 -0
  5. data/docs/AdditionalCampaignProperties.md +3 -1
  6. data/docs/AnalyticsDataPoint.md +19 -0
  7. data/docs/AnalyticsDataPointWithTrend.md +19 -0
  8. data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
  9. data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
  10. data/docs/Application.md +4 -0
  11. data/docs/ApplicationAnalyticsDataPoint.md +6 -6
  12. data/docs/ApplicationCIF.md +33 -0
  13. data/docs/ApplicationCIFExpression.md +27 -0
  14. data/docs/ApplicationCampaignAnalytics.md +13 -19
  15. data/docs/ApplicationCampaignStats.md +1 -3
  16. data/docs/AsyncCouponDeletionJobResponse.md +17 -0
  17. data/docs/BaseLoyaltyProgram.md +8 -4
  18. data/docs/BaseNotification.md +1 -1
  19. data/docs/BaseNotificationEntity.md +1 -1
  20. data/docs/Campaign.md +15 -1
  21. data/docs/CampaignCollectionEditedNotification.md +21 -0
  22. data/docs/CampaignNotificationPolicy.md +3 -1
  23. data/docs/CampaignStateChangedNotification.md +2 -2
  24. data/docs/CampaignStoreBudget.md +25 -0
  25. data/docs/CampaignVersions.md +27 -0
  26. data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
  27. data/docs/CartItem.md +1 -1
  28. data/docs/CodeGeneratorSettings.md +1 -1
  29. data/docs/Coupon.md +3 -3
  30. data/docs/CouponConstraints.md +1 -1
  31. data/docs/CouponCreationJob.md +1 -1
  32. data/docs/CouponDeletionFilters.md +43 -0
  33. data/docs/CouponDeletionJob.md +39 -0
  34. data/docs/CustomerInventory.md +1 -1
  35. data/docs/CustomerSessionV2.md +2 -2
  36. data/docs/Effect.md +8 -0
  37. data/docs/EffectEntity.md +9 -1
  38. data/docs/Environment.md +3 -1
  39. data/docs/Event.md +1 -1
  40. data/docs/GenerateCampaignDescription.md +19 -0
  41. data/docs/GenerateCampaignTags.md +17 -0
  42. data/docs/GenerateItemFilterDescription.md +17 -0
  43. data/docs/GenerateLoyaltyCard.md +19 -0
  44. data/docs/GenerateRuleTitle.md +19 -0
  45. data/docs/GenerateRuleTitleRule.md +19 -0
  46. data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
  47. data/docs/InlineResponse20044.md +1 -1
  48. data/docs/IntegrationApi.md +77 -16
  49. data/docs/IntegrationCoupon.md +3 -3
  50. data/docs/InventoryCoupon.md +3 -3
  51. data/docs/InventoryReferral.md +1 -1
  52. data/docs/LoyaltyBalanceWithTier.md +31 -0
  53. data/docs/LoyaltyBalancesWithTiers.md +19 -0
  54. data/docs/LoyaltyCard.md +6 -2
  55. data/docs/LoyaltyCardBalances.md +21 -0
  56. data/docs/LoyaltyCardBatch.md +21 -0
  57. data/docs/LoyaltyCardBatchResponse.md +19 -0
  58. data/docs/LoyaltyCardProfileRegistration.md +1 -1
  59. data/docs/LoyaltyProgram.md +14 -6
  60. data/docs/ManagementApi.md +1269 -176
  61. data/docs/MessageLogEntry.md +1 -3
  62. data/docs/MessageLogResponse.md +3 -3
  63. data/docs/NewAppWideCouponDeletionJob.md +19 -0
  64. data/docs/NewApplication.md +3 -1
  65. data/docs/NewApplicationCIF.md +27 -0
  66. data/docs/NewApplicationCIFExpression.md +21 -0
  67. data/docs/NewBaseNotification.md +1 -1
  68. data/docs/NewCouponCreationJob.md +1 -1
  69. data/docs/NewCouponDeletionJob.md +17 -0
  70. data/docs/NewCoupons.md +2 -2
  71. data/docs/NewCouponsForMultipleRecipients.md +1 -1
  72. data/docs/NewCustomerSessionV2.md +2 -2
  73. data/docs/NewExternalInvitation.md +21 -0
  74. data/docs/NewLoyaltyProgram.md +8 -4
  75. data/docs/NewOutgoingIntegrationWebhook.md +2 -0
  76. data/docs/NewReferral.md +1 -1
  77. data/docs/NewReferralsForMultipleAdvocates.md +1 -1
  78. data/docs/NewRevisionVersion.md +37 -0
  79. data/docs/NewWebhook.md +2 -0
  80. data/docs/OktaEvent.md +19 -0
  81. data/docs/OktaEventPayload.md +17 -0
  82. data/docs/OktaEventPayloadData.md +17 -0
  83. data/docs/OktaEventTarget.md +21 -0
  84. data/docs/ProjectedTier.md +21 -0
  85. data/docs/Referral.md +1 -1
  86. data/docs/ReferralConstraints.md +1 -1
  87. data/docs/RejectCouponEffectProps.md +3 -1
  88. data/docs/RejectReferralEffectProps.md +3 -1
  89. data/docs/Revision.md +35 -0
  90. data/docs/RevisionActivation.md +17 -0
  91. data/docs/RevisionVersion.md +53 -0
  92. data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
  93. data/docs/RuleFailureReason.md +5 -1
  94. data/docs/SSOConfig.md +3 -1
  95. data/docs/ScimBaseUser.md +23 -0
  96. data/docs/ScimBaseUserName.md +17 -0
  97. data/docs/ScimNewUser.md +23 -0
  98. data/docs/ScimPatchOperation.md +21 -0
  99. data/docs/ScimPatchRequest.md +19 -0
  100. data/docs/ScimResource.md +21 -0
  101. data/docs/ScimResourceTypesListResponse.md +17 -0
  102. data/docs/ScimSchemaResource.md +23 -0
  103. data/docs/ScimSchemasListResponse.md +21 -0
  104. data/docs/ScimServiceProviderConfigResponse.md +27 -0
  105. data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
  106. data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
  107. data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
  108. data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
  109. data/docs/ScimUser.md +25 -0
  110. data/docs/ScimUsersListResponse.md +21 -0
  111. data/docs/Tier.md +3 -1
  112. data/docs/TransferLoyaltyCard.md +3 -1
  113. data/docs/UpdateApplication.md +5 -1
  114. data/docs/UpdateApplicationCIF.md +23 -0
  115. data/docs/UpdateCampaign.md +1 -1
  116. data/docs/UpdateCoupon.md +2 -2
  117. data/docs/UpdateCouponBatch.md +1 -1
  118. data/docs/UpdateLoyaltyCard.md +4 -2
  119. data/docs/UpdateLoyaltyProgram.md +8 -4
  120. data/docs/UpdateReferral.md +1 -1
  121. data/docs/UpdateReferralBatch.md +1 -1
  122. data/docs/UpdateUser.md +1 -1
  123. data/docs/User.md +3 -1
  124. data/docs/Webhook.md +2 -0
  125. data/docs/WebhookWithOutgoingIntegrationDetails.md +2 -0
  126. data/lib/talon_one/api/integration_api.rb +101 -25
  127. data/lib/talon_one/api/management_api.rb +1362 -189
  128. data/lib/talon_one/models/achievement_progress.rb +16 -1
  129. data/lib/talon_one/models/activate_user_request.rb +213 -0
  130. data/lib/talon_one/models/additional_campaign_properties.rb +21 -6
  131. data/lib/talon_one/models/analytics_data_point.rb +225 -0
  132. data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
  133. data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
  134. data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
  135. data/lib/talon_one/models/application.rb +21 -1
  136. data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
  137. data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
  138. data/lib/talon_one/models/application_campaign_stats.rb +1 -16
  139. data/lib/talon_one/models/application_cif.rb +308 -0
  140. data/lib/talon_one/models/application_cif_expression.rb +275 -0
  141. data/lib/talon_one/models/async_coupon_deletion_job_response.rb +213 -0
  142. data/lib/talon_one/models/attribute.rb +2 -2
  143. data/lib/talon_one/models/base_loyalty_program.rb +44 -25
  144. data/lib/talon_one/models/base_notification.rb +3 -2
  145. data/lib/talon_one/models/base_notification_entity.rb +1 -0
  146. data/lib/talon_one/models/campaign.rb +83 -6
  147. data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
  148. data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
  149. data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
  150. data/lib/talon_one/models/campaign_store_budget.rb +275 -0
  151. data/lib/talon_one/models/campaign_versions.rb +259 -0
  152. data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
  153. data/lib/talon_one/models/cart_item.rb +1 -1
  154. data/lib/talon_one/models/code_generator_settings.rb +1 -1
  155. data/lib/talon_one/models/coupon.rb +3 -3
  156. data/lib/talon_one/models/coupon_constraints.rb +1 -1
  157. data/lib/talon_one/models/coupon_creation_job.rb +1 -1
  158. data/lib/talon_one/models/coupon_deletion_filters.rb +375 -0
  159. data/lib/talon_one/models/coupon_deletion_job.rb +370 -0
  160. data/lib/talon_one/models/customer_inventory.rb +1 -1
  161. data/lib/talon_one/models/customer_session_v2.rb +2 -2
  162. data/lib/talon_one/models/effect.rb +41 -1
  163. data/lib/talon_one/models/effect_entity.rb +44 -4
  164. data/lib/talon_one/models/environment.rb +16 -4
  165. data/lib/talon_one/models/event.rb +0 -5
  166. data/lib/talon_one/models/generate_campaign_description.rb +227 -0
  167. data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
  168. data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
  169. data/lib/talon_one/models/generate_loyalty_card.rb +256 -0
  170. data/lib/talon_one/models/generate_rule_title.rb +226 -0
  171. data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
  172. data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
  173. data/lib/talon_one/models/inline_response20044.rb +1 -1
  174. data/lib/talon_one/models/integration_coupon.rb +3 -3
  175. data/lib/talon_one/models/inventory_coupon.rb +3 -3
  176. data/lib/talon_one/models/inventory_referral.rb +1 -1
  177. data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
  178. data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
  179. data/lib/talon_one/models/loyalty_card.rb +25 -5
  180. data/lib/talon_one/models/loyalty_card_balances.rb +231 -0
  181. data/lib/talon_one/models/loyalty_card_batch.rb +304 -0
  182. data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
  183. data/lib/talon_one/models/loyalty_card_profile_registration.rb +1 -1
  184. data/lib/talon_one/models/loyalty_program.rb +70 -29
  185. data/lib/talon_one/models/message_log_entry.rb +4 -14
  186. data/lib/talon_one/models/message_log_response.rb +3 -22
  187. data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
  188. data/lib/talon_one/models/new_application.rb +14 -4
  189. data/lib/talon_one/models/new_application_cif.rb +262 -0
  190. data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
  191. data/lib/talon_one/models/new_attribute.rb +2 -2
  192. data/lib/talon_one/models/new_base_notification.rb +1 -0
  193. data/lib/talon_one/models/new_coupon_creation_job.rb +1 -1
  194. data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
  195. data/lib/talon_one/models/new_coupons.rb +2 -2
  196. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -1
  197. data/lib/talon_one/models/new_customer_session_v2.rb +2 -2
  198. data/lib/talon_one/models/new_external_invitation.rb +235 -0
  199. data/lib/talon_one/models/new_loyalty_program.rb +44 -25
  200. data/lib/talon_one/models/new_notification_test.rb +2 -2
  201. data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
  202. data/lib/talon_one/models/new_referral.rb +1 -1
  203. data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -1
  204. data/lib/talon_one/models/new_revision_version.rb +352 -0
  205. data/lib/talon_one/models/new_webhook.rb +11 -1
  206. data/lib/talon_one/models/okta_event.rb +229 -0
  207. data/lib/talon_one/models/okta_event_payload.rb +212 -0
  208. data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
  209. data/lib/talon_one/models/okta_event_target.rb +243 -0
  210. data/lib/talon_one/models/projected_tier.rb +232 -0
  211. data/lib/talon_one/models/referral.rb +1 -1
  212. data/lib/talon_one/models/referral_constraints.rb +1 -1
  213. data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
  214. data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
  215. data/lib/talon_one/models/revision.rb +319 -0
  216. data/lib/talon_one/models/revision_activation.rb +206 -0
  217. data/lib/talon_one/models/revision_version.rb +466 -0
  218. data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
  219. data/lib/talon_one/models/rule_failure_reason.rb +24 -4
  220. data/lib/talon_one/models/scim_base_user.rb +237 -0
  221. data/lib/talon_one/models/scim_base_user_name.rb +208 -0
  222. data/lib/talon_one/models/scim_new_user.rb +237 -0
  223. data/lib/talon_one/models/scim_patch_operation.rb +267 -0
  224. data/lib/talon_one/models/scim_patch_request.rb +226 -0
  225. data/lib/talon_one/models/scim_resource.rb +228 -0
  226. data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
  227. data/lib/talon_one/models/scim_schema_resource.rb +239 -0
  228. data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
  229. data/lib/talon_one/models/scim_service_provider_config_response.rb +256 -0
  230. data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
  231. data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
  232. data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
  233. data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
  234. data/lib/talon_one/models/scim_user.rb +252 -0
  235. data/lib/talon_one/models/scim_users_list_response.rb +236 -0
  236. data/lib/talon_one/models/sso_config.rb +14 -4
  237. data/lib/talon_one/models/tier.rb +12 -2
  238. data/lib/talon_one/models/transfer_loyalty_card.rb +14 -4
  239. data/lib/talon_one/models/update_application.rb +24 -4
  240. data/lib/talon_one/models/update_application_cif.rb +237 -0
  241. data/lib/talon_one/models/update_campaign.rb +1 -1
  242. data/lib/talon_one/models/update_coupon.rb +2 -2
  243. data/lib/talon_one/models/update_coupon_batch.rb +1 -1
  244. data/lib/talon_one/models/update_loyalty_card.rb +15 -5
  245. data/lib/talon_one/models/update_loyalty_program.rb +44 -25
  246. data/lib/talon_one/models/update_referral.rb +1 -1
  247. data/lib/talon_one/models/update_referral_batch.rb +1 -1
  248. data/lib/talon_one/models/update_user.rb +1 -1
  249. data/lib/talon_one/models/user.rb +14 -4
  250. data/lib/talon_one/models/webhook.rb +11 -1
  251. data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +11 -1
  252. data/lib/talon_one/version.rb +1 -1
  253. data/lib/talon_one.rb +57 -11
  254. data/spec/api/integration_api_spec.rb +25 -10
  255. data/spec/api/management_api_spec.rb +267 -39
  256. data/spec/models/achievement_progress_spec.rb +6 -0
  257. data/spec/models/activate_user_request_spec.rb +41 -0
  258. data/spec/models/additional_campaign_properties_spec.rb +7 -1
  259. data/spec/models/analytics_data_point_spec.rb +47 -0
  260. data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
  261. data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
  262. data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
  263. data/spec/models/application_campaign_analytics_spec.rb +1 -19
  264. data/spec/models/application_campaign_stats_spec.rb +0 -6
  265. data/spec/models/application_cif_expression_spec.rb +71 -0
  266. data/spec/models/application_cif_spec.rb +89 -0
  267. data/spec/models/application_spec.rb +12 -0
  268. data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
  269. data/spec/models/attribute_spec.rb +1 -1
  270. data/spec/models/base_loyalty_program_spec.rb +18 -6
  271. data/spec/models/base_notification_spec.rb +1 -1
  272. data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
  273. data/spec/models/campaign_notification_policy_spec.rb +6 -0
  274. data/spec/models/campaign_spec.rb +43 -1
  275. data/spec/models/campaign_store_budget_spec.rb +65 -0
  276. data/spec/models/campaign_versions_spec.rb +71 -0
  277. data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
  278. data/spec/models/coupon_deletion_filters_spec.rb +123 -0
  279. data/spec/models/coupon_deletion_job_spec.rb +107 -0
  280. data/spec/models/effect_entity_spec.rb +24 -0
  281. data/spec/models/effect_spec.rb +24 -0
  282. data/spec/models/environment_spec.rb +6 -0
  283. data/spec/models/generate_campaign_description_spec.rb +47 -0
  284. data/spec/models/generate_campaign_tags_spec.rb +41 -0
  285. data/spec/models/generate_item_filter_description_spec.rb +41 -0
  286. data/spec/models/generate_loyalty_card_spec.rb +51 -0
  287. data/spec/models/generate_rule_title_rule_spec.rb +47 -0
  288. data/spec/models/generate_rule_title_spec.rb +47 -0
  289. data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
  290. data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
  291. data/spec/models/loyalty_card_balances_spec.rb +53 -0
  292. data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
  293. data/spec/models/loyalty_card_batch_spec.rb +57 -0
  294. data/spec/models/loyalty_card_spec.rb +12 -0
  295. data/spec/models/loyalty_program_spec.rb +30 -6
  296. data/spec/models/message_log_entry_spec.rb +1 -7
  297. data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
  298. data/spec/models/new_application_cif_expression_spec.rb +53 -0
  299. data/spec/models/new_application_cif_spec.rb +71 -0
  300. data/spec/models/new_application_spec.rb +6 -0
  301. data/spec/models/new_attribute_spec.rb +1 -1
  302. data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
  303. data/spec/models/new_external_invitation_spec.rb +53 -0
  304. data/spec/models/new_loyalty_program_spec.rb +18 -6
  305. data/spec/models/new_notification_test_spec.rb +1 -1
  306. data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
  307. data/spec/models/new_revision_version_spec.rb +105 -0
  308. data/spec/models/new_webhook_spec.rb +6 -0
  309. data/spec/models/okta_event_payload_data_spec.rb +41 -0
  310. data/spec/models/okta_event_payload_spec.rb +41 -0
  311. data/spec/models/okta_event_spec.rb +47 -0
  312. data/spec/models/okta_event_target_spec.rb +53 -0
  313. data/spec/models/projected_tier_spec.rb +53 -0
  314. data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
  315. data/spec/models/reject_referral_effect_props_spec.rb +6 -0
  316. data/spec/models/revision_activation_spec.rb +41 -0
  317. data/spec/models/revision_spec.rb +95 -0
  318. data/spec/models/revision_version_spec.rb +153 -0
  319. data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
  320. data/spec/models/rule_failure_reason_spec.rb +12 -0
  321. data/spec/models/scim_base_user_name_spec.rb +41 -0
  322. data/spec/models/scim_base_user_spec.rb +59 -0
  323. data/spec/models/scim_new_user_spec.rb +59 -0
  324. data/spec/models/scim_patch_operation_spec.rb +57 -0
  325. data/spec/models/scim_patch_request_spec.rb +47 -0
  326. data/spec/models/scim_resource_spec.rb +53 -0
  327. data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
  328. data/spec/models/scim_schema_resource_spec.rb +59 -0
  329. data/spec/models/scim_schemas_list_response_spec.rb +53 -0
  330. data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
  331. data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
  332. data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
  333. data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
  334. data/spec/models/scim_service_provider_config_response_spec.rb +71 -0
  335. data/spec/models/scim_user_spec.rb +65 -0
  336. data/spec/models/scim_users_list_response_spec.rb +53 -0
  337. data/spec/models/sso_config_spec.rb +6 -0
  338. data/spec/models/tier_spec.rb +6 -0
  339. data/spec/models/transfer_loyalty_card_spec.rb +6 -0
  340. data/spec/models/update_application_cif_spec.rb +59 -0
  341. data/spec/models/update_application_spec.rb +12 -0
  342. data/spec/models/update_loyalty_card_spec.rb +6 -0
  343. data/spec/models/update_loyalty_program_spec.rb +18 -6
  344. data/spec/models/user_spec.rb +6 -0
  345. data/spec/models/webhook_spec.rb +6 -0
  346. data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
  347. metadata +246 -18
@@ -71,6 +71,12 @@ module TalonOne
71
71
  # The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign.
72
72
  attr_accessor :default_evaluation_group_id
73
73
 
74
+ # The ID of the default Cart-Item-Filter for this application.
75
+ attr_accessor :default_cart_item_filter_id
76
+
77
+ # Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled.
78
+ attr_accessor :enable_campaign_state_management
79
+
74
80
  # An array containing all the loyalty programs to which this application is subscribed.
75
81
  attr_accessor :loyalty_programs
76
82
 
@@ -118,6 +124,8 @@ module TalonOne
118
124
  :'enable_partial_discounts' => :'enablePartialDiscounts',
119
125
  :'default_discount_additional_cost_per_item_scope' => :'defaultDiscountAdditionalCostPerItemScope',
120
126
  :'default_evaluation_group_id' => :'defaultEvaluationGroupId',
127
+ :'default_cart_item_filter_id' => :'defaultCartItemFilterId',
128
+ :'enable_campaign_state_management' => :'enableCampaignStateManagement',
121
129
  :'loyalty_programs' => :'loyaltyPrograms'
122
130
  }
123
131
  end
@@ -144,6 +152,8 @@ module TalonOne
144
152
  :'enable_partial_discounts' => :'Boolean',
145
153
  :'default_discount_additional_cost_per_item_scope' => :'String',
146
154
  :'default_evaluation_group_id' => :'Integer',
155
+ :'default_cart_item_filter_id' => :'Integer',
156
+ :'enable_campaign_state_management' => :'Boolean',
147
157
  :'loyalty_programs' => :'Array<LoyaltyProgram>'
148
158
  }
149
159
  end
@@ -247,6 +257,14 @@ module TalonOne
247
257
  self.default_evaluation_group_id = attributes[:'default_evaluation_group_id']
248
258
  end
249
259
 
260
+ if attributes.key?(:'default_cart_item_filter_id')
261
+ self.default_cart_item_filter_id = attributes[:'default_cart_item_filter_id']
262
+ end
263
+
264
+ if attributes.key?(:'enable_campaign_state_management')
265
+ self.enable_campaign_state_management = attributes[:'enable_campaign_state_management']
266
+ end
267
+
250
268
  if attributes.key?(:'loyalty_programs')
251
269
  if (value = attributes[:'loyalty_programs']).is_a?(Array)
252
270
  self.loyalty_programs = value
@@ -424,6 +442,8 @@ module TalonOne
424
442
  enable_partial_discounts == o.enable_partial_discounts &&
425
443
  default_discount_additional_cost_per_item_scope == o.default_discount_additional_cost_per_item_scope &&
426
444
  default_evaluation_group_id == o.default_evaluation_group_id &&
445
+ default_cart_item_filter_id == o.default_cart_item_filter_id &&
446
+ enable_campaign_state_management == o.enable_campaign_state_management &&
427
447
  loyalty_programs == o.loyalty_programs
428
448
  end
429
449
 
@@ -436,7 +456,7 @@ module TalonOne
436
456
  # Calculates hash code according to all attributes.
437
457
  # @return [Integer] Hash code
438
458
  def hash
439
- [id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id, loyalty_programs].hash
459
+ [id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, default_discount_scope, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox, enable_partial_discounts, default_discount_additional_cost_per_item_scope, default_evaluation_group_id, default_cart_item_filter_id, enable_campaign_state_management, loyalty_programs].hash
440
460
  end
441
461
 
442
462
  # Builds the object from hash
@@ -53,10 +53,10 @@ module TalonOne
53
53
  {
54
54
  :'start_time' => :'DateTime',
55
55
  :'end_time' => :'DateTime',
56
- :'total_revenue' => :'ApplicationAnalyticsDataPointTotalRevenue',
57
- :'sessions_count' => :'ApplicationAnalyticsDataPointSessionsCount',
58
- :'avg_items_per_session' => :'ApplicationAnalyticsDataPointAvgItemsPerSession',
59
- :'avg_session_value' => :'ApplicationAnalyticsDataPointAvgSessionValue',
56
+ :'total_revenue' => :'AnalyticsDataPoint',
57
+ :'sessions_count' => :'AnalyticsDataPoint',
58
+ :'avg_items_per_session' => :'AnalyticsDataPoint',
59
+ :'avg_session_value' => :'AnalyticsDataPoint',
60
60
  :'total_discounts' => :'Float',
61
61
  :'coupons_count' => :'Float'
62
62
  }
@@ -120,12 +120,22 @@ module TalonOne
120
120
  # @return Array for valid properties with the reasons
121
121
  def list_invalid_properties
122
122
  invalid_properties = Array.new
123
+ if @start_time.nil?
124
+ invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
125
+ end
126
+
127
+ if @end_time.nil?
128
+ invalid_properties.push('invalid value for "end_time", end_time cannot be nil.')
129
+ end
130
+
123
131
  invalid_properties
124
132
  end
125
133
 
126
134
  # Check to see if the all the properties in the model are valid
127
135
  # @return true if the model is valid
128
136
  def valid?
137
+ return false if @start_time.nil?
138
+ return false if @end_time.nil?
129
139
  true
130
140
  end
131
141
 
@@ -32,15 +32,6 @@ module TalonOne
32
32
  # The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons.
33
33
  attr_accessor :campaign_state
34
34
 
35
- # The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation.
36
- attr_accessor :campaign_active_ruleset_id
37
-
38
- # Date and time when the campaign becomes active.
39
- attr_accessor :campaign_start_time
40
-
41
- # Date and time when the campaign becomes inactive.
42
- attr_accessor :campaign_end_time
43
-
44
35
  attr_accessor :total_revenue
45
36
 
46
37
  attr_accessor :sessions_count
@@ -84,9 +75,6 @@ module TalonOne
84
75
  :'campaign_name' => :'campaignName',
85
76
  :'campaign_tags' => :'campaignTags',
86
77
  :'campaign_state' => :'campaignState',
87
- :'campaign_active_ruleset_id' => :'campaignActiveRulesetId',
88
- :'campaign_start_time' => :'campaignStartTime',
89
- :'campaign_end_time' => :'campaignEndTime',
90
78
  :'total_revenue' => :'totalRevenue',
91
79
  :'sessions_count' => :'sessionsCount',
92
80
  :'avg_items_per_session' => :'avgItemsPerSession',
@@ -105,15 +93,12 @@ module TalonOne
105
93
  :'campaign_name' => :'String',
106
94
  :'campaign_tags' => :'Array<String>',
107
95
  :'campaign_state' => :'String',
108
- :'campaign_active_ruleset_id' => :'Integer',
109
- :'campaign_start_time' => :'DateTime',
110
- :'campaign_end_time' => :'DateTime',
111
- :'total_revenue' => :'ApplicationCampaignAnalyticsTotalRevenue',
112
- :'sessions_count' => :'ApplicationCampaignAnalyticsSessionsCount',
113
- :'avg_items_per_session' => :'ApplicationCampaignAnalyticsAvgItemsPerSession',
114
- :'avg_session_value' => :'ApplicationCampaignAnalyticsAvgSessionValue',
115
- :'total_discounts' => :'ApplicationCampaignAnalyticsTotalDiscounts',
116
- :'coupons_count' => :'ApplicationCampaignAnalyticsCouponsCount'
96
+ :'total_revenue' => :'AnalyticsDataPointWithTrendAndInfluencedRate',
97
+ :'sessions_count' => :'AnalyticsDataPointWithTrendAndInfluencedRate',
98
+ :'avg_items_per_session' => :'AnalyticsDataPointWithTrendAndUplift',
99
+ :'avg_session_value' => :'AnalyticsDataPointWithTrendAndUplift',
100
+ :'total_discounts' => :'AnalyticsDataPointWithTrend',
101
+ :'coupons_count' => :'AnalyticsDataPointWithTrend'
117
102
  }
118
103
  end
119
104
 
@@ -162,20 +147,6 @@ module TalonOne
162
147
 
163
148
  if attributes.key?(:'campaign_state')
164
149
  self.campaign_state = attributes[:'campaign_state']
165
- else
166
- self.campaign_state = 'enabled'
167
- end
168
-
169
- if attributes.key?(:'campaign_active_ruleset_id')
170
- self.campaign_active_ruleset_id = attributes[:'campaign_active_ruleset_id']
171
- end
172
-
173
- if attributes.key?(:'campaign_start_time')
174
- self.campaign_start_time = attributes[:'campaign_start_time']
175
- end
176
-
177
- if attributes.key?(:'campaign_end_time')
178
- self.campaign_end_time = attributes[:'campaign_end_time']
179
150
  end
180
151
 
181
152
  if attributes.key?(:'total_revenue')
@@ -207,13 +178,43 @@ module TalonOne
207
178
  # @return Array for valid properties with the reasons
208
179
  def list_invalid_properties
209
180
  invalid_properties = Array.new
181
+ if @start_time.nil?
182
+ invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
183
+ end
184
+
185
+ if @end_time.nil?
186
+ invalid_properties.push('invalid value for "end_time", end_time cannot be nil.')
187
+ end
188
+
189
+ if @campaign_id.nil?
190
+ invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
191
+ end
192
+
193
+ if @campaign_name.nil?
194
+ invalid_properties.push('invalid value for "campaign_name", campaign_name cannot be nil.')
195
+ end
196
+
197
+ if @campaign_tags.nil?
198
+ invalid_properties.push('invalid value for "campaign_tags", campaign_tags cannot be nil.')
199
+ end
200
+
201
+ if @campaign_state.nil?
202
+ invalid_properties.push('invalid value for "campaign_state", campaign_state cannot be nil.')
203
+ end
204
+
210
205
  invalid_properties
211
206
  end
212
207
 
213
208
  # Check to see if the all the properties in the model are valid
214
209
  # @return true if the model is valid
215
210
  def valid?
216
- campaign_state_validator = EnumAttributeValidator.new('String', ["enabled", "disabled", "archived"])
211
+ return false if @start_time.nil?
212
+ return false if @end_time.nil?
213
+ return false if @campaign_id.nil?
214
+ return false if @campaign_name.nil?
215
+ return false if @campaign_tags.nil?
216
+ return false if @campaign_state.nil?
217
+ campaign_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"])
217
218
  return false unless campaign_state_validator.valid?(@campaign_state)
218
219
  true
219
220
  end
@@ -221,7 +222,7 @@ module TalonOne
221
222
  # Custom attribute writer method checking allowed values (enum).
222
223
  # @param [Object] campaign_state Object to be assigned
223
224
  def campaign_state=(campaign_state)
224
- validator = EnumAttributeValidator.new('String', ["enabled", "disabled", "archived"])
225
+ validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived"])
225
226
  unless validator.valid?(campaign_state)
226
227
  fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{validator.allowable_values}."
227
228
  end
@@ -239,9 +240,6 @@ module TalonOne
239
240
  campaign_name == o.campaign_name &&
240
241
  campaign_tags == o.campaign_tags &&
241
242
  campaign_state == o.campaign_state &&
242
- campaign_active_ruleset_id == o.campaign_active_ruleset_id &&
243
- campaign_start_time == o.campaign_start_time &&
244
- campaign_end_time == o.campaign_end_time &&
245
243
  total_revenue == o.total_revenue &&
246
244
  sessions_count == o.sessions_count &&
247
245
  avg_items_per_session == o.avg_items_per_session &&
@@ -259,7 +257,7 @@ module TalonOne
259
257
  # Calculates hash code according to all attributes.
260
258
  # @return [Integer] Hash code
261
259
  def hash
262
- [start_time, end_time, campaign_id, campaign_name, campaign_tags, campaign_state, campaign_active_ruleset_id, campaign_start_time, campaign_end_time, total_revenue, sessions_count, avg_items_per_session, avg_session_value, total_discounts, coupons_count].hash
260
+ [start_time, end_time, campaign_id, campaign_name, campaign_tags, campaign_state, total_revenue, sessions_count, avg_items_per_session, avg_session_value, total_discounts, coupons_count].hash
263
261
  end
264
262
 
265
263
  # Builds the object from hash
@@ -15,9 +15,6 @@ require 'date'
15
15
  module TalonOne
16
16
  # Provides statistics regarding an application's campaigns.
17
17
  class ApplicationCampaignStats
18
- # Number of draft campaigns.
19
- attr_accessor :draft
20
-
21
18
  # Number of disabled campaigns.
22
19
  attr_accessor :disabled
23
20
 
@@ -36,7 +33,6 @@ module TalonOne
36
33
  # Attribute mapping from ruby-style variable name to JSON key.
37
34
  def self.attribute_map
38
35
  {
39
- :'draft' => :'draft',
40
36
  :'disabled' => :'disabled',
41
37
  :'scheduled' => :'scheduled',
42
38
  :'running' => :'running',
@@ -48,7 +44,6 @@ module TalonOne
48
44
  # Attribute type mapping.
49
45
  def self.openapi_types
50
46
  {
51
- :'draft' => :'Integer',
52
47
  :'disabled' => :'Integer',
53
48
  :'scheduled' => :'Integer',
54
49
  :'running' => :'Integer',
@@ -78,10 +73,6 @@ module TalonOne
78
73
  h[k.to_sym] = v
79
74
  }
80
75
 
81
- if attributes.key?(:'draft')
82
- self.draft = attributes[:'draft']
83
- end
84
-
85
76
  if attributes.key?(:'disabled')
86
77
  self.disabled = attributes[:'disabled']
87
78
  end
@@ -107,10 +98,6 @@ module TalonOne
107
98
  # @return Array for valid properties with the reasons
108
99
  def list_invalid_properties
109
100
  invalid_properties = Array.new
110
- if @draft.nil?
111
- invalid_properties.push('invalid value for "draft", draft cannot be nil.')
112
- end
113
-
114
101
  if @disabled.nil?
115
102
  invalid_properties.push('invalid value for "disabled", disabled cannot be nil.')
116
103
  end
@@ -137,7 +124,6 @@ module TalonOne
137
124
  # Check to see if the all the properties in the model are valid
138
125
  # @return true if the model is valid
139
126
  def valid?
140
- return false if @draft.nil?
141
127
  return false if @disabled.nil?
142
128
  return false if @scheduled.nil?
143
129
  return false if @running.nil?
@@ -151,7 +137,6 @@ module TalonOne
151
137
  def ==(o)
152
138
  return true if self.equal?(o)
153
139
  self.class == o.class &&
154
- draft == o.draft &&
155
140
  disabled == o.disabled &&
156
141
  scheduled == o.scheduled &&
157
142
  running == o.running &&
@@ -168,7 +153,7 @@ module TalonOne
168
153
  # Calculates hash code according to all attributes.
169
154
  # @return [Integer] Hash code
170
155
  def hash
171
- [draft, disabled, scheduled, running, expired, archived].hash
156
+ [disabled, scheduled, running, expired, archived].hash
172
157
  end
173
158
 
174
159
  # Builds the object from hash
@@ -0,0 +1,308 @@
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
+ #
17
+ class ApplicationCIF
18
+ # Internal ID of this entity.
19
+ attr_accessor :id
20
+
21
+ # The time this entity was created.
22
+ attr_accessor :created
23
+
24
+ # The name of the Application cart item filter used in API requests.
25
+ attr_accessor :name
26
+
27
+ # A short description of the Application cart item filter.
28
+ attr_accessor :description
29
+
30
+ # The ID of the expression that the Application cart item filter uses.
31
+ attr_accessor :active_expression_id
32
+
33
+ # The ID of the user who last updated the Application cart item filter.
34
+ attr_accessor :modified_by
35
+
36
+ # The ID of the user who created the Application cart item filter.
37
+ attr_accessor :created_by
38
+
39
+ # Timestamp of the most recent update to the Application cart item filter.
40
+ attr_accessor :modified
41
+
42
+ # The ID of the application that owns this entity.
43
+ attr_accessor :application_id
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'id' => :'id',
49
+ :'created' => :'created',
50
+ :'name' => :'name',
51
+ :'description' => :'description',
52
+ :'active_expression_id' => :'activeExpressionId',
53
+ :'modified_by' => :'modifiedBy',
54
+ :'created_by' => :'createdBy',
55
+ :'modified' => :'modified',
56
+ :'application_id' => :'applicationId'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'id' => :'Integer',
64
+ :'created' => :'DateTime',
65
+ :'name' => :'String',
66
+ :'description' => :'String',
67
+ :'active_expression_id' => :'Integer',
68
+ :'modified_by' => :'Integer',
69
+ :'created_by' => :'Integer',
70
+ :'modified' => :'DateTime',
71
+ :'application_id' => :'Integer'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ApplicationCIF` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ApplicationCIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'id')
97
+ self.id = attributes[:'id']
98
+ end
99
+
100
+ if attributes.key?(:'created')
101
+ self.created = attributes[:'created']
102
+ end
103
+
104
+ if attributes.key?(:'name')
105
+ self.name = attributes[:'name']
106
+ end
107
+
108
+ if attributes.key?(:'description')
109
+ self.description = attributes[:'description']
110
+ end
111
+
112
+ if attributes.key?(:'active_expression_id')
113
+ self.active_expression_id = attributes[:'active_expression_id']
114
+ end
115
+
116
+ if attributes.key?(:'modified_by')
117
+ self.modified_by = attributes[:'modified_by']
118
+ end
119
+
120
+ if attributes.key?(:'created_by')
121
+ self.created_by = attributes[:'created_by']
122
+ end
123
+
124
+ if attributes.key?(:'modified')
125
+ self.modified = attributes[:'modified']
126
+ end
127
+
128
+ if attributes.key?(:'application_id')
129
+ self.application_id = attributes[:'application_id']
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ invalid_properties = Array.new
137
+ if @id.nil?
138
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
139
+ end
140
+
141
+ if @created.nil?
142
+ invalid_properties.push('invalid value for "created", created cannot be nil.')
143
+ end
144
+
145
+ if @name.nil?
146
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
147
+ end
148
+
149
+ if @application_id.nil?
150
+ invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
151
+ end
152
+
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if @id.nil?
160
+ return false if @created.nil?
161
+ return false if @name.nil?
162
+ return false if @application_id.nil?
163
+ true
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ id == o.id &&
172
+ created == o.created &&
173
+ name == o.name &&
174
+ description == o.description &&
175
+ active_expression_id == o.active_expression_id &&
176
+ modified_by == o.modified_by &&
177
+ created_by == o.created_by &&
178
+ modified == o.modified &&
179
+ application_id == o.application_id
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Integer] Hash code
190
+ def hash
191
+ [id, created, name, description, active_expression_id, modified_by, created_by, modified, application_id].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def self.build_from_hash(attributes)
198
+ new.build_from_hash(attributes)
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ self.class.openapi_types.each_pair do |key, type|
207
+ if type =~ /\AArray<(.*)>/i
208
+ # check to ensure the input is an array given that the attribute
209
+ # is documented as an array but the input is not
210
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
211
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
212
+ end
213
+ elsif !attributes[self.class.attribute_map[key]].nil?
214
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
215
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
216
+ end
217
+
218
+ self
219
+ end
220
+
221
+ # Deserializes the data based on type
222
+ # @param string type Data type
223
+ # @param string value Value to be deserialized
224
+ # @return [Object] Deserialized data
225
+ def _deserialize(type, value)
226
+ case type.to_sym
227
+ when :DateTime
228
+ DateTime.parse(value)
229
+ when :Date
230
+ Date.parse(value)
231
+ when :String
232
+ value.to_s
233
+ when :Integer
234
+ value.to_i
235
+ when :Float
236
+ value.to_f
237
+ when :Boolean
238
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
239
+ true
240
+ else
241
+ false
242
+ end
243
+ when :Object
244
+ # generic object (usually a Hash), return directly
245
+ value
246
+ when /\AArray<(?<inner_type>.+)>\z/
247
+ inner_type = Regexp.last_match[:inner_type]
248
+ value.map { |v| _deserialize(inner_type, v) }
249
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
250
+ k_type = Regexp.last_match[:k_type]
251
+ v_type = Regexp.last_match[:v_type]
252
+ {}.tap do |hash|
253
+ value.each do |k, v|
254
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
255
+ end
256
+ end
257
+ else # model
258
+ TalonOne.const_get(type).build_from_hash(value)
259
+ end
260
+ end
261
+
262
+ # Returns the string representation of the object
263
+ # @return [String] String presentation of the object
264
+ def to_s
265
+ to_hash.to_s
266
+ end
267
+
268
+ # to_body is an alias to to_hash (backward compatibility)
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_body
271
+ to_hash
272
+ end
273
+
274
+ # Returns the object in the form of hash
275
+ # @return [Hash] Returns the object in the form of hash
276
+ def to_hash
277
+ hash = {}
278
+ self.class.attribute_map.each_pair do |attr, param|
279
+ value = self.send(attr)
280
+ if value.nil?
281
+ is_nullable = self.class.openapi_nullable.include?(attr)
282
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
283
+ end
284
+
285
+ hash[param] = _to_hash(value)
286
+ end
287
+ hash
288
+ end
289
+
290
+ # Outputs non-array value in the form of hash
291
+ # For object, use to_hash. Otherwise, just return the value
292
+ # @param [Object] value Any valid value
293
+ # @return [Hash] Returns the value in the form of hash
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map { |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+ end
308
+ end