tremendous_ruby 5.9.0 → 5.11.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 (229) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +530 -58
  3. data/lib/tremendous/api_client.rb +1 -1
  4. data/lib/tremendous/api_error.rb +1 -1
  5. data/lib/tremendous/configuration.rb +1 -1
  6. data/lib/tremendous/models/allow_email.rb +20 -4
  7. data/lib/tremendous/models/allow_email1.rb +20 -4
  8. data/lib/tremendous/models/allow_ip.rb +20 -4
  9. data/lib/tremendous/models/allow_ip1.rb +20 -4
  10. data/lib/tremendous/models/balance_transaction.rb +60 -4
  11. data/lib/tremendous/models/balance_transaction_order.rb +10 -4
  12. data/lib/tremendous/models/balance_transaction_order_payment.rb +10 -4
  13. data/lib/tremendous/models/base_order_for_create.rb +20 -4
  14. data/lib/tremendous/models/campaign.rb +30 -4
  15. data/lib/tremendous/models/campaign_base.rb +10 -4
  16. data/lib/tremendous/models/channel.rb +3 -2
  17. data/lib/tremendous/models/connected_organization.rb +313 -0
  18. data/lib/tremendous/models/connected_organization_member.rb +346 -0
  19. data/lib/tremendous/models/connected_organization_member_member.rb +382 -0
  20. data/lib/tremendous/models/connected_organization_member_session.rb +357 -0
  21. data/lib/tremendous/models/connected_organization_organization.rb +350 -0
  22. data/lib/tremendous/models/create_api_key200_response.rb +10 -4
  23. data/lib/tremendous/models/create_campaign200_response.rb +237 -0
  24. data/lib/tremendous/models/create_campaign_request.rb +30 -4
  25. data/lib/tremendous/models/create_connected_organization200_response.rb +237 -0
  26. data/lib/tremendous/models/create_connected_organization_member200_response.rb +237 -0
  27. data/lib/tremendous/models/create_connected_organization_member_request.rb +238 -0
  28. data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +237 -0
  29. data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +357 -0
  30. data/lib/tremendous/models/create_connected_organization_member_session_request.rb +238 -0
  31. data/lib/tremendous/models/create_connected_organization_request.rb +238 -0
  32. data/lib/tremendous/models/create_invoice200_response.rb +20 -4
  33. data/lib/tremendous/models/create_invoice_request.rb +20 -4
  34. data/lib/tremendous/models/create_member.rb +30 -4
  35. data/lib/tremendous/models/create_member200_response.rb +20 -4
  36. data/lib/tremendous/models/create_member_request.rb +30 -4
  37. data/lib/tremendous/models/create_order200_response.rb +20 -4
  38. data/lib/tremendous/models/create_order200_response_order.rb +22 -6
  39. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +10 -4
  40. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +11 -5
  41. data/lib/tremendous/models/create_order_request.rb +1 -1
  42. data/lib/tremendous/models/create_organization.rb +40 -4
  43. data/lib/tremendous/models/create_organization200_response.rb +10 -4
  44. data/lib/tremendous/models/create_organization200_response_organization.rb +30 -4
  45. data/lib/tremendous/models/create_organization_for_response.rb +30 -4
  46. data/lib/tremendous/models/create_organization_properties.rb +10 -4
  47. data/lib/tremendous/models/create_organization_request.rb +40 -4
  48. data/lib/tremendous/models/create_organization_request_copy_settings.rb +26 -8
  49. data/lib/tremendous/models/create_report200_response.rb +247 -0
  50. data/lib/tremendous/models/create_report200_response_report.rb +297 -0
  51. data/lib/tremendous/models/create_report_request.rb +10 -4
  52. data/lib/tremendous/models/create_report_request_filters.rb +10 -4
  53. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +10 -4
  54. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +10 -4
  55. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +10 -4
  56. data/lib/tremendous/models/create_webhook200_response.rb +10 -4
  57. data/lib/tremendous/models/create_webhook_request.rb +20 -4
  58. data/lib/tremendous/models/currency_codes.rb +1 -1
  59. data/lib/tremendous/models/custom_field.rb +10 -4
  60. data/lib/tremendous/models/delete_fraud_rule200_response.rb +20 -4
  61. data/lib/tremendous/models/delivery_details.rb +11 -5
  62. data/lib/tremendous/models/delivery_details_with_link.rb +11 -5
  63. data/lib/tremendous/models/delivery_metadata.rb +10 -4
  64. data/lib/tremendous/models/delivery_method.rb +1 -1
  65. data/lib/tremendous/models/delivery_status.rb +1 -1
  66. data/lib/tremendous/models/error_model.rb +20 -4
  67. data/lib/tremendous/models/field.rb +10 -4
  68. data/lib/tremendous/models/fraud_config_allow_email.rb +20 -4
  69. data/lib/tremendous/models/fraud_config_country.rb +20 -4
  70. data/lib/tremendous/models/fraud_config_country_update_list.rb +20 -4
  71. data/lib/tremendous/models/fraud_config_ip.rb +20 -4
  72. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +10 -4
  73. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +10 -4
  74. data/lib/tremendous/models/fraud_config_review_email.rb +10 -4
  75. data/lib/tremendous/models/fraud_generic_response.rb +20 -4
  76. data/lib/tremendous/models/fraud_review.rb +10 -4
  77. data/lib/tremendous/models/fraud_review_geo.rb +10 -4
  78. data/lib/tremendous/models/fraud_review_list_item.rb +10 -4
  79. data/lib/tremendous/models/fraud_review_reason.rb +1 -1
  80. data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
  81. data/lib/tremendous/models/fraud_review_related_rewards.rb +10 -4
  82. data/lib/tremendous/models/fraud_review_risk.rb +1 -1
  83. data/lib/tremendous/models/fraud_review_status.rb +1 -1
  84. data/lib/tremendous/models/fraud_rule200_response.rb +20 -4
  85. data/lib/tremendous/models/fraud_rule400_response.rb +20 -4
  86. data/lib/tremendous/models/fraud_rule422_response.rb +20 -4
  87. data/lib/tremendous/models/fraud_rule_request.rb +10 -4
  88. data/lib/tremendous/models/fraud_rule_request_config.rb +1 -1
  89. data/lib/tremendous/models/fraud_rule_type.rb +1 -1
  90. data/lib/tremendous/models/fraud_rules_list_item.rb +10 -4
  91. data/lib/tremendous/models/funding_source.rb +55 -5
  92. data/lib/tremendous/models/generate_reward_link200_response.rb +20 -4
  93. data/lib/tremendous/models/generate_reward_link200_response_reward.rb +10 -4
  94. data/lib/tremendous/models/generate_reward_link403_response.rb +20 -4
  95. data/lib/tremendous/models/get_fraud_review200_response.rb +20 -4
  96. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +10 -4
  97. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +10 -4
  98. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +10 -4
  99. data/lib/tremendous/models/get_funding_source200_response.rb +20 -4
  100. data/lib/tremendous/models/get_member200_response.rb +20 -4
  101. data/lib/tremendous/models/get_member200_response_member.rb +20 -4
  102. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +10 -4
  103. data/lib/tremendous/models/get_order200_response.rb +20 -4
  104. data/lib/tremendous/models/get_organization200_response.rb +10 -4
  105. data/lib/tremendous/models/get_product_response.rb +20 -4
  106. data/lib/tremendous/models/get_reward200_response.rb +20 -4
  107. data/lib/tremendous/models/inline_object.rb +231 -0
  108. data/lib/tremendous/models/inline_object1.rb +237 -0
  109. data/lib/tremendous/models/inline_object1_reward.rb +263 -0
  110. data/lib/tremendous/models/invoice.rb +40 -4
  111. data/lib/tremendous/models/list_balance_transactions200_response.rb +20 -4
  112. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +60 -4
  113. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +10 -4
  114. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +10 -4
  115. data/lib/tremendous/models/list_campaigns200_response.rb +20 -4
  116. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +30 -4
  117. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +10 -4
  118. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +10 -4
  119. data/lib/tremendous/models/list_connected_organization_members200_response.rb +266 -0
  120. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +346 -0
  121. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +382 -0
  122. data/lib/tremendous/models/list_connected_organizations200_response.rb +266 -0
  123. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +313 -0
  124. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +350 -0
  125. data/lib/tremendous/models/list_fields200_response.rb +10 -4
  126. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +10 -4
  127. data/lib/tremendous/models/list_forex_response.rb +20 -4
  128. data/lib/tremendous/models/list_fraud_reviews200_response.rb +30 -4
  129. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +10 -4
  130. data/lib/tremendous/models/list_fraud_rules200_response.rb +20 -4
  131. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +10 -4
  132. data/lib/tremendous/models/list_funding_sources200_response.rb +20 -4
  133. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +55 -5
  134. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +144 -6
  135. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +10 -4
  136. data/lib/tremendous/models/list_invoices200_response.rb +30 -4
  137. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +40 -4
  138. data/lib/tremendous/models/list_members200_response.rb +20 -4
  139. data/lib/tremendous/models/list_members200_response_members_inner.rb +20 -4
  140. data/lib/tremendous/models/list_orders200_response.rb +30 -4
  141. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +22 -6
  142. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +10 -4
  143. data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +10 -4
  144. data/lib/tremendous/models/list_organizations200_response.rb +10 -4
  145. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +30 -4
  146. data/lib/tremendous/models/list_products_response.rb +20 -4
  147. data/lib/tremendous/models/list_products_response_products_inner.rb +67 -11
  148. data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +20 -4
  149. data/lib/tremendous/models/list_products_response_products_inner_documents.rb +242 -0
  150. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +35 -8
  151. data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +10 -4
  152. data/lib/tremendous/models/list_rewards200_response.rb +10 -4
  153. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +10 -4
  154. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +10 -4
  155. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +11 -5
  156. data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +10 -4
  157. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +20 -4
  158. data/lib/tremendous/models/list_rewards401_response.rb +20 -4
  159. data/lib/tremendous/models/list_rewards401_response_errors.rb +10 -4
  160. data/lib/tremendous/models/list_rewards429_response.rb +20 -4
  161. data/lib/tremendous/models/list_roles200_response.rb +20 -4
  162. data/lib/tremendous/models/list_roles200_response_roles_inner.rb +30 -4
  163. data/lib/tremendous/models/list_webhook_events200_response.rb +10 -4
  164. data/lib/tremendous/models/list_webhooks200_response.rb +10 -4
  165. data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +10 -4
  166. data/lib/tremendous/models/member.rb +20 -4
  167. data/lib/tremendous/models/member_base.rb +20 -4
  168. data/lib/tremendous/models/member_with_events.rb +20 -4
  169. data/lib/tremendous/models/member_without_events.rb +20 -4
  170. data/lib/tremendous/models/order.rb +22 -6
  171. data/lib/tremendous/models/order_base.rb +22 -6
  172. data/lib/tremendous/models/order_base_payment.rb +10 -4
  173. data/lib/tremendous/models/order_status.rb +1 -1
  174. data/lib/tremendous/models/order_with_link.rb +22 -6
  175. data/lib/tremendous/models/order_with_link_rewards_inner.rb +10 -4
  176. data/lib/tremendous/models/order_without_link.rb +22 -6
  177. data/lib/tremendous/models/order_without_link_rewards_inner.rb +10 -4
  178. data/lib/tremendous/models/organization.rb +30 -4
  179. data/lib/tremendous/models/payment_details.rb +10 -4
  180. data/lib/tremendous/models/payment_details_refund.rb +10 -4
  181. data/lib/tremendous/models/payout.rb +10 -4
  182. data/lib/tremendous/models/product.rb +67 -11
  183. data/lib/tremendous/models/product_documents.rb +242 -0
  184. data/lib/tremendous/models/recipient.rb +10 -4
  185. data/lib/tremendous/models/refund_details.rb +10 -4
  186. data/lib/tremendous/models/report.rb +10 -4
  187. data/lib/tremendous/models/resend_reward422_response.rb +20 -4
  188. data/lib/tremendous/models/resend_reward_request.rb +10 -4
  189. data/lib/tremendous/models/review_country.rb +20 -4
  190. data/lib/tremendous/models/review_country1.rb +20 -4
  191. data/lib/tremendous/models/review_email.rb +10 -4
  192. data/lib/tremendous/models/review_email1.rb +10 -4
  193. data/lib/tremendous/models/review_ip.rb +20 -4
  194. data/lib/tremendous/models/review_ip1.rb +20 -4
  195. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +10 -4
  196. data/lib/tremendous/models/review_redeemed_rewards_count.rb +10 -4
  197. data/lib/tremendous/models/reward.rb +10 -4
  198. data/lib/tremendous/models/reward_base.rb +10 -4
  199. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +10 -4
  200. data/lib/tremendous/models/reward_for_order_create.rb +10 -4
  201. data/lib/tremendous/models/reward_link.rb +10 -4
  202. data/lib/tremendous/models/reward_token.rb +10 -4
  203. data/lib/tremendous/models/reward_value.rb +20 -4
  204. data/lib/tremendous/models/reward_with_link.rb +10 -4
  205. data/lib/tremendous/models/reward_with_link_delivery.rb +11 -5
  206. data/lib/tremendous/models/reward_without_link.rb +10 -4
  207. data/lib/tremendous/models/reward_without_link_delivery.rb +11 -5
  208. data/lib/tremendous/models/role.rb +30 -4
  209. data/lib/tremendous/models/simulate_webhook_request.rb +20 -4
  210. data/lib/tremendous/models/single_reward_order.rb +20 -4
  211. data/lib/tremendous/models/single_reward_order_payment.rb +20 -4
  212. data/lib/tremendous/models/single_reward_order_reward.rb +10 -4
  213. data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +10 -4
  214. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +10 -4
  215. data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +10 -4
  216. data/lib/tremendous/models/single_reward_order_with_link.rb +20 -4
  217. data/lib/tremendous/models/single_reward_order_with_link_order.rb +22 -6
  218. data/lib/tremendous/models/single_reward_order_without_link.rb +20 -4
  219. data/lib/tremendous/models/single_reward_order_without_link_order.rb +22 -6
  220. data/lib/tremendous/models/update_campaign.rb +10 -4
  221. data/lib/tremendous/models/update_campaign_request.rb +10 -4
  222. data/lib/tremendous/models/update_fraud_rule_list200_response.rb +20 -4
  223. data/lib/tremendous/models/update_fraud_rule_list_request.rb +20 -4
  224. data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +1 -1
  225. data/lib/tremendous/models/webhook.rb +10 -4
  226. data/lib/tremendous/models/webhook_post.rb +20 -4
  227. data/lib/tremendous/version.rb +1 -1
  228. data/lib/tremendous.rb +27 -6
  229. metadata +29 -7
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -24,7 +24,7 @@ module Tremendous
24
24
  # Detailed description of the product. Mostly used for products with a `category` of `charities`.
