tremendous_ruby 5.29.0 → 5.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +48 -45
  3. data/lib/tremendous/api_client.rb +7 -3
  4. data/lib/tremendous/api_error.rb +1 -1
  5. data/lib/tremendous/api_model_base.rb +88 -0
  6. data/lib/tremendous/configuration.rb +1 -1
  7. data/lib/tremendous/models/allow_email.rb +2 -75
  8. data/lib/tremendous/models/allow_ip.rb +2 -75
  9. data/lib/tremendous/models/balance_transaction.rb +2 -75
  10. data/lib/tremendous/models/balance_transaction_order.rb +2 -75
  11. data/lib/tremendous/models/balance_transaction_order_payment.rb +2 -75
  12. data/lib/tremendous/models/base_order_for_create.rb +2 -75
  13. data/lib/tremendous/models/campaign.rb +4 -77
  14. data/lib/tremendous/models/campaign_base.rb +4 -77
  15. data/lib/tremendous/models/campaign_base_products_inner.rb +102 -0
  16. data/lib/tremendous/models/channel.rb +1 -1
  17. data/lib/tremendous/models/connected_organization.rb +2 -75
  18. data/lib/tremendous/models/connected_organization_member.rb +2 -75
  19. data/lib/tremendous/models/connected_organization_member_member.rb +2 -75
  20. data/lib/tremendous/models/connected_organization_member_response.rb +164 -0
  21. data/lib/tremendous/models/connected_organization_member_response_connected_organization_member.rb +273 -0
  22. data/lib/tremendous/models/connected_organization_member_session.rb +2 -75
  23. data/lib/tremendous/models/connected_organization_member_session_response.rb +164 -0
  24. data/lib/tremendous/models/connected_organization_member_session_response_connected_organization_member_session.rb +310 -0
  25. data/lib/tremendous/models/connected_organization_organization.rb +2 -75
  26. data/lib/tremendous/models/{generate_reward_link403_response.rb → connected_organization_response.rb} +20 -103
  27. data/lib/tremendous/models/connected_organization_response_connected_organization.rb +240 -0
  28. data/lib/tremendous/models/create_api_key200_response.rb +2 -75
  29. data/lib/tremendous/models/create_api_key_request.rb +2 -75
  30. data/lib/tremendous/models/create_campaign200_response.rb +2 -75
  31. data/lib/tremendous/models/create_campaign_request.rb +4 -77
  32. data/lib/tremendous/models/create_connected_organization200_response.rb +2 -75
  33. data/lib/tremendous/models/create_connected_organization_member200_response.rb +2 -75
  34. data/lib/tremendous/models/create_connected_organization_member_request.rb +2 -75
  35. data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +2 -75
  36. data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +2 -75
  37. data/lib/tremendous/models/create_connected_organization_member_session_request.rb +2 -75
  38. data/lib/tremendous/models/create_connected_organization_request.rb +3 -76
  39. data/lib/tremendous/models/create_connected_organization_request_kyb_prefill.rb +13 -76
  40. data/lib/tremendous/models/create_field.rb +2 -75
  41. data/lib/tremendous/models/create_field200_response.rb +2 -75
  42. data/lib/tremendous/models/create_field_request.rb +2 -75
  43. data/lib/tremendous/models/create_field_request_data.rb +2 -75
  44. data/lib/tremendous/models/create_invoice200_response.rb +2 -75
  45. data/lib/tremendous/models/create_invoice_request.rb +4 -77
  46. data/lib/tremendous/models/create_member.rb +2 -75
  47. data/lib/tremendous/models/create_member200_response.rb +2 -75
  48. data/lib/tremendous/models/create_member_request.rb +2 -75
  49. data/lib/tremendous/models/create_order200_response.rb +2 -75
  50. data/lib/tremendous/models/create_order200_response_order.rb +3 -76
  51. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +2 -75
  52. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +2 -75
  53. data/lib/tremendous/models/create_order_request.rb +3 -4
  54. data/lib/tremendous/models/create_organization.rb +2 -75
  55. data/lib/tremendous/models/create_organization200_response.rb +2 -75
  56. data/lib/tremendous/models/create_organization200_response_organization.rb +2 -75
  57. data/lib/tremendous/models/create_organization_for_response.rb +2 -75
  58. data/lib/tremendous/models/create_organization_properties.rb +2 -75
  59. data/lib/tremendous/models/create_organization_request.rb +2 -75
  60. data/lib/tremendous/models/create_organization_request_copy_settings.rb +2 -75
  61. data/lib/tremendous/models/create_organization_response.rb +147 -0
  62. data/lib/tremendous/models/create_organization_response_organization.rb +282 -0
  63. data/lib/tremendous/models/create_report200_response.rb +2 -75
  64. data/lib/tremendous/models/create_report200_response_report.rb +2 -75
  65. data/lib/tremendous/models/create_report_request.rb +2 -75
  66. data/lib/tremendous/models/create_report_request_filters.rb +2 -75
  67. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +2 -75
  68. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +2 -75
  69. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +2 -75
  70. data/lib/tremendous/models/create_topup200_response.rb +2 -75
  71. data/lib/tremendous/models/create_topup_request.rb +2 -75
  72. data/lib/tremendous/models/create_webhook200_response.rb +2 -75
  73. data/lib/tremendous/models/create_webhook_request.rb +2 -75
  74. data/lib/tremendous/models/currency_codes.rb +1 -1
  75. data/lib/tremendous/models/custom_field.rb +2 -75
  76. data/lib/tremendous/models/delivery_details.rb +2 -75
  77. data/lib/tremendous/models/delivery_details_with_link.rb +2 -75
  78. data/lib/tremendous/models/delivery_metadata.rb +2 -75
  79. data/lib/tremendous/models/delivery_method.rb +1 -1
  80. data/lib/tremendous/models/delivery_status.rb +1 -1
  81. data/lib/tremendous/models/error_model.rb +2 -75
  82. data/lib/tremendous/models/field.rb +2 -75
  83. data/lib/tremendous/models/fraud_config_allow_email.rb +2 -75
  84. data/lib/tremendous/models/fraud_config_country.rb +2 -75
  85. data/lib/tremendous/models/fraud_config_country_update_list.rb +2 -75
  86. data/lib/tremendous/models/fraud_config_ip.rb +2 -75
  87. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +2 -75
  88. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +2 -75
  89. data/lib/tremendous/models/fraud_config_review_email.rb +2 -75
  90. data/lib/tremendous/models/fraud_config_review_vpn.rb +2 -75
  91. data/lib/tremendous/models/fraud_generic_response.rb +2 -75
  92. data/lib/tremendous/models/fraud_review.rb +3 -76
  93. data/lib/tremendous/models/fraud_review_base.rb +3 -76
  94. data/lib/tremendous/models/fraud_review_geo.rb +2 -75
  95. data/lib/tremendous/models/fraud_review_list_item.rb +3 -76
  96. data/lib/tremendous/models/fraud_review_reason.rb +1 -1
  97. data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
  98. data/lib/tremendous/models/fraud_review_related_rewards.rb +2 -75
  99. data/lib/tremendous/models/fraud_review_risk.rb +1 -1
  100. data/lib/tremendous/models/fraud_review_status.rb +1 -1
  101. data/lib/tremendous/models/fraud_rule200_response.rb +2 -75
  102. data/lib/tremendous/models/fraud_rule_request.rb +2 -75
  103. data/lib/tremendous/models/fraud_rule_request_config.rb +3 -4
  104. data/lib/tremendous/models/fraud_rule_type.rb +1 -1
  105. data/lib/tremendous/models/fraud_rules_list_item.rb +2 -75
  106. data/lib/tremendous/models/funding_source.rb +3 -76
  107. data/lib/tremendous/models/generate_reward_link200_response.rb +2 -75
  108. data/lib/tremendous/models/generate_reward_link200_response_reward.rb +2 -75
  109. data/lib/tremendous/models/get_fraud_review200_response.rb +2 -75
  110. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +2 -75
  111. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +2 -75
  112. data/lib/tremendous/models/get_funding_source200_response.rb +2 -75
  113. data/lib/tremendous/models/get_member200_response.rb +2 -75
  114. data/lib/tremendous/models/get_member200_response_member.rb +2 -75
  115. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +2 -75
  116. data/lib/tremendous/models/get_order200_response.rb +2 -75
  117. data/lib/tremendous/models/get_organization200_response.rb +2 -75
  118. data/lib/tremendous/models/get_product_response.rb +2 -75
  119. data/lib/tremendous/models/get_reward200_response.rb +2 -75
  120. data/lib/tremendous/models/inline_object.rb +2 -75
  121. data/lib/tremendous/models/invoice.rb +4 -77
  122. data/lib/tremendous/models/invoice_response.rb +164 -0
  123. data/lib/tremendous/models/invoice_response_invoice.rb +370 -0
  124. data/lib/tremendous/models/list_balance_transactions200_response.rb +2 -75
  125. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +2 -75
  126. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +2 -75
  127. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +2 -75
  128. data/lib/tremendous/models/list_campaigns200_response.rb +2 -75
  129. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +4 -77
  130. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +2 -75
  131. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +2 -75
  132. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_products_inner.rb +102 -0
  133. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +2 -75
  134. data/lib/tremendous/models/list_connected_organization_members200_response.rb +2 -75
  135. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +2 -75
  136. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +2 -75
  137. data/lib/tremendous/models/list_connected_organizations200_response.rb +2 -75
  138. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +2 -75
  139. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +2 -75
  140. data/lib/tremendous/models/list_fields200_response.rb +2 -75
  141. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +2 -75
  142. data/lib/tremendous/models/list_fields200_response_fields_inner_data.rb +2 -75
  143. data/lib/tremendous/models/list_forex_response.rb +2 -75
  144. data/lib/tremendous/models/list_fraud_reviews200_response.rb +2 -75
  145. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +2 -75
  146. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner_geo.rb +2 -75
  147. data/lib/tremendous/models/list_fraud_rules200_response.rb +2 -75
  148. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +2 -75
  149. data/lib/tremendous/models/list_funding_sources200_response.rb +2 -75
  150. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +3 -76
  151. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +17 -78
  152. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +2 -75
  153. data/lib/tremendous/models/list_invoices200_response.rb +2 -75
  154. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +4 -77
  155. data/lib/tremendous/models/list_members200_response.rb +2 -75
  156. data/lib/tremendous/models/list_members200_response_members_inner.rb +2 -75
  157. data/lib/tremendous/models/list_orders200_response.rb +2 -75
  158. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +3 -76
  159. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +2 -75
  160. data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +2 -75
  161. data/lib/tremendous/models/list_organizations200_response.rb +2 -75
  162. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +2 -75
  163. data/lib/tremendous/models/list_products_response.rb +2 -75
  164. data/lib/tremendous/models/list_products_response_products_inner.rb +4 -77
  165. data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +2 -75
  166. data/lib/tremendous/models/list_products_response_products_inner_documents.rb +2 -75
  167. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +2 -75
  168. data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +61 -81
  169. data/lib/tremendous/models/list_rewards200_response.rb +2 -75
  170. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +2 -75
  171. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +2 -75
  172. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +2 -75
  173. data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +2 -75
  174. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +2 -75
  175. data/lib/tremendous/models/list_rewards401_response.rb +2 -75
  176. data/lib/tremendous/models/list_rewards401_response_errors.rb +2 -75
  177. data/lib/tremendous/models/list_roles200_response.rb +2 -75
  178. data/lib/tremendous/models/list_roles200_response_roles_inner.rb +2 -75
  179. data/lib/tremendous/models/list_topups200_response.rb +2 -75
  180. data/lib/tremendous/models/list_topups200_response_topups_inner.rb +3 -76
  181. data/lib/tremendous/models/list_webhook_events200_response.rb +2 -75
  182. data/lib/tremendous/models/list_webhooks200_response.rb +2 -75
  183. data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +2 -75
  184. data/lib/tremendous/models/member.rb +2 -75
  185. data/lib/tremendous/models/member_base.rb +2 -75
  186. data/lib/tremendous/models/member_with_events.rb +2 -75
  187. data/lib/tremendous/models/member_without_events.rb +2 -75
  188. data/lib/tremendous/models/{fraud_rule400_response.rb → member_without_events_response.rb} +20 -103
  189. data/lib/tremendous/models/member_without_events_response_member.rb +311 -0
  190. data/lib/tremendous/models/order.rb +4 -77
  191. data/lib/tremendous/models/order_base.rb +3 -76
  192. data/lib/tremendous/models/order_base_payment.rb +2 -75
  193. data/lib/tremendous/models/order_status.rb +1 -1
  194. data/lib/tremendous/models/order_with_link.rb +3 -76
  195. data/lib/tremendous/models/order_with_link_rewards_inner.rb +2 -75
  196. data/lib/tremendous/models/order_without_link.rb +4 -77
  197. data/lib/tremendous/models/organization.rb +2 -75
  198. data/lib/tremendous/models/organization_response.rb +147 -0
  199. data/lib/tremendous/models/organization_response_organization.rb +285 -0
  200. data/lib/tremendous/models/payment_details.rb +2 -75
  201. data/lib/tremendous/models/payment_details_refund.rb +2 -75
  202. data/lib/tremendous/models/payout.rb +2 -75
  203. data/lib/tremendous/models/product.rb +4 -77
  204. data/lib/tremendous/models/product_documents.rb +2 -75
  205. data/lib/tremendous/models/recipient.rb +2 -75
  206. data/lib/tremendous/models/refund_details.rb +2 -75
  207. data/lib/tremendous/models/report.rb +2 -75
  208. data/lib/tremendous/models/{delete_fraud_rule200_response.rb → report_response.rb} +25 -89
  209. data/lib/tremendous/models/resend_reward_request.rb +2 -75
  210. data/lib/tremendous/models/review_country.rb +2 -75
  211. data/lib/tremendous/models/review_country1.rb +2 -75
  212. data/lib/tremendous/models/review_email.rb +2 -75
  213. data/lib/tremendous/models/review_ip.rb +2 -75
  214. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +2 -75
  215. data/lib/tremendous/models/review_redeemed_rewards_count.rb +2 -75
  216. data/lib/tremendous/models/review_vpn.rb +2 -75
  217. data/lib/tremendous/models/reward.rb +2 -75
  218. data/lib/tremendous/models/reward_base.rb +2 -75
  219. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +2 -75
  220. data/lib/tremendous/models/reward_for_order_create.rb +2 -75
  221. data/lib/tremendous/models/reward_link.rb +2 -75
  222. data/lib/tremendous/models/{inline_object1.rb → reward_link_response.rb} +5 -78
  223. data/lib/tremendous/models/reward_link_response_reward.rb +180 -0
  224. data/lib/tremendous/models/reward_response.rb +164 -0
  225. data/lib/tremendous/models/{order_without_link_rewards_inner.rb → reward_response_reward.rb} +4 -77
  226. data/lib/tremendous/models/reward_token.rb +2 -75
  227. data/lib/tremendous/models/reward_token_response.rb +164 -0
  228. data/lib/tremendous/models/{inline_object1_reward.rb → reward_token_response_reward.rb} +4 -77
  229. data/lib/tremendous/models/reward_value.rb +2 -75
  230. data/lib/tremendous/models/reward_with_link.rb +2 -75
  231. data/lib/tremendous/models/reward_with_link_delivery.rb +2 -75
  232. data/lib/tremendous/models/reward_without_link.rb +2 -75
  233. data/lib/tremendous/models/reward_without_link_delivery.rb +2 -75
  234. data/lib/tremendous/models/role.rb +2 -75
  235. data/lib/tremendous/models/simulate_webhook_request.rb +2 -75
  236. data/lib/tremendous/models/single_reward_order.rb +2 -75
  237. data/lib/tremendous/models/single_reward_order_payment.rb +2 -75
  238. data/lib/tremendous/models/single_reward_order_reward.rb +2 -75
  239. data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +2 -75
  240. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +2 -75
  241. data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +2 -75
  242. data/lib/tremendous/models/single_reward_order_with_link.rb +2 -75
  243. data/lib/tremendous/models/single_reward_order_with_link_order.rb +3 -76
  244. data/lib/tremendous/models/single_reward_order_without_link.rb +2 -75
  245. data/lib/tremendous/models/single_reward_order_without_link_order.rb +4 -77
  246. data/lib/tremendous/models/topup.rb +3 -76
  247. data/lib/tremendous/models/topup_create_request.rb +2 -75
  248. data/lib/tremendous/models/topup_response.rb +147 -0
  249. data/lib/tremendous/models/update_campaign.rb +4 -77
  250. data/lib/tremendous/models/update_campaign_request.rb +4 -77
  251. data/lib/tremendous/models/update_fraud_rule_list_request.rb +2 -75
  252. data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +7 -8
  253. data/lib/tremendous/models/update_member.rb +2 -75
  254. data/lib/tremendous/models/update_member_request.rb +2 -75
  255. data/lib/tremendous/models/webhook.rb +2 -75
  256. data/lib/tremendous/models/webhook_post.rb +2 -75
  257. data/lib/tremendous/models/webhook_response.rb +147 -0
  258. data/lib/tremendous/models/{update_fraud_rule_list200_response.rb → webhook_response_webhook.rb} +47 -94
  259. data/lib/tremendous/version.rb +1 -1
  260. data/lib/tremendous.rb +28 -15
  261. metadata +28 -15
  262. data/lib/tremendous/models/allow_email1.rb +0 -250
  263. data/lib/tremendous/models/allow_ip1.rb +0 -250
  264. data/lib/tremendous/models/fraud_rule422_response.rb +0 -247
  265. data/lib/tremendous/models/list_rewards429_response.rb +0 -247
  266. data/lib/tremendous/models/resend_reward422_response.rb +0 -247
  267. data/lib/tremendous/models/review_email1.rb +0 -255
  268. data/lib/tremendous/models/review_ip1.rb +0 -250
