talon_one 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (507) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +29 -9
  4. data/docs/AccountAnalytics.md +25 -19
  5. data/docs/AccountLimits.md +13 -13
  6. data/docs/AddLoyaltyPointsEffectProps.md +4 -2
  7. data/docs/Application.md +9 -1
  8. data/docs/ApplicationAPIKey.md +8 -6
  9. data/docs/ApplicationCustomer.md +3 -1
  10. data/docs/ApplicationSession.md +1 -1
  11. data/docs/Audience.md +27 -0
  12. data/docs/AudienceMembership.md +19 -0
  13. data/docs/Campaign.md +2 -0
  14. data/docs/CampaignAnalytics.md +9 -1
  15. data/docs/CampaignCopy.md +1 -1
  16. data/docs/CampaignGroup.md +31 -0
  17. data/docs/CampaignGroupEntity.md +17 -0
  18. data/docs/CreateApplicationAPIKey.md +3 -1
  19. data/docs/CustomerActivityReport.md +1 -1
  20. data/docs/CustomerInventory.md +2 -0
  21. data/docs/CustomerProfile.md +3 -1
  22. data/docs/CustomerProfileAudienceRequest.md +17 -0
  23. data/docs/CustomerProfileAudienceRequestItem.md +21 -0
  24. data/docs/CustomerProfileIntegrationRequestV2.md +19 -0
  25. data/docs/CustomerSession.md +1 -1
  26. data/docs/CustomerSessionV2.md +1 -1
  27. data/docs/EntityWithTalangVisibleID.md +19 -0
  28. data/docs/FeedNotification.md +27 -0
  29. data/docs/InlineResponse20012.md +3 -1
  30. data/docs/IntegrationApi.md +139 -18
  31. data/docs/IntegrationEntity.md +1 -1
  32. data/docs/LoyaltyLedgerEntry.md +2 -0
  33. data/docs/LoyaltyPoints.md +4 -2
  34. data/docs/LoyaltyProgram.md +3 -1
  35. data/docs/LoyaltyStatistics.md +23 -0
  36. data/docs/LoyaltySubLedger.md +18 -4
  37. data/docs/ManagementApi.md +75 -10
  38. data/docs/Meta.md +1 -1
  39. data/docs/MultipleCustomerProfileIntegrationRequest.md +17 -0
  40. data/docs/MultipleCustomerProfileIntegrationRequestItem.md +19 -0
  41. data/docs/MultipleCustomerProfileIntegrationResponseV2.md +17 -0
  42. data/docs/NewApplication.md +9 -1
  43. data/docs/NewApplicationAPIKey.md +7 -5
  44. data/docs/NewAudience.md +21 -0
  45. data/docs/NewCampaign.md +3 -1
  46. data/docs/NewCampaignGroup.md +23 -0
  47. data/docs/NewLoyaltyProgram.md +3 -1
  48. data/docs/Role.md +3 -1
  49. data/docs/SetDiscountEffectProps.md +3 -1
  50. data/docs/SetDiscountPerItemEffectProps.md +3 -1
  51. data/docs/UpdateApplication.md +10 -2
  52. data/docs/UpdateAudience.md +17 -0
  53. data/docs/UpdateCampaign.md +3 -1
  54. data/docs/UpdateCampaignGroup.md +23 -0
  55. data/docs/UpdateLoyaltyProgram.md +3 -1
  56. data/docs/UpdateUser.md +0 -4
  57. data/docs/UpdateUserLatestFeedTimestamp.md +17 -0
  58. data/docs/User.md +3 -5
  59. data/docs/UserFeedNotifications.md +19 -0
  60. data/lib/talon_one.rb +20 -3
  61. data/lib/talon_one/api/integration_api.rb +163 -25
  62. data/lib/talon_one/api/management_api.rb +86 -14
  63. data/lib/talon_one/api_client.rb +8 -6
  64. data/lib/talon_one/api_error.rb +1 -1
  65. data/lib/talon_one/configuration.rb +1 -1
  66. data/lib/talon_one/models/accept_coupon_effect_props.rb +1 -1
  67. data/lib/talon_one/models/accept_referral_effect_props.rb +1 -1
  68. data/lib/talon_one/models/access_log_entry.rb +1 -1
  69. data/lib/talon_one/models/account.rb +1 -1
  70. data/lib/talon_one/models/account_additional_cost.rb +1 -1
  71. data/lib/talon_one/models/account_analytics.rb +102 -57
  72. data/lib/talon_one/models/account_entity.rb +1 -1
  73. data/lib/talon_one/models/account_limits.rb +28 -23
  74. data/lib/talon_one/models/add_free_item_effect_props.rb +1 -1
  75. data/lib/talon_one/models/add_loyalty_points_effect_props.rb +19 -14
  76. data/lib/talon_one/models/additional_cost.rb +1 -1
  77. data/lib/talon_one/models/api_error.rb +1 -1
  78. data/lib/talon_one/models/application.rb +55 -3
  79. data/lib/talon_one/models/application_api_health.rb +1 -1
  80. data/lib/talon_one/models/application_api_key.rb +79 -34
  81. data/lib/talon_one/models/application_customer.rb +15 -3
  82. data/lib/talon_one/models/application_customer_entity.rb +1 -1
  83. data/lib/talon_one/models/application_customer_search.rb +1 -1
  84. data/lib/talon_one/models/application_entity.rb +1 -1
  85. data/lib/talon_one/models/application_event.rb +1 -1
  86. data/lib/talon_one/models/application_session.rb +2 -2
  87. data/lib/talon_one/models/application_session_entity.rb +1 -1
  88. data/lib/talon_one/models/attribute.rb +1 -1
  89. data/lib/talon_one/models/attributes_mandatory.rb +1 -1
  90. data/lib/talon_one/models/attributes_settings.rb +1 -1
  91. data/lib/talon_one/models/audience.rb +360 -0
  92. data/lib/talon_one/models/audience_membership.rb +227 -0
  93. data/lib/talon_one/models/base_saml_connection.rb +1 -1
  94. data/lib/talon_one/models/binding.rb +1 -1
  95. data/lib/talon_one/models/campaign.rb +14 -2
  96. data/lib/talon_one/models/campaign_analytics.rb +65 -5
  97. data/lib/talon_one/models/campaign_copy.rb +2 -2
  98. data/lib/talon_one/models/campaign_entity.rb +1 -1
  99. data/lib/talon_one/models/campaign_group.rb +326 -0
  100. data/lib/talon_one/models/campaign_group_entity.rb +209 -0
  101. data/lib/talon_one/models/campaign_search.rb +1 -1
  102. data/lib/talon_one/models/campaign_set.rb +1 -1
  103. data/lib/talon_one/models/campaign_set_branch_node.rb +1 -1
  104. data/lib/talon_one/models/campaign_set_leaf_node.rb +1 -1
  105. data/lib/talon_one/models/campaign_set_node.rb +1 -1
  106. data/lib/talon_one/models/cart_item.rb +1 -1
  107. data/lib/talon_one/models/cart_item_adjustment.rb +1 -1
  108. data/lib/talon_one/models/change.rb +1 -1
  109. data/lib/talon_one/models/change_profile_password.rb +1 -1
  110. data/lib/talon_one/models/code_generator_settings.rb +1 -1
  111. data/lib/talon_one/models/coupon.rb +1 -1
  112. data/lib/talon_one/models/coupon_constraints.rb +1 -1
  113. data/lib/talon_one/models/coupon_created_effect_props.rb +1 -1
  114. data/lib/talon_one/models/coupon_rejection_reason.rb +3 -3
  115. data/lib/talon_one/models/coupon_reservations.rb +1 -1
  116. data/lib/talon_one/models/coupon_search.rb +1 -1
  117. data/lib/talon_one/models/coupon_value.rb +1 -1
  118. data/lib/talon_one/models/create_application_api_key.rb +49 -5
  119. data/lib/talon_one/models/customer_activity_report.rb +2 -2
  120. data/lib/talon_one/models/customer_analytics.rb +1 -1
  121. data/lib/talon_one/models/customer_inventory.rb +11 -2
  122. data/lib/talon_one/models/customer_profile.rb +15 -3
  123. data/lib/talon_one/models/{misc_update_user_latest_feature.rb → customer_profile_audience_request.rb} +13 -11
  124. data/lib/talon_one/models/customer_profile_audience_request_item.rb +273 -0
  125. data/lib/talon_one/models/customer_profile_integration_request_v2.rb +242 -0
  126. data/lib/talon_one/models/customer_profile_search_query.rb +1 -1
  127. data/lib/talon_one/models/customer_session.rb +2 -2
  128. data/lib/talon_one/models/customer_session_v2.rb +2 -2
  129. data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +1 -1
  130. data/lib/talon_one/models/effect.rb +1 -1
  131. data/lib/talon_one/models/effect_entity.rb +1 -1
  132. data/lib/talon_one/models/email_entity.rb +1 -1
  133. data/lib/talon_one/models/entity.rb +1 -1
  134. data/lib/talon_one/models/entity_with_talang_visible_id.rb +227 -0
  135. data/lib/talon_one/models/environment.rb +1 -1
  136. data/lib/talon_one/models/error_effect_props.rb +1 -1
  137. data/lib/talon_one/models/error_response.rb +1 -1
  138. data/lib/talon_one/models/error_source.rb +1 -1
  139. data/lib/talon_one/models/event.rb +1 -1
  140. data/lib/talon_one/models/event_type.rb +1 -1
  141. data/lib/talon_one/models/export.rb +1 -1
  142. data/lib/talon_one/models/feature_flag.rb +1 -1
  143. data/lib/talon_one/models/feature_flags.rb +1 -1
  144. data/lib/talon_one/models/features_feed.rb +1 -1
  145. data/lib/talon_one/models/feed_notification.rb +322 -0
  146. data/lib/talon_one/models/func_arg_def.rb +1 -1
  147. data/lib/talon_one/models/function_def.rb +1 -1
  148. data/lib/talon_one/models/import.rb +1 -1
  149. data/lib/talon_one/models/import_coupons.rb +1 -1
  150. data/lib/talon_one/models/inline_response200.rb +1 -1
  151. data/lib/talon_one/models/inline_response2001.rb +1 -1
  152. data/lib/talon_one/models/inline_response20010.rb +1 -1
  153. data/lib/talon_one/models/inline_response20011.rb +1 -1
  154. data/lib/talon_one/models/inline_response20012.rb +11 -7
  155. data/lib/talon_one/models/inline_response20013.rb +1 -1
  156. data/lib/talon_one/models/inline_response20014.rb +1 -1
  157. data/lib/talon_one/models/inline_response20015.rb +1 -1
  158. data/lib/talon_one/models/inline_response20016.rb +1 -1
  159. data/lib/talon_one/models/inline_response20017.rb +1 -1
  160. data/lib/talon_one/models/inline_response20018.rb +1 -1
  161. data/lib/talon_one/models/inline_response20019.rb +1 -1
  162. data/lib/talon_one/models/inline_response2002.rb +1 -1
  163. data/lib/talon_one/models/inline_response20020.rb +1 -1
  164. data/lib/talon_one/models/inline_response20021.rb +1 -1
  165. data/lib/talon_one/models/inline_response20022.rb +1 -1
  166. data/lib/talon_one/models/inline_response20023.rb +1 -1
  167. data/lib/talon_one/models/inline_response20024.rb +1 -1
  168. data/lib/talon_one/models/inline_response20025.rb +1 -1
  169. data/lib/talon_one/models/inline_response20026.rb +1 -1
  170. data/lib/talon_one/models/inline_response20027.rb +1 -1
  171. data/lib/talon_one/models/inline_response20028.rb +1 -1
  172. data/lib/talon_one/models/inline_response20029.rb +1 -1
  173. data/lib/talon_one/models/inline_response2003.rb +1 -1
  174. data/lib/talon_one/models/inline_response20030.rb +1 -1
  175. data/lib/talon_one/models/inline_response2004.rb +1 -1
  176. data/lib/talon_one/models/inline_response2005.rb +1 -1
  177. data/lib/talon_one/models/inline_response2006.rb +1 -1
  178. data/lib/talon_one/models/inline_response2007.rb +1 -1
  179. data/lib/talon_one/models/inline_response2008.rb +1 -1
  180. data/lib/talon_one/models/inline_response2009.rb +1 -1
  181. data/lib/talon_one/models/integration_entity.rb +2 -2
  182. data/lib/talon_one/models/integration_event.rb +1 -1
  183. data/lib/talon_one/models/integration_profile_entity.rb +1 -1
  184. data/lib/talon_one/models/integration_request.rb +1 -1
  185. data/lib/talon_one/models/integration_state.rb +1 -1
  186. data/lib/talon_one/models/integration_state_v2.rb +1 -1
  187. data/lib/talon_one/models/ledger_entry.rb +1 -1
  188. data/lib/talon_one/models/library_attribute.rb +1 -1
  189. data/lib/talon_one/models/limit_config.rb +1 -1
  190. data/lib/talon_one/models/login_params.rb +1 -1
  191. data/lib/talon_one/models/loyalty.rb +1 -1
  192. data/lib/talon_one/models/loyalty_ledger.rb +1 -1
  193. data/lib/talon_one/models/loyalty_ledger_entry.rb +11 -2
  194. data/lib/talon_one/models/loyalty_membership.rb +1 -1
  195. data/lib/talon_one/models/loyalty_points.rb +19 -9
  196. data/lib/talon_one/models/loyalty_program.rb +18 -3
  197. data/lib/talon_one/models/loyalty_program_balance.rb +1 -1
  198. data/lib/talon_one/models/loyalty_program_ledgers.rb +1 -1
  199. data/lib/talon_one/models/loyalty_statistics.rb +258 -0
  200. data/lib/talon_one/models/loyalty_sub_ledger.rb +104 -7
  201. data/lib/talon_one/models/manager_config.rb +1 -1
  202. data/lib/talon_one/models/meta.rb +2 -1
  203. data/lib/talon_one/models/multi_application_entity.rb +1 -1
  204. data/lib/talon_one/models/multiple_customer_profile_integration_request.rb +208 -0
  205. data/lib/talon_one/models/multiple_customer_profile_integration_request_item.rb +223 -0
  206. data/lib/talon_one/models/{customer_profile_update.rb → multiple_customer_profile_integration_response_v2.rb} +13 -16
  207. data/lib/talon_one/models/mutable_entity.rb +1 -1
  208. data/lib/talon_one/models/new_account.rb +1 -1
  209. data/lib/talon_one/models/new_account_sign_up.rb +1 -1
  210. data/lib/talon_one/models/new_additional_cost.rb +1 -1
  211. data/lib/talon_one/models/new_application.rb +55 -3
  212. data/lib/talon_one/models/new_application_api_key.rb +76 -32
  213. data/lib/talon_one/models/new_attribute.rb +1 -1
  214. data/lib/talon_one/models/new_audience.rb +314 -0
  215. data/lib/talon_one/models/new_campaign.rb +17 -5
  216. data/lib/talon_one/models/new_campaign_group.rb +265 -0
  217. data/lib/talon_one/models/new_campaign_set.rb +1 -1
  218. data/lib/talon_one/models/new_coupons.rb +1 -1
  219. data/lib/talon_one/models/new_customer_profile.rb +1 -1
  220. data/lib/talon_one/models/new_customer_session.rb +1 -1
  221. data/lib/talon_one/models/new_customer_session_v2.rb +1 -1
  222. data/lib/talon_one/models/new_event.rb +1 -1
  223. data/lib/talon_one/models/new_event_type.rb +1 -1
  224. data/lib/talon_one/models/new_feature_flags.rb +1 -1
  225. data/lib/talon_one/models/new_import.rb +1 -1
  226. data/lib/talon_one/models/new_invitation.rb +1 -1
  227. data/lib/talon_one/models/new_invite_email.rb +1 -1
  228. data/lib/talon_one/models/new_loyalty_program.rb +18 -3
  229. data/lib/talon_one/models/new_password.rb +1 -1
  230. data/lib/talon_one/models/new_password_email.rb +1 -1
  231. data/lib/talon_one/models/new_referral.rb +1 -1
  232. data/lib/talon_one/models/new_role.rb +1 -1
  233. data/lib/talon_one/models/new_ruleset.rb +1 -1
  234. data/lib/talon_one/models/new_saml_connection.rb +1 -1
  235. data/lib/talon_one/models/new_template_def.rb +1 -1
  236. data/lib/talon_one/models/new_user.rb +1 -1
  237. data/lib/talon_one/models/new_webhook.rb +1 -1
  238. data/lib/talon_one/models/notification.rb +1 -1
  239. data/lib/talon_one/models/redeem_referral_effect_props.rb +1 -1
  240. data/lib/talon_one/models/referral.rb +1 -1
  241. data/lib/talon_one/models/referral_created_effect_props.rb +1 -1
  242. data/lib/talon_one/models/referral_rejection_reason.rb +3 -3
  243. data/lib/talon_one/models/reject_coupon_effect_props.rb +1 -1
  244. data/lib/talon_one/models/reject_referral_effect_props.rb +1 -1
  245. data/lib/talon_one/models/role.rb +14 -4
  246. data/lib/talon_one/models/role_assign.rb +1 -1
  247. data/lib/talon_one/models/role_membership.rb +1 -1
  248. data/lib/talon_one/models/rollback_coupon_effect_props.rb +1 -1
  249. data/lib/talon_one/models/rollback_discount_effect_props.rb +1 -1
  250. data/lib/talon_one/models/rule.rb +1 -1
  251. data/lib/talon_one/models/ruleset.rb +1 -1
  252. data/lib/talon_one/models/saml_connection.rb +1 -1
  253. data/lib/talon_one/models/saml_connection_metadata.rb +1 -1
  254. data/lib/talon_one/models/saml_login_endpoint.rb +1 -1
  255. data/lib/talon_one/models/session.rb +1 -1
  256. data/lib/talon_one/models/set_discount_effect_props.rb +16 -6
  257. data/lib/talon_one/models/set_discount_per_item_effect_props.rb +15 -5
  258. data/lib/talon_one/models/show_bundle_metadata_effect_props.rb +1 -1
  259. data/lib/talon_one/models/show_notification_effect_props.rb +1 -1
  260. data/lib/talon_one/models/slot_def.rb +1 -1
  261. data/lib/talon_one/models/template_arg_def.rb +1 -1
  262. data/lib/talon_one/models/template_def.rb +1 -1
  263. data/lib/talon_one/models/trigger_webhook_effect_props.rb +1 -1
  264. data/lib/talon_one/models/update_account.rb +1 -1
  265. data/lib/talon_one/models/update_application.rb +58 -6
  266. data/lib/talon_one/models/update_attribute_effect_props.rb +1 -1
  267. data/lib/talon_one/models/update_audience.rb +231 -0
  268. data/lib/talon_one/models/update_campaign.rb +17 -5
  269. data/lib/talon_one/models/update_campaign_group.rb +266 -0
  270. data/lib/talon_one/models/update_coupon.rb +1 -1
  271. data/lib/talon_one/models/update_coupon_batch.rb +1 -1
  272. data/lib/talon_one/models/update_loyalty_program.rb +13 -3
  273. data/lib/talon_one/models/update_role.rb +1 -1
  274. data/lib/talon_one/models/update_user.rb +2 -22
  275. data/lib/talon_one/models/update_user_latest_feed_timestamp.rb +213 -0
  276. data/lib/talon_one/models/user.rb +11 -26
  277. data/lib/talon_one/models/user_entity.rb +1 -1
  278. data/lib/talon_one/models/user_feed_notifications.rb +230 -0
  279. data/lib/talon_one/models/webhook.rb +1 -1
  280. data/lib/talon_one/models/webhook_activation_log_entry.rb +1 -1
  281. data/lib/talon_one/models/webhook_log_entry.rb +1 -1
  282. data/lib/talon_one/version.rb +2 -2
  283. data/spec/api/integration_api_spec.rb +36 -8
  284. data/spec/api/management_api_spec.rb +19 -3
  285. data/spec/api_client_spec.rb +2 -2
  286. data/spec/configuration_spec.rb +1 -1
  287. data/spec/models/accept_coupon_effect_props_spec.rb +1 -1
  288. data/spec/models/accept_referral_effect_props_spec.rb +1 -1
  289. data/spec/models/access_log_entry_spec.rb +1 -1
  290. data/spec/models/account_additional_cost_spec.rb +1 -1
  291. data/spec/models/account_analytics_spec.rb +27 -9
  292. data/spec/models/account_entity_spec.rb +1 -1
  293. data/spec/models/account_limits_spec.rb +7 -7
  294. data/spec/models/account_spec.rb +1 -1
  295. data/spec/models/add_free_item_effect_props_spec.rb +1 -1
  296. data/spec/models/add_loyalty_points_effect_props_spec.rb +8 -2
  297. data/spec/models/additional_cost_spec.rb +1 -1
  298. data/spec/models/api_error_spec.rb +1 -1
  299. data/spec/models/application_api_health_spec.rb +1 -1
  300. data/spec/models/application_api_key_spec.rb +18 -8
  301. data/spec/models/application_customer_entity_spec.rb +1 -1
  302. data/spec/models/application_customer_search_spec.rb +1 -1
  303. data/spec/models/application_customer_spec.rb +7 -1
  304. data/spec/models/application_entity_spec.rb +1 -1
  305. data/spec/models/application_event_spec.rb +1 -1
  306. data/spec/models/application_session_entity_spec.rb +1 -1
  307. data/spec/models/application_session_spec.rb +1 -1
  308. data/spec/models/application_spec.rb +29 -1
  309. data/spec/models/attribute_spec.rb +1 -1
  310. data/spec/models/attributes_mandatory_spec.rb +1 -1
  311. data/spec/models/attributes_settings_spec.rb +1 -1
  312. data/spec/models/audience_membership_spec.rb +47 -0
  313. data/spec/models/audience_spec.rb +75 -0
  314. data/spec/models/base_saml_connection_spec.rb +1 -1
  315. data/spec/models/binding_spec.rb +1 -1
  316. data/spec/models/campaign_analytics_spec.rb +25 -1
  317. data/spec/models/campaign_copy_spec.rb +1 -1
  318. data/spec/models/campaign_entity_spec.rb +1 -1
  319. data/spec/models/{misc_update_user_latest_feature_spec.rb → campaign_group_entity_spec.rb} +8 -8
  320. data/spec/models/campaign_group_spec.rb +83 -0
  321. data/spec/models/campaign_search_spec.rb +1 -1
  322. data/spec/models/campaign_set_branch_node_spec.rb +1 -1
  323. data/spec/models/campaign_set_leaf_node_spec.rb +1 -1
  324. data/spec/models/campaign_set_node_spec.rb +1 -1
  325. data/spec/models/campaign_set_spec.rb +1 -1
  326. data/spec/models/campaign_spec.rb +7 -1
  327. data/spec/models/cart_item_adjustment_spec.rb +1 -1
  328. data/spec/models/cart_item_spec.rb +1 -1
  329. data/spec/models/change_profile_password_spec.rb +1 -1
  330. data/spec/models/change_spec.rb +1 -1
  331. data/spec/models/code_generator_settings_spec.rb +1 -1
  332. data/spec/models/coupon_constraints_spec.rb +1 -1
  333. data/spec/models/coupon_created_effect_props_spec.rb +1 -1
  334. data/spec/models/coupon_rejection_reason_spec.rb +2 -2
  335. data/spec/models/coupon_reservations_spec.rb +1 -1
  336. data/spec/models/coupon_search_spec.rb +1 -1
  337. data/spec/models/coupon_spec.rb +1 -1
  338. data/spec/models/coupon_value_spec.rb +1 -1
  339. data/spec/models/create_application_api_key_spec.rb +11 -1
  340. data/spec/models/customer_activity_report_spec.rb +1 -1
  341. data/spec/models/customer_analytics_spec.rb +1 -1
  342. data/spec/models/customer_inventory_spec.rb +7 -1
  343. data/spec/models/customer_profile_audience_request_item_spec.rb +57 -0
  344. data/spec/models/{customer_profile_update_spec.rb → customer_profile_audience_request_spec.rb} +8 -8
  345. data/spec/models/customer_profile_integration_request_v2_spec.rb +51 -0
  346. data/spec/models/customer_profile_search_query_spec.rb +1 -1
  347. data/spec/models/customer_profile_spec.rb +7 -1
  348. data/spec/models/customer_session_spec.rb +1 -1
  349. data/spec/models/customer_session_v2_spec.rb +1 -1
  350. data/spec/models/deduct_loyalty_points_effect_props_spec.rb +1 -1
  351. data/spec/models/effect_entity_spec.rb +1 -1
  352. data/spec/models/effect_spec.rb +1 -1
  353. data/spec/models/email_entity_spec.rb +1 -1
  354. data/spec/models/entity_spec.rb +1 -1
  355. data/spec/models/entity_with_talang_visible_id_spec.rb +47 -0
  356. data/spec/models/environment_spec.rb +1 -1
  357. data/spec/models/error_effect_props_spec.rb +1 -1
  358. data/spec/models/error_response_spec.rb +1 -1
  359. data/spec/models/error_source_spec.rb +1 -1
  360. data/spec/models/event_spec.rb +1 -1
  361. data/spec/models/event_type_spec.rb +1 -1
  362. data/spec/models/export_spec.rb +1 -1
  363. data/spec/models/feature_flag_spec.rb +1 -1
  364. data/spec/models/feature_flags_spec.rb +1 -1
  365. data/spec/models/features_feed_spec.rb +1 -1
  366. data/spec/models/feed_notification_spec.rb +75 -0
  367. data/spec/models/func_arg_def_spec.rb +1 -1
  368. data/spec/models/function_def_spec.rb +1 -1
  369. data/spec/models/import_coupons_spec.rb +1 -1
  370. data/spec/models/import_spec.rb +1 -1
  371. data/spec/models/inline_response20010_spec.rb +1 -1
  372. data/spec/models/inline_response20011_spec.rb +1 -1
  373. data/spec/models/inline_response20012_spec.rb +7 -1
  374. data/spec/models/inline_response20013_spec.rb +1 -1
  375. data/spec/models/inline_response20014_spec.rb +1 -1
  376. data/spec/models/inline_response20015_spec.rb +1 -1
  377. data/spec/models/inline_response20016_spec.rb +1 -1
  378. data/spec/models/inline_response20017_spec.rb +1 -1
  379. data/spec/models/inline_response20018_spec.rb +1 -1
  380. data/spec/models/inline_response20019_spec.rb +1 -1
  381. data/spec/models/inline_response2001_spec.rb +1 -1
  382. data/spec/models/inline_response20020_spec.rb +1 -1
  383. data/spec/models/inline_response20021_spec.rb +1 -1
  384. data/spec/models/inline_response20022_spec.rb +1 -1
  385. data/spec/models/inline_response20023_spec.rb +1 -1
  386. data/spec/models/inline_response20024_spec.rb +1 -1
  387. data/spec/models/inline_response20025_spec.rb +1 -1
  388. data/spec/models/inline_response20026_spec.rb +1 -1
  389. data/spec/models/inline_response20027_spec.rb +1 -1
  390. data/spec/models/inline_response20028_spec.rb +1 -1
  391. data/spec/models/inline_response20029_spec.rb +1 -1
  392. data/spec/models/inline_response2002_spec.rb +1 -1
  393. data/spec/models/inline_response20030_spec.rb +1 -1
  394. data/spec/models/inline_response2003_spec.rb +1 -1
  395. data/spec/models/inline_response2004_spec.rb +1 -1
  396. data/spec/models/inline_response2005_spec.rb +1 -1
  397. data/spec/models/inline_response2006_spec.rb +1 -1
  398. data/spec/models/inline_response2007_spec.rb +1 -1
  399. data/spec/models/inline_response2008_spec.rb +1 -1
  400. data/spec/models/inline_response2009_spec.rb +1 -1
  401. data/spec/models/inline_response200_spec.rb +1 -1
  402. data/spec/models/integration_entity_spec.rb +1 -1
  403. data/spec/models/integration_event_spec.rb +1 -1
  404. data/spec/models/integration_profile_entity_spec.rb +1 -1
  405. data/spec/models/integration_request_spec.rb +1 -1
  406. data/spec/models/integration_state_spec.rb +1 -1
  407. data/spec/models/integration_state_v2_spec.rb +1 -1
  408. data/spec/models/ledger_entry_spec.rb +1 -1
  409. data/spec/models/library_attribute_spec.rb +1 -1
  410. data/spec/models/limit_config_spec.rb +1 -1
  411. data/spec/models/login_params_spec.rb +1 -1
  412. data/spec/models/loyalty_ledger_entry_spec.rb +7 -1
  413. data/spec/models/loyalty_ledger_spec.rb +1 -1
  414. data/spec/models/loyalty_membership_spec.rb +1 -1
  415. data/spec/models/loyalty_points_spec.rb +8 -2
  416. data/spec/models/loyalty_program_balance_spec.rb +1 -1
  417. data/spec/models/loyalty_program_ledgers_spec.rb +1 -1
  418. data/spec/models/loyalty_program_spec.rb +7 -1
  419. data/spec/models/loyalty_spec.rb +1 -1
  420. data/spec/models/loyalty_statistics_spec.rb +59 -0
  421. data/spec/models/loyalty_sub_ledger_spec.rb +43 -1
  422. data/spec/models/manager_config_spec.rb +1 -1
  423. data/spec/models/meta_spec.rb +1 -1
  424. data/spec/models/multi_application_entity_spec.rb +1 -1
  425. data/spec/models/multiple_customer_profile_integration_request_item_spec.rb +47 -0
  426. data/spec/models/multiple_customer_profile_integration_request_spec.rb +41 -0
  427. data/spec/models/multiple_customer_profile_integration_response_v2_spec.rb +41 -0
  428. data/spec/models/mutable_entity_spec.rb +1 -1
  429. data/spec/models/new_account_sign_up_spec.rb +1 -1
  430. data/spec/models/new_account_spec.rb +1 -1
  431. data/spec/models/new_additional_cost_spec.rb +1 -1
  432. data/spec/models/new_application_api_key_spec.rb +18 -8
  433. data/spec/models/new_application_spec.rb +29 -1
  434. data/spec/models/new_attribute_spec.rb +1 -1
  435. data/spec/models/new_audience_spec.rb +57 -0
  436. data/spec/models/new_campaign_group_spec.rb +59 -0
  437. data/spec/models/new_campaign_set_spec.rb +1 -1
  438. data/spec/models/new_campaign_spec.rb +7 -1
  439. data/spec/models/new_coupons_spec.rb +1 -1
  440. data/spec/models/new_customer_profile_spec.rb +1 -1
  441. data/spec/models/new_customer_session_spec.rb +1 -1
  442. data/spec/models/new_customer_session_v2_spec.rb +1 -1
  443. data/spec/models/new_event_spec.rb +1 -1
  444. data/spec/models/new_event_type_spec.rb +1 -1
  445. data/spec/models/new_feature_flags_spec.rb +1 -1
  446. data/spec/models/new_import_spec.rb +1 -1
  447. data/spec/models/new_invitation_spec.rb +1 -1
  448. data/spec/models/new_invite_email_spec.rb +1 -1
  449. data/spec/models/new_loyalty_program_spec.rb +7 -1
  450. data/spec/models/new_password_email_spec.rb +1 -1
  451. data/spec/models/new_password_spec.rb +1 -1
  452. data/spec/models/new_referral_spec.rb +1 -1
  453. data/spec/models/new_role_spec.rb +1 -1
  454. data/spec/models/new_ruleset_spec.rb +1 -1
  455. data/spec/models/new_saml_connection_spec.rb +1 -1
  456. data/spec/models/new_template_def_spec.rb +1 -1
  457. data/spec/models/new_user_spec.rb +1 -1
  458. data/spec/models/new_webhook_spec.rb +1 -1
  459. data/spec/models/notification_spec.rb +1 -1
  460. data/spec/models/redeem_referral_effect_props_spec.rb +1 -1
  461. data/spec/models/referral_created_effect_props_spec.rb +1 -1
  462. data/spec/models/referral_rejection_reason_spec.rb +2 -2
  463. data/spec/models/referral_spec.rb +1 -1
  464. data/spec/models/reject_coupon_effect_props_spec.rb +1 -1
  465. data/spec/models/reject_referral_effect_props_spec.rb +1 -1
  466. data/spec/models/role_assign_spec.rb +1 -1
  467. data/spec/models/role_membership_spec.rb +1 -1
  468. data/spec/models/role_spec.rb +7 -1
  469. data/spec/models/rollback_coupon_effect_props_spec.rb +1 -1
  470. data/spec/models/rollback_discount_effect_props_spec.rb +1 -1
  471. data/spec/models/rule_spec.rb +1 -1
  472. data/spec/models/ruleset_spec.rb +1 -1
  473. data/spec/models/saml_connection_metadata_spec.rb +1 -1
  474. data/spec/models/saml_connection_spec.rb +1 -1
  475. data/spec/models/saml_login_endpoint_spec.rb +1 -1
  476. data/spec/models/session_spec.rb +1 -1
  477. data/spec/models/set_discount_effect_props_spec.rb +7 -1
  478. data/spec/models/set_discount_per_item_effect_props_spec.rb +7 -1
  479. data/spec/models/show_bundle_metadata_effect_props_spec.rb +1 -1
  480. data/spec/models/show_notification_effect_props_spec.rb +1 -1
  481. data/spec/models/slot_def_spec.rb +1 -1
  482. data/spec/models/template_arg_def_spec.rb +1 -1
  483. data/spec/models/template_def_spec.rb +1 -1
  484. data/spec/models/trigger_webhook_effect_props_spec.rb +1 -1
  485. data/spec/models/update_account_spec.rb +1 -1
  486. data/spec/models/update_application_spec.rb +29 -1
  487. data/spec/models/update_attribute_effect_props_spec.rb +1 -1
  488. data/spec/models/update_audience_spec.rb +41 -0
  489. data/spec/models/update_campaign_group_spec.rb +59 -0
  490. data/spec/models/update_campaign_spec.rb +7 -1
  491. data/spec/models/update_coupon_batch_spec.rb +1 -1
  492. data/spec/models/update_coupon_spec.rb +1 -1
  493. data/spec/models/update_loyalty_program_spec.rb +7 -1
  494. data/spec/models/update_role_spec.rb +1 -1
  495. data/spec/models/update_user_latest_feed_timestamp_spec.rb +41 -0
  496. data/spec/models/update_user_spec.rb +1 -13
  497. data/spec/models/user_entity_spec.rb +1 -1
  498. data/spec/models/user_feed_notifications_spec.rb +47 -0
  499. data/spec/models/user_spec.rb +2 -8
  500. data/spec/models/webhook_activation_log_entry_spec.rb +1 -1
  501. data/spec/models/webhook_log_entry_spec.rb +1 -1
  502. data/spec/models/webhook_spec.rb +1 -1
  503. data/spec/spec_helper.rb +1 -1
  504. data/talon_one.gemspec +1 -1
  505. metadata +78 -10
  506. data/docs/CustomerProfileUpdate.md +0 -17
  507. data/docs/MiscUpdateUserLatestFeature.md +0 -17
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -15,20 +15,49 @@ require 'date'
15
15
  module TalonOne