25
25
  attr_accessor :description
26
26
 
27
- # The category of this product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> </tbody> </table>
27
+ # The category of this product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> </tbody> </table>
28
28
  attr_accessor :category
29
29
 
30
30
  # Legal disclosures for this product. Can be in HTML format.
@@ -42,6 +42,11 @@ module Tremendous
42
42
  # List of product images associated with this product (e.g. logos or images of the gift cards)
43
43
  attr_accessor :images
44
44
 
45
+ # Instructions for how to use the product, if applicable. Mostly used for products with a `category` of `merchant_card`.
46
+ attr_accessor :usage_instructions
47
+
48
+ attr_accessor :documents
49
+
45
50
  class EnumAttributeValidator
46
51
  attr_reader :datatype
47
52
  attr_reader :allowable_values
@@ -75,13 +80,20 @@ module Tremendous
75
80
  :'skus' => :'skus',
76
81
  :'currency_codes' => :'currency_codes',
77
82
  :'countries' => :'countries',
78
- :'images' => :'images'
83
+ :'images' => :'images',
84
+ :'usage_instructions' => :'usage_instructions',
85
+ :'documents' => :'documents'
79
86
  }
80
87
  end
81
88
 
89
+ # Returns attribute mapping this model knows about
90
+ def self.acceptable_attribute_map
91
+ attribute_map
92
+ end
93
+
82
94
  # Returns all the JSON keys this model knows about