@@ -0,0 +1,370 @@
1
+ =begin
2
+ #API Endpoints
3
+
4
+ #Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
5
+
6
+ The version of the OpenAPI document: 2
7
+ Contact: developers@tremendous.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Tremendous
17
+ # Invoices are instruments to fund your Tremendous account's balance. Invoices can be created by your organization programatically. Once we receive your payment, the invoice is marked as `PAID` and we add the respective funds to your account's balance.
18
+ class InvoiceResponseInvoice < ApiModelBase
19
+ # The invoice number
20
+ attr_accessor :id
21
+
22
+ # Reference to the purchase order number within your organization
23
+ attr_accessor :po_number
24
+
25
+ # Amount of the invoice
26
+ attr_accessor :amount
27
+
28
+ # Currency of the invoice
29
+ attr_accessor :currency_code
30
+
31
+ # Deprecated: Use `currency_code` instead.
32
+ attr_accessor :currency
33
+
34
+ attr_accessor :international
35
+
36
+ # Status of this invoice <table> <thead> <tr> <th>Status</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>DELETED</code></td> <td>Invoice has been deleted by your organization</td> </tr> <tr> <td><code>PAID</code></td> <td>Invoice has been paid by your organization</td> </tr> <tr> <td><code>OPEN</code></td> <td>Invoice has been created by your organization but has not been paid, yet</td> </tr> </tbody> </table>
37
+ attr_accessor :status
38
+
39
+ # List of orders related to the invoice (it doesn't apply to prefunding)
40
+ attr_accessor :orders
41
+
42
+ # List of rewards related to the invoice (it doesn't apply to prefunding)
43
+ attr_accessor :rewards
44
+
45
+ # Timestamp of when the invoice has been created.
46
+ attr_accessor :created_at
47
+
48
+ # Timestamp of when the invoice has been paid.
49
+ attr_accessor :paid_at
50
+
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'id' => :'id',
77
+ :'po_number' => :'po_number',
78
+ :'amount' => :'amount',
79
+ :'currency_code' => :'currency_code',
80
+ :'currency' => :'currency',
81
+ :'international' => :'international',
82
+ :'status' => :'status',
83
+ :'orders' => :'orders',
84
+ :'rewards' => :'rewards',
85
+ :'created_at' => :'created_at',
86
+ :'paid_at' => :'paid_at'
87
+ }
88
+ end
89
+
90
+ # Returns attribute mapping this model knows about
91
+ def self.acceptable_attribute_map
92
+ attribute_map
93
+ end
94
+
95
+ # Returns all the JSON keys this model knows about
96
+ def self.acceptable_attributes
97
+ acceptable_attribute_map.values
98
+ end
99
+
100
+ # Attribute type mapping.
101
+ def self.openapi_types
102
+ {
103
+ :'id' => :'String',
104
+ :'po_number' => :'String',
105
+ :'amount' => :'Float',
106
+ :'currency_code' => :'String',
107
+ :'currency' => :'String',
108
+ :'international' => :'Boolean',
109
+ :'status' => :'String',
110
+ :'orders' => :'Array<String>',
111
+ :'rewards' => :'Array<String>',
112
+ :'created_at' => :'Time',
113
+ :'paid_at' => :'Time'
114
+ }
115
+ end
116
+
117
+ # List of attributes with nullable: true
118
+ def self.openapi_nullable
119
+ Set.new([
120
+ :'po_number',
121
+ :'paid_at'
122
+ ])
123
+ end
124
+
125
+ # Initializes the object
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ def initialize(attributes = {})
128
+ if (!attributes.is_a?(Hash))
129
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::InvoiceResponseInvoice` initialize method"
130
+ end
131
+
132
+ # check to see if the attribute exists and convert string to symbol for hash key
133
+ acceptable_attribute_map = self.class.acceptable_attribute_map
134
+ attributes = attributes.each_with_object({}) { |(k, v), h|
135
+ if (!acceptable_attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::InvoiceResponseInvoice`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
137
+ end
138
+ h[k.to_sym] = v
139
+ }
140
+
141
+ if attributes.key?(:'id')
142
+ self.id = attributes[:'id']
143
+ else
144
+ self.id = nil
145
+ end
146
+
147
+ if attributes.key?(:'po_number')
148
+ self.po_number = attributes[:'po_number']
149
+ end
150
+
151
+ if attributes.key?(:'amount')
152
+ self.amount = attributes[:'amount']
153
+ else
154
+ self.amount = nil
155
+ end
156
+
157
+ if attributes.key?(:'currency_code')
158
+ self.currency_code = attributes[:'currency_code']
159
+ end
160
+
161
+ if attributes.key?(:'currency')
162
+ self.currency = attributes[:'currency']
163
+ end
164
+
165
+ if attributes.key?(:'international')
166
+ self.international = attributes[:'international']
167
+ end
168
+
169
+ if attributes.key?(:'status')
170
+ self.status = attributes[:'status']
171
+ else
172
+ self.status = nil
173
+ end
174
+
175
+ if attributes.key?(:'orders')
176
+ if (value = attributes[:'orders']).is_a?(Array)
177
+ self.orders = value
178
+ end
179
+ end
180
+
181
+ if attributes.key?(:'rewards')
182
+ if (value = attributes[:'rewards']).is_a?(Array)
183
+ self.rewards = value
184
+ end
185
+ end
186
+
187
+ if attributes.key?(:'created_at')
188
+ self.created_at = attributes[:'created_at']
189
+ else
190
+ self.created_at = nil
191
+ end
192
+
193
+ if attributes.key?(:'paid_at')
194
+ self.paid_at = attributes[:'paid_at']
195
+ else
196
+ self.paid_at = nil
197
+ end
198
+ end
199
+
200
+ # Show invalid properties with the reasons. Usually used together with valid?
201
+ # @return Array for valid properties with the reasons
202
+ def list_invalid_properties
203
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
204
+ invalid_properties = Array.new
205
+ if @id.nil?
206
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
207
+ end
208
+
209
+ if @amount.nil?
210
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
211
+ end
212
+
213
+ if @status.nil?
214
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
215
+ end
216
+
217
+ if @created_at.nil?
218
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
219
+ end
220
+
221
+ invalid_properties
222
+ end
223
+
224
+ # Check to see if the all the properties in the model are valid
225
+ # @return true if the model is valid
226
+ def valid?
227
+ warn '[DEPRECATED] the `valid?` method is obsolete'
228
+ return false if @id.nil?
229
+ return false if @amount.nil?
230
+ currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
231
+ return false unless currency_code_validator.valid?(@currency_code)
232
+ currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
233
+ return false unless currency_validator.valid?(@currency)
234
+ return false if @status.nil?
235
+ status_validator = EnumAttributeValidator.new('String', ["DELETED", "PAID", "OPEN", "MARKED_AS_PAID"])
236
+ return false unless status_validator.valid?(@status)
237
+ return false if @created_at.nil?
238
+ true
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] id Value to be assigned
243
+ def id=(id)
244
+ if id.nil?
245
+ fail ArgumentError, 'id cannot be nil'
246
+ end
247
+
248
+ @id = id
249
+ end
250
+
251
+ # Custom attribute writer method with validation
252
+ # @param [Object] amount Value to be assigned
253
+ def amount=(amount)
254
+ if amount.nil?
255
+ fail ArgumentError, 'amount cannot be nil'
256
+ end
257
+
258
+ @amount = amount
259
+ end
260
+
261
+ # Custom attribute writer method for enum attributes. Any value is accepted
262
+ # so that enum values added to the API don't break deserialization on
263
+ # older versions of this gem.
264
+ # @param [Object] currency_code Object to be assigned
265
+ def currency_code=(currency_code)
266
+ @currency_code = currency_code
267
+ end
268
+
269
+ # Custom attribute writer method for enum attributes. Any value is accepted
270
+ # so that enum values added to the API don't break deserialization on
271
+ # older versions of this gem.
272
+ # @param [Object] currency Object to be assigned
273
+ def currency=(currency)
274
+ @currency = currency
275
+ end
276
+
277
+ # Custom attribute writer method for enum attributes. Any value is accepted
278
+ # so that enum values added to the API don't break deserialization on
279
+ # older versions of this gem.
280
+ # @param [Object] status Object to be assigned
281
+ def status=(status)
282
+ if status.nil?
283
+ fail ArgumentError, 'status cannot be nil'
284
+ end
285
+
286
+ @status = status
287
+ end
288
+
289
+ # Custom attribute writer method with validation
290
+ # @param [Object] created_at Value to be assigned
291
+ def created_at=(created_at)
292
+ if created_at.nil?
293
+ fail ArgumentError, 'created_at cannot be nil'
294
+ end
295
+
296
+ @created_at = created_at
297
+ end
298
+
299
+ # Checks equality by comparing each attribute.
300
+ # @param [Object] Object to be compared
301
+ def ==(o)
302
+ return true if self.equal?(o)
303
+ self.class == o.class &&
304
+ id == o.id &&
305
+ po_number == o.po_number &&
306
+ amount == o.amount &&
307
+ currency_code == o.currency_code &&
308
+ currency == o.currency &&
309
+ international == o.international &&
310
+ status == o.status &&
311
+ orders == o.orders &&
312
+ rewards == o.rewards &&
313
+ created_at == o.created_at &&
314
+ paid_at == o.paid_at
315
+ end
316
+
317
+ # @see the `==` method
318
+ # @param [Object] Object to be compared
319
+ def eql?(o)
320
+ self == o
321
+ end
322
+
323
+ # Calculates hash code according to all attributes.
324
+ # @return [Integer] Hash code
325
+ def hash
326
+ [id, po_number, amount, currency_code, currency, international, status, orders, rewards, created_at, paid_at].hash
327
+ end
328
+
329
+ # Builds the object from hash
330
+ # @param [Hash] attributes Model attributes in the form of hash
331
+ # @return [Object] Returns the model itself
332
+ def self.build_from_hash(attributes)
333
+ return nil unless attributes.is_a?(Hash)
334
+ attributes = attributes.transform_keys(&:to_sym)
335
+ transformed_hash = {}
336
+ openapi_types.each_pair do |key, type|
337
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
338
+ transformed_hash["#{key}"] = nil
339
+ elsif type =~ /\AArray<(.*)>/i
340
+ # check to ensure the input is an array given that the attribute
341
+ # is documented as an array but the input is not
342
+ if attributes[attribute_map[key]].is_a?(Array)
343
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
344
+ end
345
+ elsif !attributes[attribute_map[key]].nil?
346
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
347
+ end
348
+ end
349
+ new(transformed_hash)
350
+ end
351
+
352
+ # Returns the object in the form of hash
353
+ # @return [Hash] Returns the object in the form of hash
354
+ def to_hash
355
+ hash = {}
356
+ self.class.attribute_map.each_pair do |attr, param|
357
+ value = self.send(attr)
358
+ if value.nil?
359
+ is_nullable = self.class.openapi_nullable.include?(attr)
360
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
361
+ end
362
+
363
+ hash[param] = _to_hash(value)
364
+ end
365
+ hash
366
+ end
367
+
368
+ end
369
+
370
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Tremendous
17
- class ListBalanceTransactions200Response
17
+ class ListBalanceTransactions200Response < ApiModelBase
18
18
  attr_accessor :transactions
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -145,61 +145,6 @@ module Tremendous
145
145
  new(transformed_hash)