16
16
  # Ledger of Balance in Loyalty Program for a Customer
17
17
  class LoyaltySubLedger
18
+ # ⚠️ Deprecated: Please use 'totalActivePoints' property instead. Total amount of currently active and available points in the customer's balance
18
19
  attr_accessor :total
19
20
 
20
- # Transactions contains a list of all events that have happened such as additions, subtractions and expiries
21
+ # Total amount of currently active and available points in the customer's balance
22
+ attr_accessor :total_active_points
23
+
24
+ # Total amount of pending points, which are not active yet but will become active in the future
25
+ attr_accessor :total_pending_points
26
+
27
+ # Total amount of points already spent by this customer
28
+ attr_accessor :total_spent_points
29
+
30
+ # Total amount of points, that expired without ever being spent
31
+ attr_accessor :total_expired_points
32
+
33
+ # List of all events that have happened such as additions, subtractions and expiries
21
34
  attr_accessor :transactions
22
35
 
23
- # ExpiringPoints contains a list of all points that will expiry and when
36
+ # List of all points that will expire
24
37
  attr_accessor :expiring_points
25
38
 
39
+ # List of all currently active points
40
+ attr_accessor :active_points
41
+
42
+ # List of all points pending activation
43
+ attr_accessor :pending_points
44
+
45
+ # List of expired points
46
+ attr_accessor :expired_points
47
+
26
48
  # Attribute mapping from ruby-style variable name to JSON key.