83
95
  def self.acceptable_attributes
84
- attribute_map.values
96
+ acceptable_attribute_map.values
85
97
  end
86
98
 
87
99
  # Attribute type mapping.
@@ -95,13 +107,16 @@ module Tremendous
95
107
  :'skus' => :'Array<ListProductsResponseProductsInnerSkusInner>',
96
108
  :'currency_codes' => :'Array<String>',
97
109
  :'countries' => :'Array<ListProductsResponseProductsInnerCountriesInner>',
98
- :'images' => :'Array<ListProductsResponseProductsInnerImagesInner>'
110
+ :'images' => :'Array<ListProductsResponseProductsInnerImagesInner>',
111
+ :'usage_instructions' => :'String',
112
+ :'documents' => :'ListProductsResponseProductsInnerDocuments'
99
113
  }
100
114
  end
101
115
 
102
116
  # List of attributes with nullable: true
103
117
  def self.openapi_nullable
104
118
  Set.new([
119
+ :'documents'
105
120
  ])
106
121
  end
107
122
 
@@ -113,9 +128,10 @@ module Tremendous
113
128
  end
114
129
 
115
130
  # check to see if the attribute exists and convert string to symbol for hash key
131
+ acceptable_attribute_map = self.class.acceptable_attribute_map
116
132
  attributes = attributes.each_with_object({}) { |(k, v), h|
117
- if (!self.class.attribute_map.key?(k.to_sym))
118
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Product`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
133
+ if (!acceptable_attribute_map.key?(k.to_sym))
134
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Product`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
119
135
  end
120
136
  h[k.to_sym] = v
121
137
  }