146
146
  end
147
147
 
148
- # Deserializes the data based on type
149
- # @param string type Data type
150
- # @param string value Value to be deserialized
151
- # @return [Object] Deserialized data
152
- def self._deserialize(type, value)
153
- case type.to_sym
154
- when :Time
155
- Time.parse(value)
156
- when :Date
157
- Date.parse(value)
158
- when :String
159
- value.to_s
160
- when :Integer
161
- value.to_i
162
- when :Float
163
- value.to_f
164
- when :Boolean
165
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
- true
167
- else
168
- false
169
- end
170
- when :Object
171
- # generic object (usually a Hash), return directly
172
- value
173
- when /\AArray<(?<inner_type>.+)>\z/
174
- inner_type = Regexp.last_match[:inner_type]
175
- value.map { |v| _deserialize(inner_type, v) }
176
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
- k_type = Regexp.last_match[:k_type]
178
- v_type = Regexp.last_match[:v_type]
179
- {}.tap do |hash|
180
- value.each do |k, v|
181
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
- end
183
- end
184
- else # model
185
- # models (e.g. Pet) or oneOf
186
- klass = Tremendous.const_get(type)
187
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
- end
189
- end
190
-
191
- # Returns the string representation of the object
192
- # @return [String] String presentation of the object
193
- def to_s
194
- to_hash.to_s
195
- end
196
-
197
- # to_body is an alias to to_hash (backward compatibility)
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_body
200
- to_hash
201
- end
202
-
203
148
  # Returns the object in the form of hash