27
49
  def self.attribute_map
28
50
  {
29
51
  :'total' => :'total',
52
+ :'total_active_points' => :'totalActivePoints',
53
+ :'total_pending_points' => :'totalPendingPoints',
54
+ :'total_spent_points' => :'totalSpentPoints',
55
+ :'total_expired_points' => :'totalExpiredPoints',
30
56
  :'transactions' => :'transactions',
31
- :'expiring_points' => :'expiringPoints'
57
+ :'expiring_points' => :'expiringPoints',
58
+ :'active_points' => :'activePoints',
59
+ :'pending_points' => :'pendingPoints',
60
+ :'expired_points' => :'expiredPoints'
32
61
  }
33
62
  end
34
63
 
@@ -36,8 +65,15 @@ module TalonOne
36
65
  def self.openapi_types
37
66
  {
38
67
  :'total' => :'Float',
68
+ :'total_active_points' => :'Float',
69
+ :'total_pending_points' => :'Float',
70
+ :'total_spent_points' => :'Float',
71
+ :'total_expired_points' => :'Float',
39
72
  :'transactions' => :'Array<LoyaltyLedgerEntry>',
40
- :'expiring_points' => :'Array<LoyaltyLedgerEntry>'
73
+ :'expiring_points' => :'Array<LoyaltyLedgerEntry>',
74
+ :'active_points' => :'Array<LoyaltyLedgerEntry>',
75
+ :'pending_points' => :'Array<LoyaltyLedgerEntry>',
76
+ :'expired_points' => :'Array<LoyaltyLedgerEntry>'
41
77
  }