@@ -179,6 +195,14 @@ module Tremendous
179
195
  else
180
196
  self.images = nil
181
197
  end
198
+
199
+ if attributes.key?(:'usage_instructions')
200
+ self.usage_instructions = attributes[:'usage_instructions']
201
+ end
202
+
203
+ if attributes.key?(:'documents')
204
+ self.documents = attributes[:'documents']
205
+ end
182
206
  end
183
207
 
184
208
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -247,7 +271,7 @@ module Tremendous
247
271
  return false if @name.nil?
248
272
  return false if @description.nil?
249
273
  return false if @category.nil?
250
- category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "merchant_card", "paypal", "venmo", "visa_card"])
274
+ category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card"])
251
275
  return false unless category_validator.valid?(@category)
252
276
  return false if @disclosure.nil?
253
277
  return false if @currency_codes.nil?
@@ -274,16 +298,46 @@ module Tremendous
274
298
  @id = id
275
299
  end
276
300
 
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] name Value to be assigned
303
+ def name=(name)
304
+ if name.nil?
305
+ fail ArgumentError, 'name cannot be nil'
306
+ end
307
+
308
+ @name = name
309
+ end
310
+
311
+ # Custom attribute writer method with validation
312
+ # @param [Object] description Value to be assigned
313
+ def description=(description)
314
+ if description.nil?
315
+ fail ArgumentError, 'description cannot be nil'
316
+ end
317
+
318
+ @description = description
319
+ end
320
+
277
321
  # Custom attribute writer method checking allowed values (enum).