204
149
  # @return [Hash] Returns the object in the form of hash
205
150
  def to_hash
@@ -216,24 +161,6 @@ module Tremendous
216
161
  hash
217
162
  end
218
163
 
219
- # Outputs non-array value in the form of hash
220
- # For object, use to_hash. Otherwise, just return the value
221
- # @param [Object] value Any valid value
222
- # @return [Hash] Returns the value in the form of hash
223
- def _to_hash(value)
224
- if value.is_a?(Array)
225
- value.compact.map { |v| _to_hash(v) }
226
- elsif value.is_a?(Hash)
227
- {}.tap do |hash|
228
- value.each { |k, v| hash[k] = _to_hash(v) }
229
- end
230
- elsif value.respond_to? :to_hash
231
- value.to_hash
232
- else
233
- value
234
- end
235
- end
236
-
237
164
  end
238
165
 
239
166
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Tremendous
17
17
  # A balance transaction represents a specific movement or change in an account's balance.
18
- class ListBalanceTransactions200ResponseTransactionsInner
18
+ class ListBalanceTransactions200ResponseTransactionsInner < ApiModelBase
19
19
  # Date that the transaction was created
20
20
  attr_accessor :created_at
21
21
 
@@ -289,61 +289,6 @@ module Tremendous
289
289
  new(transformed_hash)