42
78
  end
43
79
 
@@ -66,6 +102,22 @@ module TalonOne
66
102
  self.total = attributes[:'total']
67
103
  end
68
104
 
105
+ if attributes.key?(:'total_active_points')
106
+ self.total_active_points = attributes[:'total_active_points']
107
+ end
108
+
109
+ if attributes.key?(:'total_pending_points')
110
+ self.total_pending_points = attributes[:'total_pending_points']
111
+ end
112
+
113
+ if attributes.key?(:'total_spent_points')
114
+ self.total_spent_points = attributes[:'total_spent_points']
115
+ end
116
+
117
+ if attributes.key?(:'total_expired_points')
118
+ self.total_expired_points = attributes[:'total_expired_points']
119
+ end
120
+
69
121
  if attributes.key?(:'transactions')
70
122
  if (value = attributes[:'transactions']).is_a?(Array)
71
123
  self.transactions = value
@@ -77,6 +129,24 @@ module TalonOne
77
129
  self.expiring_points = value
78
130
  end
79
131
  end
132
+
133
+ if attributes.key?(:'active_points')
134
+ if (value = attributes[:'active_points']).is_a?(Array)
135
+ self.active_points = value
136
+ end
137
+ end
138
+
139
+ if attributes.key?(:'pending_points')
140
+ if (value = attributes[:'pending_points']).is_a?(Array)
141
+ self.pending_points = value
142
+ end
143
+ end
144
+
145
+ if attributes.key?(:'expired_points')
146
+ if (value = attributes[:'expired_points']).is_a?(Array)
147
+ self.expired_points = value
148
+ end
149
+ end
80
150
  end
