talon_one 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (535) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +63 -0
  3. data/Gemfile +7 -0
  4. data/README.md +423 -0
  5. data/Rakefile +8 -0
  6. data/docs/APIError.md +10 -0
  7. data/docs/AccessLogEntry.md +14 -0
  8. data/docs/Account.md +25 -0
  9. data/docs/AccountAnalytics.md +22 -0
  10. data/docs/AccountEntity.md +8 -0
  11. data/docs/AccountLimits.md +19 -0
  12. data/docs/Application.md +21 -0
  13. data/docs/ApplicationAPIKey.md +14 -0
  14. data/docs/ApplicationApiHealth.md +9 -0
  15. data/docs/ApplicationCustomer.md +16 -0
  16. data/docs/ApplicationCustomerEntity.md +8 -0
  17. data/docs/ApplicationCustomerSearch.md +10 -0
  18. data/docs/ApplicationEntity.md +8 -0
  19. data/docs/ApplicationEvent.md +15 -0
  20. data/docs/ApplicationSession.md +19 -0
  21. data/docs/ApplicationSessionEntity.md +8 -0
  22. data/docs/Attribute.md +18 -0
  23. data/docs/AttributeQuery.md +7 -0
  24. data/docs/AttributesMandatory.md +9 -0
  25. data/docs/AttributesSettings.md +8 -0
  26. data/docs/BaseSamlConnection.md +15 -0
  27. data/docs/Binding.md +9 -0
  28. data/docs/Campaign.md +32 -0
  29. data/docs/CampaignAnalytics.md +28 -0
  30. data/docs/CampaignCopy.md +13 -0
  31. data/docs/CampaignEntity.md +8 -0
  32. data/docs/CampaignSearch.md +8 -0
  33. data/docs/CampaignSet.md +11 -0
  34. data/docs/CampaignSetBranchNode.md +11 -0
  35. data/docs/CampaignSetLeafNode.md +9 -0
  36. data/docs/CampaignSetNode.md +8 -0
  37. data/docs/CartItem.md +19 -0
  38. data/docs/CartItemAdjustment.md +10 -0
  39. data/docs/Change.md +13 -0
  40. data/docs/CodeGeneratorSettings.md +9 -0
  41. data/docs/Coupon.md +21 -0
  42. data/docs/CouponConstraints.md +10 -0
  43. data/docs/CouponRejectionReason.md +10 -0
  44. data/docs/CouponReservations.md +8 -0
  45. data/docs/CouponSearch.md +8 -0
  46. data/docs/CouponValue.md +8 -0
  47. data/docs/CreateApplicationAPIKey.md +9 -0
  48. data/docs/CustomerActivityReport.md +20 -0
  49. data/docs/CustomerAnalytics.md +14 -0
  50. data/docs/CustomerInventory.md +9 -0
  51. data/docs/CustomerProfile.md +15 -0
  52. data/docs/CustomerProfileSearchQuery.md +10 -0
  53. data/docs/CustomerSession.md +20 -0
  54. data/docs/EmailEntity.md +8 -0
  55. data/docs/Entity.md +9 -0
  56. data/docs/Environment.md +14 -0
  57. data/docs/ErrorResponse.md +9 -0
  58. data/docs/ErrorSource.md +11 -0
  59. data/docs/Event.md +17 -0
  60. data/docs/EventType.md +19 -0
  61. data/docs/Export.md +13 -0
  62. data/docs/FeatureFlag.md +11 -0
  63. data/docs/FeatureFlags.md +11 -0
  64. data/docs/FeaturesFeed.md +9 -0
  65. data/docs/FuncArgDef.md +9 -0
  66. data/docs/FunctionDef.md +12 -0
  67. data/docs/Import.md +13 -0
  68. data/docs/ImportCoupons.md +8 -0
  69. data/docs/InlineResponse200.md +9 -0
  70. data/docs/InlineResponse2001.md +9 -0
  71. data/docs/InlineResponse20010.md +9 -0
  72. data/docs/InlineResponse20011.md +9 -0
  73. data/docs/InlineResponse20012.md +9 -0
  74. data/docs/InlineResponse20013.md +9 -0
  75. data/docs/InlineResponse20014.md +9 -0
  76. data/docs/InlineResponse20015.md +9 -0
  77. data/docs/InlineResponse20016.md +9 -0
  78. data/docs/InlineResponse20017.md +9 -0
  79. data/docs/InlineResponse20018.md +9 -0
  80. data/docs/InlineResponse20019.md +9 -0
  81. data/docs/InlineResponse2002.md +9 -0
  82. data/docs/InlineResponse20020.md +9 -0
  83. data/docs/InlineResponse20021.md +9 -0
  84. data/docs/InlineResponse20022.md +9 -0
  85. data/docs/InlineResponse20023.md +9 -0
  86. data/docs/InlineResponse20024.md +9 -0
  87. data/docs/InlineResponse20025.md +9 -0
  88. data/docs/InlineResponse20026.md +10 -0
  89. data/docs/InlineResponse20027.md +9 -0
  90. data/docs/InlineResponse20028.md +9 -0
  91. data/docs/InlineResponse20029.md +9 -0
  92. data/docs/InlineResponse2003.md +9 -0
  93. data/docs/InlineResponse2004.md +9 -0
  94. data/docs/InlineResponse2005.md +9 -0
  95. data/docs/InlineResponse2006.md +9 -0
  96. data/docs/InlineResponse2007.md +9 -0
  97. data/docs/InlineResponse2008.md +9 -0
  98. data/docs/InlineResponse2009.md +9 -0
  99. data/docs/IntegrationApi.md +624 -0
  100. data/docs/IntegrationEntity.md +9 -0
  101. data/docs/IntegrationEvent.md +10 -0
  102. data/docs/IntegrationProfileEntity.md +8 -0
  103. data/docs/IntegrationState.md +12 -0
  104. data/docs/LedgerEntry.md +17 -0
  105. data/docs/LibraryAttribute.md +14 -0
  106. data/docs/LimitConfig.md +10 -0
  107. data/docs/LoginParams.md +9 -0
  108. data/docs/Loyalty.md +8 -0
  109. data/docs/LoyaltyLedger.md +9 -0
  110. data/docs/LoyaltyLedgerEntry.md +17 -0
  111. data/docs/LoyaltyMembership.md +9 -0
  112. data/docs/LoyaltyPoints.md +11 -0
  113. data/docs/LoyaltyProgram.md +15 -0
  114. data/docs/LoyaltyProgramBalance.md +8 -0
  115. data/docs/LoyaltyProgramLedgers.md +11 -0
  116. data/docs/LoyaltySubLedger.md +10 -0
  117. data/docs/ManagementApi.md +5138 -0
  118. data/docs/ManagerConfig.md +8 -0
  119. data/docs/Meta.md +12 -0
  120. data/docs/MiscUpdateUserLatestFeature.md +8 -0
  121. data/docs/MultiApplicationEntity.md +8 -0
  122. data/docs/MutableEntity.md +8 -0
  123. data/docs/NewAccount.md +8 -0
  124. data/docs/NewAccountSignUp.md +10 -0
  125. data/docs/NewApplication.md +16 -0
  126. data/docs/NewApplicationAPIKey.md +15 -0
  127. data/docs/NewAttribute.md +15 -0
  128. data/docs/NewCampaign.md +19 -0
  129. data/docs/NewCampaignSet.md +9 -0
  130. data/docs/NewCoupons.md +16 -0
  131. data/docs/NewCustomerProfile.md +8 -0
  132. data/docs/NewCustomerSession.md +15 -0
  133. data/docs/NewEvent.md +11 -0
  134. data/docs/NewEventType.md +17 -0
  135. data/docs/NewFeatureFlags.md +10 -0
  136. data/docs/NewImport.md +8 -0
  137. data/docs/NewInvitation.md +11 -0
  138. data/docs/NewInviteEmail.md +9 -0
  139. data/docs/NewLoyaltyProgram.md +13 -0
  140. data/docs/NewPassword.md +9 -0
  141. data/docs/NewPasswordEmail.md +8 -0
  142. data/docs/NewReferral.md +12 -0
  143. data/docs/NewRole.md +11 -0
  144. data/docs/NewRuleset.md +11 -0
  145. data/docs/NewSamlConnection.md +16 -0
  146. data/docs/NewTemplateDef.md +14 -0
  147. data/docs/NewUser.md +11 -0
  148. data/docs/NewWebhook.md +15 -0
  149. data/docs/Notification.md +10 -0
  150. data/docs/Notifications.md +7 -0
  151. data/docs/Referral.md +17 -0
  152. data/docs/ReferralRejectionReason.md +10 -0
  153. data/docs/Role.md +13 -0
  154. data/docs/RoleAssign.md +9 -0
  155. data/docs/RoleMembership.md +9 -0
  156. data/docs/Rule.md +12 -0
  157. data/docs/Ruleset.md +16 -0
  158. data/docs/SamlConnection.md +18 -0
  159. data/docs/SamlConnectionMetadata.md +11 -0
  160. data/docs/Session.md +10 -0
  161. data/docs/SlotDef.md +13 -0
  162. data/docs/TemplateArgDef.md +11 -0
  163. data/docs/TemplateDef.md +18 -0
  164. data/docs/UpdateAccount.md +10 -0
  165. data/docs/UpdateApplication.md +15 -0
  166. data/docs/UpdateCampaign.md +19 -0
  167. data/docs/UpdateCoupon.md +12 -0
  168. data/docs/UpdateCouponBatch.md +12 -0
  169. data/docs/UpdateLoyaltyProgram.md +12 -0
  170. data/docs/UpdateRole.md +11 -0
  171. data/docs/UpdateUser.md +17 -0
  172. data/docs/User.md +21 -0
  173. data/docs/UserEntity.md +8 -0
  174. data/docs/Webhook.md +18 -0
  175. data/docs/WebhookActivationLogEntry.md +12 -0
  176. data/docs/WebhookLogEntry.md +17 -0
  177. data/git_push.sh +55 -0
  178. data/lib/talon_one.rb +210 -0
  179. data/lib/talon_one/api/integration_api.rb +591 -0
  180. data/lib/talon_one/api/management_api.rb +5593 -0
  181. data/lib/talon_one/api_client.rb +389 -0
  182. data/lib/talon_one/api_error.rb +38 -0
  183. data/lib/talon_one/configuration.rb +223 -0
  184. data/lib/talon_one/models/access_log_entry.rb +280 -0
  185. data/lib/talon_one/models/account.rb +462 -0
  186. data/lib/talon_one/models/account_analytics.rb +399 -0
  187. data/lib/talon_one/models/account_entity.rb +189 -0
  188. data/lib/talon_one/models/account_limits.rb +351 -0
  189. data/lib/talon_one/models/api_error.rb +213 -0
  190. data/lib/talon_one/models/application.rb +491 -0
  191. data/lib/talon_one/models/application_api_health.rb +239 -0
  192. data/lib/talon_one/models/application_api_key.rb +279 -0
  193. data/lib/talon_one/models/application_customer.rb +307 -0
  194. data/lib/talon_one/models/application_customer_entity.rb +184 -0
  195. data/lib/talon_one/models/application_customer_search.rb +206 -0
  196. data/lib/talon_one/models/application_entity.rb +189 -0
  197. data/lib/talon_one/models/application_event.rb +287 -0
  198. data/lib/talon_one/models/application_session.rb +378 -0
  199. data/lib/talon_one/models/application_session_entity.rb +189 -0
  200. data/lib/talon_one/models/attribute.rb +382 -0
  201. data/lib/talon_one/models/attribute_query.rb +174 -0
  202. data/lib/talon_one/models/attributes_mandatory.rb +199 -0
  203. data/lib/talon_one/models/attributes_settings.rb +184 -0
  204. data/lib/talon_one/models/base_saml_connection.rb +336 -0
  205. data/lib/talon_one/models/binding.rb +206 -0
  206. data/lib/talon_one/models/campaign.rb +534 -0
  207. data/lib/talon_one/models/campaign_analytics.rb +489 -0
  208. data/lib/talon_one/models/campaign_copy.rb +243 -0
  209. data/lib/talon_one/models/campaign_entity.rb +189 -0
  210. data/lib/talon_one/models/campaign_search.rb +189 -0
  211. data/lib/talon_one/models/campaign_set.rb +234 -0
  212. data/lib/talon_one/models/campaign_set_branch_node.rb +282 -0
  213. data/lib/talon_one/models/campaign_set_leaf_node.rb +238 -0
  214. data/lib/talon_one/models/campaign_set_node.rb +188 -0
  215. data/lib/talon_one/models/cart_item.rb +365 -0
  216. data/lib/talon_one/models/cart_item_adjustment.rb +248 -0
  217. data/lib/talon_one/models/change.rb +255 -0
  218. data/lib/talon_one/models/code_generator_settings.rb +225 -0
  219. data/lib/talon_one/models/coupon.rb +392 -0
  220. data/lib/talon_one/models/coupon_constraints.rb +228 -0
  221. data/lib/talon_one/models/coupon_rejection_reason.rb +251 -0
  222. data/lib/talon_one/models/coupon_reservations.rb +191 -0
  223. data/lib/talon_one/models/coupon_search.rb +189 -0
  224. data/lib/talon_one/models/coupon_value.rb +199 -0
  225. data/lib/talon_one/models/create_application_api_key.rb +204 -0
  226. data/lib/talon_one/models/customer_activity_report.rb +365 -0
  227. data/lib/talon_one/models/customer_analytics.rb +280 -0
  228. data/lib/talon_one/models/customer_inventory.rb +194 -0
  229. data/lib/talon_one/models/customer_profile.rb +292 -0
  230. data/lib/talon_one/models/customer_profile_search_query.rb +206 -0
  231. data/lib/talon_one/models/customer_session.rb +407 -0
  232. data/lib/talon_one/models/email_entity.rb +189 -0
  233. data/lib/talon_one/models/entity.rb +204 -0
  234. data/lib/talon_one/models/environment.rb +285 -0
  235. data/lib/talon_one/models/error_response.rb +201 -0
  236. data/lib/talon_one/models/error_source.rb +215 -0
  237. data/lib/talon_one/models/event.rb +332 -0
  238. data/lib/talon_one/models/event_type.rb +426 -0
  239. data/lib/talon_one/models/export.rb +299 -0
  240. data/lib/talon_one/models/feature_flag.rb +224 -0
  241. data/lib/talon_one/models/feature_flags.rb +220 -0
  242. data/lib/talon_one/models/features_feed.rb +193 -0
  243. data/lib/talon_one/models/func_arg_def.rb +243 -0
  244. data/lib/talon_one/models/function_def.rb +260 -0
  245. data/lib/talon_one/models/import.rb +318 -0
  246. data/lib/talon_one/models/import_coupons.rb +188 -0
  247. data/lib/talon_one/models/inline_response_200.rb +204 -0
  248. data/lib/talon_one/models/inline_response_200_1.rb +204 -0
  249. data/lib/talon_one/models/inline_response_200_10.rb +204 -0
  250. data/lib/talon_one/models/inline_response_200_11.rb +204 -0
  251. data/lib/talon_one/models/inline_response_200_12.rb +204 -0
  252. data/lib/talon_one/models/inline_response_200_13.rb +204 -0
  253. data/lib/talon_one/models/inline_response_200_14.rb +204 -0
  254. data/lib/talon_one/models/inline_response_200_15.rb +204 -0
  255. data/lib/talon_one/models/inline_response_200_16.rb +204 -0
  256. data/lib/talon_one/models/inline_response_200_17.rb +204 -0
  257. data/lib/talon_one/models/inline_response_200_18.rb +204 -0
  258. data/lib/talon_one/models/inline_response_200_19.rb +204 -0
  259. data/lib/talon_one/models/inline_response_200_2.rb +204 -0
  260. data/lib/talon_one/models/inline_response_200_20.rb +204 -0
  261. data/lib/talon_one/models/inline_response_200_21.rb +204 -0
  262. data/lib/talon_one/models/inline_response_200_22.rb +204 -0
  263. data/lib/talon_one/models/inline_response_200_23.rb +204 -0
  264. data/lib/talon_one/models/inline_response_200_24.rb +204 -0
  265. data/lib/talon_one/models/inline_response_200_25.rb +204 -0
  266. data/lib/talon_one/models/inline_response_200_26.rb +208 -0
  267. data/lib/talon_one/models/inline_response_200_27.rb +204 -0
  268. data/lib/talon_one/models/inline_response_200_28.rb +204 -0
  269. data/lib/talon_one/models/inline_response_200_29.rb +204 -0
  270. data/lib/talon_one/models/inline_response_200_3.rb +204 -0
  271. data/lib/talon_one/models/inline_response_200_4.rb +204 -0
  272. data/lib/talon_one/models/inline_response_200_5.rb +204 -0
  273. data/lib/talon_one/models/inline_response_200_6.rb +204 -0
  274. data/lib/talon_one/models/inline_response_200_7.rb +204 -0
  275. data/lib/talon_one/models/inline_response_200_8.rb +204 -0
  276. data/lib/talon_one/models/inline_response_200_9.rb +204 -0
  277. data/lib/talon_one/models/integration_entity.rb +204 -0
  278. data/lib/talon_one/models/integration_event.rb +234 -0
  279. data/lib/talon_one/models/integration_profile_entity.rb +184 -0
  280. data/lib/talon_one/models/integration_state.rb +235 -0
  281. data/lib/talon_one/models/ledger_entry.rb +320 -0
  282. data/lib/talon_one/models/library_attribute.rb +330 -0
  283. data/lib/talon_one/models/limit_config.rb +274 -0
  284. data/lib/talon_one/models/login_params.rb +205 -0
  285. data/lib/talon_one/models/loyalty.rb +192 -0
  286. data/lib/talon_one/models/loyalty_ledger.rb +202 -0
  287. data/lib/talon_one/models/loyalty_ledger_entry.rb +336 -0
  288. data/lib/talon_one/models/loyalty_membership.rb +199 -0
  289. data/lib/talon_one/models/loyalty_points.rb +220 -0
  290. data/lib/talon_one/models/loyalty_program.rb +297 -0
  291. data/lib/talon_one/models/loyalty_program_balance.rb +189 -0
  292. data/lib/talon_one/models/loyalty_program_ledgers.rb +232 -0
  293. data/lib/talon_one/models/loyalty_sub_ledger.rb +213 -0
  294. data/lib/talon_one/models/manager_config.rb +188 -0
  295. data/lib/talon_one/models/meta.rb +221 -0
  296. data/lib/talon_one/models/misc_update_user_latest_feature.rb +183 -0
  297. data/lib/talon_one/models/multi_application_entity.rb +191 -0
  298. data/lib/talon_one/models/mutable_entity.rb +189 -0
  299. data/lib/talon_one/models/new_account.rb +207 -0
  300. data/lib/talon_one/models/new_account_sign_up.rb +238 -0
  301. data/lib/talon_one/models/new_application.rb +405 -0
  302. data/lib/talon_one/models/new_application_api_key.rb +295 -0
  303. data/lib/talon_one/models/new_attribute.rb +337 -0
  304. data/lib/talon_one/models/new_campaign.rb +378 -0
  305. data/lib/talon_one/models/new_campaign_set.rb +204 -0
  306. data/lib/talon_one/models/new_coupons.rb +334 -0
  307. data/lib/talon_one/models/new_customer_profile.rb +184 -0
  308. data/lib/talon_one/models/new_customer_session.rb +295 -0
  309. data/lib/talon_one/models/new_event.rb +268 -0
  310. data/lib/talon_one/models/new_event_type.rb +396 -0
  311. data/lib/talon_one/models/new_feature_flags.rb +204 -0
  312. data/lib/talon_one/models/new_import.rb +224 -0
  313. data/lib/talon_one/models/new_invitation.rb +226 -0
  314. data/lib/talon_one/models/new_invite_email.rb +240 -0
  315. data/lib/talon_one/models/new_loyalty_program.rb +257 -0
  316. data/lib/talon_one/models/new_password.rb +222 -0
  317. data/lib/talon_one/models/new_password_email.rb +207 -0
  318. data/lib/talon_one/models/new_referral.rb +234 -0
  319. data/lib/talon_one/models/new_role.rb +232 -0
  320. data/lib/talon_one/models/new_ruleset.rb +228 -0
  321. data/lib/talon_one/models/new_saml_connection.rb +371 -0
  322. data/lib/talon_one/models/new_template_def.rb +308 -0
  323. data/lib/talon_one/models/new_user.rb +248 -0
  324. data/lib/talon_one/models/new_webhook.rb +330 -0
  325. data/lib/talon_one/models/notification.rb +219 -0
  326. data/lib/talon_one/models/notifications.rb +174 -0
  327. data/lib/talon_one/models/referral.rb +348 -0
  328. data/lib/talon_one/models/referral_rejection_reason.rb +251 -0
  329. data/lib/talon_one/models/role.rb +247 -0
  330. data/lib/talon_one/models/role_assign.rb +209 -0
  331. data/lib/talon_one/models/role_membership.rb +204 -0
  332. data/lib/talon_one/models/rule.rb +245 -0
  333. data/lib/talon_one/models/ruleset.rb +299 -0
  334. data/lib/talon_one/models/saml_connection.rb +387 -0
  335. data/lib/talon_one/models/saml_connection_metadata.rb +271 -0
  336. data/lib/talon_one/models/session.rb +219 -0
  337. data/lib/talon_one/models/slot_def.rb +254 -0
  338. data/lib/talon_one/models/template_arg_def.rb +293 -0
  339. data/lib/talon_one/models/template_def.rb +398 -0
  340. data/lib/talon_one/models/update_account.rb +233 -0
  341. data/lib/talon_one/models/update_application.rb +361 -0
  342. data/lib/talon_one/models/update_campaign.rb +373 -0
  343. data/lib/talon_one/models/update_coupon.rb +249 -0
  344. data/lib/talon_one/models/update_coupon_batch.rb +254 -0
  345. data/lib/talon_one/models/update_loyalty_program.rb +227 -0
  346. data/lib/talon_one/models/update_role.rb +216 -0
  347. data/lib/talon_one/models/update_user.rb +315 -0
  348. data/lib/talon_one/models/user.rb +400 -0
  349. data/lib/talon_one/models/user_entity.rb +189 -0
  350. data/lib/talon_one/models/webhook.rb +375 -0
  351. data/lib/talon_one/models/webhook_activation_log_entry.rb +250 -0
  352. data/lib/talon_one/models/webhook_log_entry.rb +305 -0
  353. data/lib/talon_one/version.rb +15 -0
  354. data/spec/api/integration_api_spec.rb +161 -0
  355. data/spec/api/management_api_spec.rb +1318 -0
  356. data/spec/api_client_spec.rb +226 -0
  357. data/spec/configuration_spec.rb +42 -0
  358. data/spec/models/access_log_entry_spec.rb +77 -0
  359. data/spec/models/account_analytics_spec.rb +125 -0
  360. data/spec/models/account_entity_spec.rb +41 -0
  361. data/spec/models/account_limits_spec.rb +107 -0
  362. data/spec/models/account_spec.rb +147 -0
  363. data/spec/models/api_error_spec.rb +53 -0
  364. data/spec/models/application_api_health_spec.rb +51 -0
  365. data/spec/models/application_api_key_spec.rb +77 -0
  366. data/spec/models/application_customer_entity_spec.rb +41 -0
  367. data/spec/models/application_customer_search_spec.rb +53 -0
  368. data/spec/models/application_customer_spec.rb +89 -0
  369. data/spec/models/application_entity_spec.rb +41 -0
  370. data/spec/models/application_event_spec.rb +83 -0
  371. data/spec/models/application_session_entity_spec.rb +41 -0
  372. data/spec/models/application_session_spec.rb +111 -0
  373. data/spec/models/application_spec.rb +123 -0
  374. data/spec/models/attribute_query_spec.rb +35 -0
  375. data/spec/models/attribute_spec.rb +109 -0
  376. data/spec/models/attributes_mandatory_spec.rb +47 -0
  377. data/spec/models/attributes_settings_spec.rb +41 -0
  378. data/spec/models/base_saml_connection_spec.rb +83 -0
  379. data/spec/models/binding_spec.rb +47 -0
  380. data/spec/models/campaign_analytics_spec.rb +161 -0
  381. data/spec/models/campaign_copy_spec.rb +71 -0
  382. data/spec/models/campaign_entity_spec.rb +41 -0
  383. data/spec/models/campaign_search_spec.rb +41 -0
  384. data/spec/models/campaign_set_branch_node_spec.rb +67 -0
  385. data/spec/models/campaign_set_leaf_node_spec.rb +51 -0
  386. data/spec/models/campaign_set_node_spec.rb +41 -0
  387. data/spec/models/campaign_set_spec.rb +59 -0
  388. data/spec/models/campaign_spec.rb +193 -0
  389. data/spec/models/cart_item_adjustment_spec.rb +53 -0
  390. data/spec/models/cart_item_spec.rb +107 -0
  391. data/spec/models/change_spec.rb +71 -0
  392. data/spec/models/code_generator_settings_spec.rb +47 -0
  393. data/spec/models/coupon_constraints_spec.rb +53 -0
  394. data/spec/models/coupon_rejection_reason_spec.rb +57 -0
  395. data/spec/models/coupon_reservations_spec.rb +41 -0
  396. data/spec/models/coupon_search_spec.rb +41 -0
  397. data/spec/models/coupon_spec.rb +119 -0
  398. data/spec/models/coupon_value_spec.rb +41 -0
  399. data/spec/models/create_application_api_key_spec.rb +47 -0
  400. data/spec/models/customer_activity_report_spec.rb +113 -0
  401. data/spec/models/customer_analytics_spec.rb +77 -0
  402. data/spec/models/customer_inventory_spec.rb +47 -0
  403. data/spec/models/customer_profile_search_query_spec.rb +53 -0
  404. data/spec/models/customer_profile_spec.rb +83 -0
  405. data/spec/models/customer_session_spec.rb +117 -0
  406. data/spec/models/email_entity_spec.rb +41 -0
  407. data/spec/models/entity_spec.rb +47 -0
  408. data/spec/models/environment_spec.rb +77 -0
  409. data/spec/models/error_response_spec.rb +47 -0
  410. data/spec/models/error_source_spec.rb +59 -0
  411. data/spec/models/event_spec.rb +95 -0
  412. data/spec/models/event_type_spec.rb +115 -0
  413. data/spec/models/export_spec.rb +75 -0
  414. data/spec/models/feature_flag_spec.rb +59 -0
  415. data/spec/models/feature_flags_spec.rb +59 -0
  416. data/spec/models/features_feed_spec.rb +47 -0
  417. data/spec/models/func_arg_def_spec.rb +51 -0
  418. data/spec/models/function_def_spec.rb +65 -0
  419. data/spec/models/import_coupons_spec.rb +41 -0
  420. data/spec/models/import_spec.rb +75 -0
  421. data/spec/models/inline_response_200_10_spec.rb +47 -0
  422. data/spec/models/inline_response_200_11_spec.rb +47 -0
  423. data/spec/models/inline_response_200_12_spec.rb +47 -0
  424. data/spec/models/inline_response_200_13_spec.rb +47 -0
  425. data/spec/models/inline_response_200_14_spec.rb +47 -0
  426. data/spec/models/inline_response_200_15_spec.rb +47 -0
  427. data/spec/models/inline_response_200_16_spec.rb +47 -0
  428. data/spec/models/inline_response_200_17_spec.rb +47 -0
  429. data/spec/models/inline_response_200_18_spec.rb +47 -0
  430. data/spec/models/inline_response_200_19_spec.rb +47 -0
  431. data/spec/models/inline_response_200_1_spec.rb +47 -0
  432. data/spec/models/inline_response_200_20_spec.rb +47 -0
  433. data/spec/models/inline_response_200_21_spec.rb +47 -0
  434. data/spec/models/inline_response_200_22_spec.rb +47 -0
  435. data/spec/models/inline_response_200_23_spec.rb +47 -0
  436. data/spec/models/inline_response_200_24_spec.rb +47 -0
  437. data/spec/models/inline_response_200_25_spec.rb +47 -0
  438. data/spec/models/inline_response_200_26_spec.rb +53 -0
  439. data/spec/models/inline_response_200_27_spec.rb +47 -0
  440. data/spec/models/inline_response_200_28_spec.rb +47 -0
  441. data/spec/models/inline_response_200_29_spec.rb +47 -0
  442. data/spec/models/inline_response_200_2_spec.rb +47 -0
  443. data/spec/models/inline_response_200_3_spec.rb +47 -0
  444. data/spec/models/inline_response_200_4_spec.rb +47 -0
  445. data/spec/models/inline_response_200_5_spec.rb +47 -0
  446. data/spec/models/inline_response_200_6_spec.rb +47 -0
  447. data/spec/models/inline_response_200_7_spec.rb +47 -0
  448. data/spec/models/inline_response_200_8_spec.rb +47 -0
  449. data/spec/models/inline_response_200_9_spec.rb +47 -0
  450. data/spec/models/inline_response_200_spec.rb +47 -0
  451. data/spec/models/integration_entity_spec.rb +47 -0
  452. data/spec/models/integration_event_spec.rb +53 -0
  453. data/spec/models/integration_profile_entity_spec.rb +41 -0
  454. data/spec/models/integration_state_spec.rb +65 -0
  455. data/spec/models/ledger_entry_spec.rb +95 -0
  456. data/spec/models/library_attribute_spec.rb +85 -0
  457. data/spec/models/limit_config_spec.rb +61 -0
  458. data/spec/models/login_params_spec.rb +47 -0
  459. data/spec/models/loyalty_ledger_entry_spec.rb +99 -0
  460. data/spec/models/loyalty_ledger_spec.rb +47 -0
  461. data/spec/models/loyalty_membership_spec.rb +47 -0
  462. data/spec/models/loyalty_points_spec.rb +59 -0
  463. data/spec/models/loyalty_program_balance_spec.rb +41 -0
  464. data/spec/models/loyalty_program_ledgers_spec.rb +59 -0
  465. data/spec/models/loyalty_program_spec.rb +83 -0
  466. data/spec/models/loyalty_spec.rb +41 -0
  467. data/spec/models/loyalty_sub_ledger_spec.rb +53 -0
  468. data/spec/models/manager_config_spec.rb +41 -0
  469. data/spec/models/meta_spec.rb +65 -0
  470. data/spec/models/misc_update_user_latest_feature_spec.rb +41 -0
  471. data/spec/models/multi_application_entity_spec.rb +41 -0
  472. data/spec/models/mutable_entity_spec.rb +41 -0
  473. data/spec/models/new_account_sign_up_spec.rb +53 -0
  474. data/spec/models/new_account_spec.rb +41 -0
  475. data/spec/models/new_application_api_key_spec.rb +83 -0
  476. data/spec/models/new_application_spec.rb +93 -0
  477. data/spec/models/new_attribute_spec.rb +91 -0
  478. data/spec/models/new_campaign_set_spec.rb +47 -0
  479. data/spec/models/new_campaign_spec.rb +115 -0
  480. data/spec/models/new_coupons_spec.rb +89 -0
  481. data/spec/models/new_customer_profile_spec.rb +41 -0
  482. data/spec/models/new_customer_session_spec.rb +87 -0
  483. data/spec/models/new_event_spec.rb +59 -0
  484. data/spec/models/new_event_type_spec.rb +103 -0
  485. data/spec/models/new_feature_flags_spec.rb +53 -0
  486. data/spec/models/new_import_spec.rb +45 -0
  487. data/spec/models/new_invitation_spec.rb +59 -0
  488. data/spec/models/new_invite_email_spec.rb +47 -0
  489. data/spec/models/new_loyalty_program_spec.rb +71 -0
  490. data/spec/models/new_password_email_spec.rb +41 -0
  491. data/spec/models/new_password_spec.rb +47 -0
  492. data/spec/models/new_referral_spec.rb +65 -0
  493. data/spec/models/new_role_spec.rb +59 -0
  494. data/spec/models/new_ruleset_spec.rb +59 -0
  495. data/spec/models/new_saml_connection_spec.rb +89 -0
  496. data/spec/models/new_template_def_spec.rb +77 -0
  497. data/spec/models/new_user_spec.rb +59 -0
  498. data/spec/models/new_webhook_spec.rb +87 -0
  499. data/spec/models/notification_spec.rb +53 -0
  500. data/spec/models/notifications_spec.rb +35 -0
  501. data/spec/models/referral_rejection_reason_spec.rb +57 -0
  502. data/spec/models/referral_spec.rb +95 -0
  503. data/spec/models/role_assign_spec.rb +47 -0
  504. data/spec/models/role_membership_spec.rb +47 -0
  505. data/spec/models/role_spec.rb +71 -0
  506. data/spec/models/rule_spec.rb +65 -0
  507. data/spec/models/ruleset_spec.rb +89 -0
  508. data/spec/models/saml_connection_metadata_spec.rb +59 -0
  509. data/spec/models/saml_connection_spec.rb +101 -0
  510. data/spec/models/session_spec.rb +53 -0
  511. data/spec/models/slot_def_spec.rb +71 -0
  512. data/spec/models/template_arg_def_spec.rb +63 -0
  513. data/spec/models/template_def_spec.rb +101 -0
  514. data/spec/models/update_account_spec.rb +53 -0
  515. data/spec/models/update_application_spec.rb +87 -0
  516. data/spec/models/update_campaign_spec.rb +115 -0
  517. data/spec/models/update_coupon_batch_spec.rb +65 -0
  518. data/spec/models/update_coupon_spec.rb +65 -0
  519. data/spec/models/update_loyalty_program_spec.rb +65 -0
  520. data/spec/models/update_role_spec.rb +59 -0
  521. data/spec/models/update_user_spec.rb +99 -0
  522. data/spec/models/user_entity_spec.rb +41 -0
  523. data/spec/models/user_spec.rb +123 -0
  524. data/spec/models/webhook_activation_log_entry_spec.rb +65 -0
  525. data/spec/models/webhook_log_entry_spec.rb +95 -0
  526. data/spec/models/webhook_spec.rb +105 -0
  527. data/spec/spec_helper.rb +111 -0
  528. data/talon_one-1.0.0.gem +0 -0
  529. data/talon_one-1.1.0.gem +0 -0
  530. data/talon_one-1.1.1.gem +0 -0
  531. data/talon_one-1.1.2.gem +0 -0
  532. data/talon_one-1.2.0.gem +0 -0
  533. data/talon_one-1.3.0.gem +0 -0
  534. data/talon_one.gemspec +45 -0
  535. metadata +933 -0