290
290
  end
291
291
 
292
- # Deserializes the data based on type
293
- # @param string type Data type
294
- # @param string value Value to be deserialized
295
- # @return [Object] Deserialized data
296
- def self._deserialize(type, value)
297
- case type.to_sym
298
- when :Time
299
- Time.parse(value)
300
- when :Date
301
- Date.parse(value)
302
- when :String
303
- value.to_s
304
- when :Integer
305
- value.to_i
306
- when :Float
307
- value.to_f
308
- when :Boolean
309
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
310
- true
311
- else
312
- false
313
- end
314
- when :Object
315
- # generic object (usually a Hash), return directly
316
- value
317
- when /\AArray<(?<inner_type>.+)>\z/
318
- inner_type = Regexp.last_match[:inner_type]
319
- value.map { |v| _deserialize(inner_type, v) }
320
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
321
- k_type = Regexp.last_match[:k_type]
322
- v_type = Regexp.last_match[:v_type]
323
- {}.tap do |hash|
324
- value.each do |k, v|
325
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
326
- end
327
- end
328
- else # model
329
- # models (e.g. Pet) or oneOf
330
- klass = Tremendous.const_get(type)
331
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
332
- end
333
- end
334
-
335
- # Returns the string representation of the object
336
- # @return [String] String presentation of the object
337
- def to_s
338
- to_hash.to_s
339
- end
340
-
341
- # to_body is an alias to to_hash (backward compatibility)
342
- # @return [Hash] Returns the object in the form of hash
343
- def to_body
344
- to_hash
345
- end
346
-
347
292
  # Returns the object in the form of hash