81
151
 
82
152
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -87,6 +157,22 @@ module TalonOne
87
157
  invalid_properties.push('invalid value for "total", total cannot be nil.')
88
158
  end
89
159
 
160
+ if @total_active_points.nil?
161
+ invalid_properties.push('invalid value for "total_active_points", total_active_points cannot be nil.')
162
+ end
163
+
164
+ if @total_pending_points.nil?
165
+ invalid_properties.push('invalid value for "total_pending_points", total_pending_points cannot be nil.')
166
+ end
167
+
168
+ if @total_spent_points.nil?
169
+ invalid_properties.push('invalid value for "total_spent_points", total_spent_points cannot be nil.')
170
+ end
171
+
172
+ if @total_expired_points.nil?
173
+ invalid_properties.push('invalid value for "total_expired_points", total_expired_points cannot be nil.')
174
+ end
175
+
90
176
  invalid_properties
91
177
  end
92
178
 
@@ -94,6 +180,10 @@ module TalonOne
94
180
  # @return true if the model is valid
95
181
  def valid?
96
182
  return false if @total.nil?
183
+ return false if @total_active_points.nil?
184
+ return false if @total_pending_points.nil?
185
+ return false if @total_spent_points.nil?
186
+ return false if @total_expired_points.nil?
97
187
  true