278
322
  # @param [Object] category Object to be assigned
279
323
  def category=(category)
280
- validator = EnumAttributeValidator.new('String', ["ach", "charity", "merchant_card", "paypal", "venmo", "visa_card"])
324
+ validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card"])
281
325
  unless validator.valid?(category)
282
326
  fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
283
327
  end
284
328
  @category = category
285
329
  end
286
330
 
331
+ # Custom attribute writer method with validation
332
+ # @param [Object] disclosure Value to be assigned
333
+ def disclosure=(disclosure)
334
+ if disclosure.nil?
335
+ fail ArgumentError, 'disclosure cannot be nil'
336
+ end
337
+
338
+ @disclosure = disclosure
339
+ end
340
+
287
341
  # Custom attribute writer method with validation
288
342
  # @param [Object] countries Value to be assigned
289
343
  def countries=(countries)
@@ -325,7 +379,9 @@ module Tremendous
325
379
  skus == o.skus &&
326
380
  currency_codes == o.currency_codes &&
327
381
  countries == o.countries &&
328
- images == o.images
382
+ images == o.images &&
383
+ usage_instructions == o.usage_instructions &&
384
+ documents == o.documents
329
385
  end
330
386
 
331
387
  # @see the `==` method
@@ -337,7 +393,7 @@ module Tremendous
337
393
  # Calculates hash code according to all attributes.