348
293
  # @return [Hash] Returns the object in the form of hash
349
294
  def to_hash
@@ -360,24 +305,6 @@ module Tremendous
360
305
  hash
361
306
  end
362
307
 
363
- # Outputs non-array value in the form of hash
364
- # For object, use to_hash. Otherwise, just return the value
365
- # @param [Object] value Any valid value
366
- # @return [Hash] Returns the value in the form of hash
367
- def _to_hash(value)
368
- if value.is_a?(Array)
369
- value.compact.map { |v| _to_hash(v) }
370
- elsif value.is_a?(Hash)
371
- {}.tap do |hash|
372
- value.each { |k, v| hash[k] = _to_hash(v) }
373
- end
374
- elsif value.respond_to? :to_hash
375
- value.to_hash
376
- else
377
- value
378
- end
379
- end
380
-
381
308
  end
382
309
 
383
310
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Tremendous
17
17
  # Order details
18
- class ListBalanceTransactions200ResponseTransactionsInnerOrder
18
+ class ListBalanceTransactions200ResponseTransactionsInnerOrder < ApiModelBase
19
19
  attr_accessor :id
20
20
 
21
21
  # Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only.
@@ -168,61 +168,6 @@ module Tremendous
168
168
  new(transformed_hash)
169
169
  end