98
188
  end
99
189
 
@@ -103,8 +193,15 @@ module TalonOne
103
193
  return true if self.equal?(o)
104
194
  self.class == o.class &&
105
195
  total == o.total &&
196
+ total_active_points == o.total_active_points &&
197
+ total_pending_points == o.total_pending_points &&
198
+ total_spent_points == o.total_spent_points &&
199
+ total_expired_points == o.total_expired_points &&
106
200
  transactions == o.transactions &&
107
- expiring_points == o.expiring_points
201
+ expiring_points == o.expiring_points &&
202
+ active_points == o.active_points &&
203
+ pending_points == o.pending_points &&
204
+ expired_points == o.expired_points
108
205
  end
109
206
 
110
207
  # @see the `==` method
@@ -116,7 +213,7 @@ module TalonOne
116
213
  # Calculates hash code according to all attributes.
117
214
  # @return [Integer] Hash code
118
215
  def hash
119
- [total, transactions, expiring_points].hash
216
+ [total, total_active_points, total_pending_points, total_spent_points, total_expired_points, transactions, expiring_points, active_points, pending_points, expired_points].hash
120
217
  end
121
218
 
122
219
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -24,6 +24,7 @@ module TalonOne
24
24
 
25
25
  attr_accessor :referral_rejection_reason