338
394
  # @return [Integer] Hash code
339
395
  def hash
340
- [id, name, description, category, disclosure, skus, currency_codes, countries, images].hash
396
+ [id, name, description, category, disclosure, skus, currency_codes, countries, images, usage_instructions, documents].hash
341
397
  end
342
398
 
343
399
  # Builds the object from hash
@@ -0,0 +1,242 @@
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.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Tremendous
17
+ # URLs and files related to product documentation.
18
+ class ProductDocuments
19
+ # URL to the cardholder agreement PDF file.
20
+ attr_accessor :cardholder_agreement_pdf
21
+
22
+ # URL to the cardholder agreement web page.
23
+ attr_accessor :cardholder_agreement_url
24
+
25
+ # URL to the privacy policy web page.
26
+ attr_accessor :privacy_policy_url
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'cardholder_agreement_pdf' => :'cardholder_agreement_pdf',
32
+ :'cardholder_agreement_url' => :'cardholder_agreement_url',
33
+ :'privacy_policy_url' => :'privacy_policy_url'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'cardholder_agreement_pdf' => :'String',
51
+ :'cardholder_agreement_url' => :'String',
52
+ :'privacy_policy_url' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ProductDocuments` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ProductDocuments`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'cardholder_agreement_pdf')
79
+ self.cardholder_agreement_pdf = attributes[:'cardholder_agreement_pdf']
80
+ end
81
+
82
+ if attributes.key?(:'cardholder_agreement_url')
83
+ self.cardholder_agreement_url = attributes[:'cardholder_agreement_url']
84
+ end
85
+
86
+ if attributes.key?(:'privacy_policy_url')
87
+ self.privacy_policy_url = attributes[:'privacy_policy_url']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ cardholder_agreement_pdf == o.cardholder_agreement_pdf &&
112
+ cardholder_agreement_url == o.cardholder_agreement_url &&
113
+ privacy_policy_url == o.privacy_policy_url
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [cardholder_agreement_pdf, cardholder_agreement_url, privacy_policy_url].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def self._deserialize(type, value)
156
+ case type.to_sym
157
+ when :Time
158
+ Time.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ # models (e.g. Pet) or oneOf
189
+ klass = Tremendous.const_get(type)
190
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+
242
+ 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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -34,9 +34,14 @@ module Tremendous
34
34
  }
35
35
  end
36
36
 
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
37
42
  # Returns all the JSON keys this model knows about
38
43
  def self.acceptable_attributes
39
- attribute_map.values
44
+ acceptable_attribute_map.values
40
45
  end
41
46
 
42
47
  # Attribute type mapping.
@@ -62,9 +67,10 @@ module Tremendous
62
67
  end
63
68
 
64
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
71
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Recipient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Recipient`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
74
  end
69
75
  h[k.to_sym] = v
70
76
  }
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -25,9 +25,14 @@ module Tremendous
25
25
  }
26
26
  end
27
27
 
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
28
33
  # Returns all the JSON keys this model knows about
29
34
  def self.acceptable_attributes
30
- attribute_map.values
35
+ acceptable_attribute_map.values
31
36
  end
32
37
 
33
38
  # Attribute type mapping.
@@ -51,9 +56,10 @@ module Tremendous
51
56
  end
52
57
 
53
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
54
60
  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 `Tremendous::RefundDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::RefundDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