170
170
 
171
- # Deserializes the data based on type
172
- # @param string type Data type
173
- # @param string value Value to be deserialized
174
- # @return [Object] Deserialized data
175
- def self._deserialize(type, value)
176
- case type.to_sym
177
- when :Time
178
- Time.parse(value)
179
- when :Date
180
- Date.parse(value)
181
- when :String
182
- value.to_s
183
- when :Integer
184
- value.to_i
185
- when :Float
186
- value.to_f
187
- when :Boolean
188
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
- true
190
- else
191
- false
192
- end
193
- when :Object
194
- # generic object (usually a Hash), return directly
195
- value
196
- when /\AArray<(?<inner_type>.+)>\z/
197
- inner_type = Regexp.last_match[:inner_type]
198
- value.map { |v| _deserialize(inner_type, v) }
199
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
- k_type = Regexp.last_match[:k_type]
201
- v_type = Regexp.last_match[:v_type]
202
- {}.tap do |hash|
203
- value.each do |k, v|
204
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
- end
206
- end
207
- else # model
208
- # models (e.g. Pet) or oneOf
209
- klass = Tremendous.const_get(type)
210
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
- end
212
- end
213
-
214
- # Returns the string representation of the object
215
- # @return [String] String presentation of the object
216
- def to_s
217
- to_hash.to_s
218
- end
219
-
220
- # to_body is an alias to to_hash (backward compatibility)
221
- # @return [Hash] Returns the object in the form of hash
222
- def to_body
223
- to_hash
224
- end
225
-
226
171
  # Returns the object in the form of hash
227
172
  # @return [Hash] Returns the object in the form of hash
228
173
  def to_hash
@@ -239,24 +184,6 @@ module Tremendous
239
184
  hash
240
185
  end
241
186
 
242
- # Outputs non-array value in the form of hash
243
- # For object, use to_hash. Otherwise, just return the value
244
- # @param [Object] value Any valid value
245
- # @return [Hash] Returns the value in the form of hash
246
- def _to_hash(value)
247
- if value.is_a?(Array)
248
- value.compact.map { |v| _to_hash(v) }
249
- elsif value.is_a?(Hash)
250
- {}.tap do |hash|
251
- value.each { |k, v| hash[k] = _to_hash(v) }
252
- end
253
- elsif value.respond_to? :to_hash
254
- value.to_hash
255
- else
256
- value
257
- end
258
- end
259
-
260
187
  end
261
188
 
262
189
  end