26
26
 
27
+ # Contains warnings about possible misuse.
27
28
  attr_accessor :warnings
28
29
 
29
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ The version of the OpenAPI document: 1.0.0
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 MultipleCustomerProfileIntegrationRequest
17
+ attr_accessor :customer_profiles
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'customer_profiles' => :'customerProfiles'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'customer_profiles' => :'Array<MultipleCustomerProfileIntegrationRequestItem>'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::MultipleCustomerProfileIntegrationRequest` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::MultipleCustomerProfileIntegrationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'customer_profiles')
55
+ if (value = attributes[:'customer_profiles']).is_a?(Array)
56
+ self.customer_profiles = value
57
+ end
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ customer_profiles == o.customer_profiles
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Integer] Hash code
90
+ def hash
91
+ [customer_profiles].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def self.build_from_hash(attributes)
98
+ new.build_from_hash(attributes)
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.openapi_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :Boolean
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ TalonOne.const_get(type).build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ The version of the OpenAPI document: 1.0.0
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 MultipleCustomerProfileIntegrationRequestItem
18
+ # Arbitrary properties associated with this item
19
+ attr_accessor :attributes
20
+
21
+ # The custom identifier for this profile, must be unique within the account.
22
+ attr_accessor :integration_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'attributes' => :'attributes',
28
+ :'integration_id' => :'integrationId'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'attributes' => :'Object',
36
+ :'integration_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::MultipleCustomerProfileIntegrationRequestItem` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::MultipleCustomerProfileIntegrationRequestItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'attributes')
62
+ self.attributes = attributes[:'attributes']
63
+ end
64
+
65
+ if attributes.key?(:'integration_id')
66
+ self.integration_id = attributes[:'integration_id']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ if @integration_id.nil?
75
+ invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.')
76
+ end
77
+
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ return false if @integration_id.nil?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ attributes == o.attributes &&
94
+ integration_id == o.integration_id
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [attributes, integration_id].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ TalonOne.const_get(type).build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+ end
223
+ end