@@ -0,0 +1,489 @@
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
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TalonOne
16
+ #
17
+ class CampaignAnalytics
18
+ attr_accessor :date
19
+
20
+ # Amount of revenue in this campaign (for coupon or discount sessions).
21
+ attr_accessor :campaign_revenue
22
+
23
+ # Amount of revenue in this campaign since it began (for coupon or discount sessions).
24
+ attr_accessor :total_campaign_revenue
25
+
26
+ # Amount of refunds in this campaign (for coupon or discount sessions).
27
+ attr_accessor :campaign_refund
28
+
29
+ # Amount of refunds in this campaign since it began (for coupon or discount sessions).
30
+ attr_accessor :total_campaign_refund
31
+
32
+ # Amount of cost caused by discounts given in the campaign.
33
+ attr_accessor :campaign_discount_costs
34
+
35
+ # Amount of cost caused by discounts given in the campaign since it began.
36
+ attr_accessor :total_campaign_discount_costs
37
+
38
+ # Amount of discounts rolledback due to refund in the campaign.
39
+ attr_accessor :campaign_refunded_discounts
40
+
41
+ # Amount of discounts rolledback due to refund in the campaign since it began.
42
+ attr_accessor :total_campaign_refunded_discounts
43
+
44
+ # Amount of free items given in the campaign.
45
+ attr_accessor :campaign_free_items
46
+
47
+ # Amount of free items given in the campaign since it began.
48
+ attr_accessor :total_campaign_free_items
49
+
50
+ # Number of coupon redemptions in the campaign.
51
+ attr_accessor :coupon_redemptions
52
+
53
+ # Number of coupon redemptions in the campaign since it began.
54
+ attr_accessor :total_coupon_redemptions
55
+
56
+ # Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
57
+ attr_accessor :coupon_rolledback_redemptions
58
+
59
+ # Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
60
+ attr_accessor :total_coupon_rolledback_redemptions
61
+
62
+ # Number of referral redemptions in the campaign.
63
+ attr_accessor :referral_redemptions
64
+
65
+ # Number of referral redemptions in the campaign since it began.
66
+ attr_accessor :total_referral_redemptions
67
+
68
+ # Number of coupons created in the campaign by the rule engine.
69
+ attr_accessor :coupons_created
70
+
71
+ # Number of coupons created in the campaign by the rule engine since it began.
72
+ attr_accessor :total_coupons_created
73
+
74
+ # Number of referrals created in the campaign by the rule engine.
75
+ attr_accessor :referrals_created
76
+
77
+ # Number of referrals created in the campaign by the rule engine since it began.
78
+ attr_accessor :total_referrals_created
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'date' => :'date',
84
+ :'campaign_revenue' => :'campaignRevenue',
85
+ :'total_campaign_revenue' => :'totalCampaignRevenue',
86
+ :'campaign_refund' => :'campaignRefund',
87
+ :'total_campaign_refund' => :'totalCampaignRefund',
88
+ :'campaign_discount_costs' => :'campaignDiscountCosts',
89
+ :'total_campaign_discount_costs' => :'totalCampaignDiscountCosts',
90
+ :'campaign_refunded_discounts' => :'campaignRefundedDiscounts',
91
+ :'total_campaign_refunded_discounts' => :'totalCampaignRefundedDiscounts',
92
+ :'campaign_free_items' => :'campaignFreeItems',
93
+ :'total_campaign_free_items' => :'totalCampaignFreeItems',
94
+ :'coupon_redemptions' => :'couponRedemptions',
95
+ :'total_coupon_redemptions' => :'totalCouponRedemptions',
96
+ :'coupon_rolledback_redemptions' => :'couponRolledbackRedemptions',
97
+ :'total_coupon_rolledback_redemptions' => :'totalCouponRolledbackRedemptions',
98
+ :'referral_redemptions' => :'referralRedemptions',
99
+ :'total_referral_redemptions' => :'totalReferralRedemptions',
100
+ :'coupons_created' => :'couponsCreated',
101
+ :'total_coupons_created' => :'totalCouponsCreated',
102
+ :'referrals_created' => :'referralsCreated',
103
+ :'total_referrals_created' => :'totalReferralsCreated'
104
+ }
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.swagger_types
109
+ {
110
+ :'date' => :'DateTime',
111
+ :'campaign_revenue' => :'Float',
112
+ :'total_campaign_revenue' => :'Float',
113
+ :'campaign_refund' => :'Float',
114
+ :'total_campaign_refund' => :'Float',
115
+ :'campaign_discount_costs' => :'Float',
116
+ :'total_campaign_discount_costs' => :'Float',
117
+ :'campaign_refunded_discounts' => :'Float',
118
+ :'total_campaign_refunded_discounts' => :'Float',
119
+ :'campaign_free_items' => :'Integer',
120
+ :'total_campaign_free_items' => :'Integer',
121
+ :'coupon_redemptions' => :'Integer',
122
+ :'total_coupon_redemptions' => :'Integer',
123
+ :'coupon_rolledback_redemptions' => :'Integer',
124
+ :'total_coupon_rolledback_redemptions' => :'Integer',
125
+ :'referral_redemptions' => :'Integer',
126
+ :'total_referral_redemptions' => :'Integer',
127
+ :'coupons_created' => :'Integer',
128
+ :'total_coupons_created' => :'Integer',
129
+ :'referrals_created' => :'Integer',
130
+ :'total_referrals_created' => :'Integer'
131
+ }
132
+ end
133
+
134
+ # Initializes the object
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ def initialize(attributes = {})
137
+ return unless attributes.is_a?(Hash)
138
+
139
+ # convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
141
+
142
+ if attributes.has_key?(:'date')
143
+ self.date = attributes[:'date']
144
+ end
145
+
146
+ if attributes.has_key?(:'campaignRevenue')
147
+ self.campaign_revenue = attributes[:'campaignRevenue']
148
+ end
149
+
150
+ if attributes.has_key?(:'totalCampaignRevenue')
151
+ self.total_campaign_revenue = attributes[:'totalCampaignRevenue']
152
+ end
153
+
154
+ if attributes.has_key?(:'campaignRefund')
155
+ self.campaign_refund = attributes[:'campaignRefund']
156
+ end
157
+
158
+ if attributes.has_key?(:'totalCampaignRefund')
159
+ self.total_campaign_refund = attributes[:'totalCampaignRefund']
160
+ end
161
+
162
+ if attributes.has_key?(:'campaignDiscountCosts')
163
+ self.campaign_discount_costs = attributes[:'campaignDiscountCosts']
164
+ end
165
+
166
+ if attributes.has_key?(:'totalCampaignDiscountCosts')
167
+ self.total_campaign_discount_costs = attributes[:'totalCampaignDiscountCosts']
168
+ end
169
+
170
+ if attributes.has_key?(:'campaignRefundedDiscounts')
171
+ self.campaign_refunded_discounts = attributes[:'campaignRefundedDiscounts']
172
+ end
173
+
174
+ if attributes.has_key?(:'totalCampaignRefundedDiscounts')
175
+ self.total_campaign_refunded_discounts = attributes[:'totalCampaignRefundedDiscounts']
176
+ end
177
+
178
+ if attributes.has_key?(:'campaignFreeItems')
179
+ self.campaign_free_items = attributes[:'campaignFreeItems']
180
+ end
181
+
182
+ if attributes.has_key?(:'totalCampaignFreeItems')
183
+ self.total_campaign_free_items = attributes[:'totalCampaignFreeItems']
184
+ end
185
+
186
+ if attributes.has_key?(:'couponRedemptions')
187
+ self.coupon_redemptions = attributes[:'couponRedemptions']
188
+ end
189
+
190
+ if attributes.has_key?(:'totalCouponRedemptions')
191
+ self.total_coupon_redemptions = attributes[:'totalCouponRedemptions']
192
+ end
193
+
194
+ if attributes.has_key?(:'couponRolledbackRedemptions')
195
+ self.coupon_rolledback_redemptions = attributes[:'couponRolledbackRedemptions']
196
+ end
197
+
198
+ if attributes.has_key?(:'totalCouponRolledbackRedemptions')
199
+ self.total_coupon_rolledback_redemptions = attributes[:'totalCouponRolledbackRedemptions']
200
+ end
201
+
202
+ if attributes.has_key?(:'referralRedemptions')
203
+ self.referral_redemptions = attributes[:'referralRedemptions']
204
+ end
205
+
206
+ if attributes.has_key?(:'totalReferralRedemptions')
207
+ self.total_referral_redemptions = attributes[:'totalReferralRedemptions']
208
+ end
209
+
210
+ if attributes.has_key?(:'couponsCreated')
211
+ self.coupons_created = attributes[:'couponsCreated']
212
+ end
213
+
214
+ if attributes.has_key?(:'totalCouponsCreated')
215
+ self.total_coupons_created = attributes[:'totalCouponsCreated']
216
+ end
217
+
218
+ if attributes.has_key?(:'referralsCreated')
219
+ self.referrals_created = attributes[:'referralsCreated']
220
+ end
221
+
222
+ if attributes.has_key?(:'totalReferralsCreated')
223
+ self.total_referrals_created = attributes[:'totalReferralsCreated']
224
+ end
225
+ end
226
+
227
+ # Show invalid properties with the reasons. Usually used together with valid?
228
+ # @return Array for valid properties with the reasons
229
+ def list_invalid_properties
230
+ invalid_properties = Array.new
231
+ if @date.nil?
232
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
233
+ end
234
+
235
+ if @campaign_revenue.nil?
236
+ invalid_properties.push('invalid value for "campaign_revenue", campaign_revenue cannot be nil.')
237
+ end
238
+
239
+ if @total_campaign_revenue.nil?
240
+ invalid_properties.push('invalid value for "total_campaign_revenue", total_campaign_revenue cannot be nil.')
241
+ end
242
+
243
+ if @campaign_refund.nil?
244
+ invalid_properties.push('invalid value for "campaign_refund", campaign_refund cannot be nil.')
245
+ end
246
+
247
+ if @total_campaign_refund.nil?
248
+ invalid_properties.push('invalid value for "total_campaign_refund", total_campaign_refund cannot be nil.')
249
+ end
250
+
251
+ if @campaign_discount_costs.nil?
252
+ invalid_properties.push('invalid value for "campaign_discount_costs", campaign_discount_costs cannot be nil.')
253
+ end
254
+
255
+ if @total_campaign_discount_costs.nil?
256
+ invalid_properties.push('invalid value for "total_campaign_discount_costs", total_campaign_discount_costs cannot be nil.')
257
+ end
258
+
259
+ if @campaign_refunded_discounts.nil?
260
+ invalid_properties.push('invalid value for "campaign_refunded_discounts", campaign_refunded_discounts cannot be nil.')
261
+ end
262
+
263
+ if @total_campaign_refunded_discounts.nil?
264
+ invalid_properties.push('invalid value for "total_campaign_refunded_discounts", total_campaign_refunded_discounts cannot be nil.')
265
+ end
266
+
267
+ if @campaign_free_items.nil?
268
+ invalid_properties.push('invalid value for "campaign_free_items", campaign_free_items cannot be nil.')
269
+ end
270
+
271
+ if @total_campaign_free_items.nil?
272
+ invalid_properties.push('invalid value for "total_campaign_free_items", total_campaign_free_items cannot be nil.')
273
+ end
274
+
275
+ if @coupon_redemptions.nil?
276
+ invalid_properties.push('invalid value for "coupon_redemptions", coupon_redemptions cannot be nil.')
277
+ end
278
+
279
+ if @total_coupon_redemptions.nil?
280
+ invalid_properties.push('invalid value for "total_coupon_redemptions", total_coupon_redemptions cannot be nil.')
281
+ end
282
+
283
+ if @coupon_rolledback_redemptions.nil?
284
+ invalid_properties.push('invalid value for "coupon_rolledback_redemptions", coupon_rolledback_redemptions cannot be nil.')
285
+ end
286
+
287
+ if @total_coupon_rolledback_redemptions.nil?
288
+ invalid_properties.push('invalid value for "total_coupon_rolledback_redemptions", total_coupon_rolledback_redemptions cannot be nil.')
289
+ end
290
+
291
+ if @referral_redemptions.nil?
292
+ invalid_properties.push('invalid value for "referral_redemptions", referral_redemptions cannot be nil.')
293
+ end
294
+
295
+ if @total_referral_redemptions.nil?
296
+ invalid_properties.push('invalid value for "total_referral_redemptions", total_referral_redemptions cannot be nil.')
297
+ end
298
+
299
+ if @coupons_created.nil?
300
+ invalid_properties.push('invalid value for "coupons_created", coupons_created cannot be nil.')
301
+ end
302
+
303
+ if @total_coupons_created.nil?
304
+ invalid_properties.push('invalid value for "total_coupons_created", total_coupons_created cannot be nil.')
305
+ end
306
+
307
+ if @referrals_created.nil?
308
+ invalid_properties.push('invalid value for "referrals_created", referrals_created cannot be nil.')
309
+ end
310
+
311
+ if @total_referrals_created.nil?
312
+ invalid_properties.push('invalid value for "total_referrals_created", total_referrals_created cannot be nil.')
313
+ end
314
+
315
+ invalid_properties
316
+ end
317
+
318
+ # Check to see if the all the properties in the model are valid
319
+ # @return true if the model is valid
320
+ def valid?
321
+ return false if @date.nil?
322
+ return false if @campaign_revenue.nil?
323
+ return false if @total_campaign_revenue.nil?
324
+ return false if @campaign_refund.nil?
325
+ return false if @total_campaign_refund.nil?
326
+ return false if @campaign_discount_costs.nil?
327
+ return false if @total_campaign_discount_costs.nil?
328
+ return false if @campaign_refunded_discounts.nil?
329
+ return false if @total_campaign_refunded_discounts.nil?
330
+ return false if @campaign_free_items.nil?
331
+ return false if @total_campaign_free_items.nil?
332
+ return false if @coupon_redemptions.nil?
333
+ return false if @total_coupon_redemptions.nil?
334
+ return false if @coupon_rolledback_redemptions.nil?
335
+ return false if @total_coupon_rolledback_redemptions.nil?
336
+ return false if @referral_redemptions.nil?
337
+ return false if @total_referral_redemptions.nil?
338
+ return false if @coupons_created.nil?
339
+ return false if @total_coupons_created.nil?
340
+ return false if @referrals_created.nil?
341
+ return false if @total_referrals_created.nil?
342
+ true
343
+ end
344
+
345
+ # Checks equality by comparing each attribute.
346
+ # @param [Object] Object to be compared
347
+ def ==(o)
348
+ return true if self.equal?(o)
349
+ self.class == o.class &&
350
+ date == o.date &&
351
+ campaign_revenue == o.campaign_revenue &&
352
+ total_campaign_revenue == o.total_campaign_revenue &&
353
+ campaign_refund == o.campaign_refund &&
354
+ total_campaign_refund == o.total_campaign_refund &&
355
+ campaign_discount_costs == o.campaign_discount_costs &&
356
+ total_campaign_discount_costs == o.total_campaign_discount_costs &&
357
+ campaign_refunded_discounts == o.campaign_refunded_discounts &&
358
+ total_campaign_refunded_discounts == o.total_campaign_refunded_discounts &&
359
+ campaign_free_items == o.campaign_free_items &&
360
+ total_campaign_free_items == o.total_campaign_free_items &&
361
+ coupon_redemptions == o.coupon_redemptions &&
362
+ total_coupon_redemptions == o.total_coupon_redemptions &&
363
+ coupon_rolledback_redemptions == o.coupon_rolledback_redemptions &&
364
+ total_coupon_rolledback_redemptions == o.total_coupon_rolledback_redemptions &&
365
+ referral_redemptions == o.referral_redemptions &&
366
+ total_referral_redemptions == o.total_referral_redemptions &&
367
+ coupons_created == o.coupons_created &&
368
+ total_coupons_created == o.total_coupons_created &&
369
+ referrals_created == o.referrals_created &&
370
+ total_referrals_created == o.total_referrals_created
371
+ end
372
+
373
+ # @see the `==` method
374
+ # @param [Object] Object to be compared
375
+ def eql?(o)
376
+ self == o
377
+ end
378
+
379
+ # Calculates hash code according to all attributes.
380
+ # @return [Fixnum] Hash code
381
+ def hash
382
+ [date, campaign_revenue, total_campaign_revenue, campaign_refund, total_campaign_refund, campaign_discount_costs, total_campaign_discount_costs, campaign_refunded_discounts, total_campaign_refunded_discounts, campaign_free_items, total_campaign_free_items, coupon_redemptions, total_coupon_redemptions, coupon_rolledback_redemptions, total_coupon_rolledback_redemptions, referral_redemptions, total_referral_redemptions, coupons_created, total_coupons_created, referrals_created, total_referrals_created].hash
383
+ end
384
+
385
+ # Builds the object from hash
386
+ # @param [Hash] attributes Model attributes in the form of hash
387
+ # @return [Object] Returns the model itself
388
+ def build_from_hash(attributes)
389
+ return nil unless attributes.is_a?(Hash)
390
+ self.class.swagger_types.each_pair do |key, type|
391
+ if type =~ /\AArray<(.*)>/i
392
+ # check to ensure the input is an array given that the the attribute
393
+ # is documented as an array but the input is not
394
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
395
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
396
+ end
397
+ elsif !attributes[self.class.attribute_map[key]].nil?
398
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
399
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
400
+ end
401
+
402
+ self
403
+ end
404
+
405
+ # Deserializes the data based on type
406
+ # @param string type Data type
407
+ # @param string value Value to be deserialized
408
+ # @return [Object] Deserialized data
409
+ def _deserialize(type, value)
410
+ case type.to_sym
411
+ when :DateTime
412
+ DateTime.parse(value)
413
+ when :Date
414
+ Date.parse(value)
415
+ when :String
416
+ value.to_s
417
+ when :Integer
418
+ value.to_i
419
+ when :Float
420
+ value.to_f
421
+ when :BOOLEAN
422
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
423
+ true
424
+ else
425
+ false
426
+ end
427
+ when :Object
428
+ # generic object (usually a Hash), return directly
429
+ value
430
+ when /\AArray<(?<inner_type>.+)>\z/
431
+ inner_type = Regexp.last_match[:inner_type]
432
+ value.map { |v| _deserialize(inner_type, v) }
433
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
434
+ k_type = Regexp.last_match[:k_type]
435
+ v_type = Regexp.last_match[:v_type]
436
+ {}.tap do |hash|
437
+ value.each do |k, v|
438
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
439
+ end
440
+ end
441
+ else # model
442
+ temp_model = TalonOne.const_get(type).new
443
+ temp_model.build_from_hash(value)
444
+ end
445
+ end
446
+
447
+ # Returns the string representation of the object
448
+ # @return [String] String presentation of the object
449
+ def to_s
450
+ to_hash.to_s
451
+ end
452
+
453
+ # to_body is an alias to to_hash (backward compatibility)
454
+ # @return [Hash] Returns the object in the form of hash
455
+ def to_body
456
+ to_hash
457
+ end
458
+
459
+ # Returns the object in the form of hash
460
+ # @return [Hash] Returns the object in the form of hash
461
+ def to_hash
462
+ hash = {}
463
+ self.class.attribute_map.each_pair do |attr, param|
464
+ value = self.send(attr)
465
+ next if value.nil?
466
+ hash[param] = _to_hash(value)
467
+ end
468
+ hash
469
+ end
470
+
471
+ # Outputs non-array value in the form of hash
472
+ # For object, use to_hash. Otherwise, just return the value
473
+ # @param [Object] value Any valid value
474
+ # @return [Hash] Returns the value in the form of hash
475
+ def _to_hash(value)
476
+ if value.is_a?(Array)
477
+ value.compact.map { |v| _to_hash(v) }
478
+ elsif value.is_a?(Hash)
479
+ {}.tap do |hash|
480
+ value.each { |k, v| hash[k] = _to_hash(v) }
481
+ end
482
+ elsif value.respond_to? :to_hash
483
+ value.to_hash
484
+ else
485
+ value
486
+ end
487
+ end
488
+ end
489
+ end