57
63
  end
58
64
  h[k.to_sym] = v
59
65
  }
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -64,9 +64,14 @@ module Tremendous
64
64
  }
65
65
  end
66
66
 
67
+ # Returns attribute mapping this model knows about
68
+ def self.acceptable_attribute_map
69
+ attribute_map
70
+ end
71
+
67
72
  # Returns all the JSON keys this model knows about
68
73
  def self.acceptable_attributes
69
- attribute_map.values
74
+ acceptable_attribute_map.values
70
75
  end
71
76
 
72
77
  # Attribute type mapping.
@@ -95,9 +100,10 @@ module Tremendous
95
100
  end
96
101
 
97
102
  # check to see if the attribute exists and convert string to symbol for hash key
103
+ acceptable_attribute_map = self.class.acceptable_attribute_map
98
104
  attributes = attributes.each_with_object({}) { |(k, v), h|
99
- if (!self.class.attribute_map.key?(k.to_sym))
100
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Report`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ if (!acceptable_attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Report`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
107
  end
102
108
  h[k.to_sym] = v
103
109
  }
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -28,9 +28,14 @@ module Tremendous
28
28
  }
29
29
  end
30
30
 
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
31
36
  # Returns all the JSON keys this model knows about
32
37
  def self.acceptable_attributes
33
- attribute_map.values
38
+ acceptable_attribute_map.values
34
39
  end
35
40
 
36
41
  # Attribute type mapping.
@@ -55,9 +60,10 @@ module Tremendous
55
60
  end
56
61
 
57
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
58
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ResendReward422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ResendReward422Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
67
  end
62
68
  h[k.to_sym] = v
63
69
  }
@@ -93,6 +99,16 @@ module Tremendous
93
99
  true
94
100
  end
95
101
 
102
+ # Custom attribute writer method with validation
103
+ # @param [Object] errors Value to be assigned
104
+ def errors=(errors)
105
+ if errors.nil?
106
+ fail ArgumentError, 'errors cannot be nil'
107
+ end
108
+
109
+ @errors = errors
110
+ end
111
+
96
112
  # Checks equality by comparing each attribute.
97
113
  # @param [Object] Object to be compared
98
114
  def ==(o)
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -29,9 +29,14 @@ module Tremendous
29
29
  }
30
30
  end
31
31
 
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
32
37
  # Returns all the JSON keys this model knows about
33
38
  def self.acceptable_attributes
34
- attribute_map.values
39
+ acceptable_attribute_map.values
35
40
  end
36
41
 
37
42
  # Attribute type mapping.
@@ -56,9 +61,10 @@ module Tremendous
56
61
  end
57
62
 
58
63
  # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ResendRewardRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ResendRewardRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
68
  end
63
69
  h[k.to_sym] = v
64
70
  }
@@ -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.8.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -52,9 +52,14 @@ module Tremendous
52
52
  }
53
53
  end
54
54
 
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
55
60
  # Returns all the JSON keys this model knows about
56
61
  def self.acceptable_attributes
57
- attribute_map.values
62
+ acceptable_attribute_map.values
58
63
  end
59
64
 
60
65
  # Attribute type mapping.
@@ -79,9 +84,10 @@ module Tremendous
79
84
  end
80
85
 
81
86
  # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
82
88
  attributes = attributes.each_with_object({}) { |(k, v), h|
83
- if (!self.class.attribute_map.key?(k.to_sym))
84
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ReviewCountry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ReviewCountry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
85
91
  end
86
92
  h[k.to_sym] = v
87
93
  }
@@ -138,6 +144,16 @@ module Tremendous
138
144
  @type = type
139
145
  end
140
146
 
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] countries Value to be assigned
149
+ def countries=(countries)
150
+ if countries.nil?
151
+ fail ArgumentError, 'countries cannot be nil'
152
+ end
153
+
154
+ @countries = countries
155
+ end
156
+
141
157
  # Checks equality by comparing each attribute.
142
158
  # @param [Object] Object to be compared
143
159
  def ==(o)