tremendous_ruby 5.25.0 → 5.28.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 (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +163 -9
  3. data/lib/tremendous/api_client.rb +3 -2
  4. data/lib/tremendous/configuration.rb +10 -0
  5. data/lib/tremendous/models/campaign.rb +3 -5
  6. data/lib/tremendous/models/campaign_base.rb +3 -5
  7. data/lib/tremendous/models/connected_organization_member_member.rb +6 -4
  8. data/lib/tremendous/models/connected_organization_member_session.rb +27 -1
  9. data/lib/tremendous/models/connected_organization_organization.rb +3 -5
  10. data/lib/tremendous/models/{generate_reward_token200_response_reward.rb → create_api_key_request.rb} +51 -53
  11. data/lib/tremendous/models/create_campaign_request.rb +3 -5
  12. data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +27 -1
  13. data/lib/tremendous/models/create_connected_organization_member_session_request.rb +33 -4
  14. data/lib/tremendous/models/create_connected_organization_request.rb +13 -4
  15. data/lib/tremendous/models/{create_report201_response_report.rb → create_connected_organization_request_kyb_prefill.rb} +102 -81
  16. data/lib/tremendous/models/create_field.rb +6 -4
  17. data/lib/tremendous/models/create_field_request.rb +6 -4
  18. data/lib/tremendous/models/create_invoice_request.rb +6 -10
  19. data/lib/tremendous/models/create_order200_response_order.rb +9 -9
  20. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +12 -8
  21. data/lib/tremendous/models/create_report200_response_report.rb +3 -5
  22. data/lib/tremendous/models/create_report_request.rb +12 -8
  23. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +6 -10
  24. data/lib/tremendous/models/delivery_details.rb +6 -10
  25. data/lib/tremendous/models/delivery_details_with_link.rb +12 -8
  26. data/lib/tremendous/models/field.rb +3 -5
  27. data/lib/tremendous/models/fraud_config_country.rb +6 -4
  28. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +6 -4
  29. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +6 -4
  30. data/lib/tremendous/models/{create_campaign201_response.rb → fraud_config_review_vpn.rb} +21 -19
  31. data/lib/tremendous/models/fraud_review.rb +10 -16
  32. data/lib/tremendous/models/fraud_review_base.rb +7 -11
  33. data/lib/tremendous/models/fraud_review_list_item.rb +7 -11
  34. data/lib/tremendous/models/fraud_review_reason.rb +2 -1
  35. data/lib/tremendous/models/fraud_rule_request_config.rb +2 -1
  36. data/lib/tremendous/models/fraud_rules_list_item.rb +4 -6
  37. data/lib/tremendous/models/funding_source.rb +12 -14
  38. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +10 -16
  39. data/lib/tremendous/models/get_member200_response_member.rb +6 -4
  40. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +3 -5
  41. data/lib/tremendous/models/invoice.rb +12 -14
  42. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +3 -5
  43. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +6 -4
  44. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +3 -5
  45. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +3 -5
  46. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +7 -11
  47. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +4 -6
  48. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +12 -14
  49. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +6 -10
  50. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +12 -14
  51. data/lib/tremendous/models/list_members200_response_members_inner.rb +6 -4
  52. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +9 -9
  53. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +3 -5
  54. data/lib/tremendous/models/list_products_response_products_inner.rb +11 -11
  55. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +6 -4
  56. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +6 -10
  57. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +3 -5
  58. data/lib/tremendous/models/member.rb +6 -4
  59. data/lib/tremendous/models/member_base.rb +6 -4
  60. data/lib/tremendous/models/member_with_events.rb +6 -4
  61. data/lib/tremendous/models/member_without_events.rb +6 -4
  62. data/lib/tremendous/models/order.rb +9 -9
  63. data/lib/tremendous/models/order_base.rb +9 -9
  64. data/lib/tremendous/models/order_with_link.rb +9 -9
  65. data/lib/tremendous/models/order_without_link.rb +9 -9
  66. data/lib/tremendous/models/organization.rb +3 -5
  67. data/lib/tremendous/models/payout.rb +3 -5
  68. data/lib/tremendous/models/product.rb +11 -11
  69. data/lib/tremendous/models/report.rb +3 -5
  70. data/lib/tremendous/models/review_country.rb +6 -4
  71. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +6 -4
  72. data/lib/tremendous/models/review_redeemed_rewards_count.rb +6 -4
  73. data/lib/tremendous/models/{generate_reward_token200_response.rb → review_vpn.rb} +22 -19
  74. data/lib/tremendous/models/reward_value.rb +3 -5
  75. data/lib/tremendous/models/reward_with_link_delivery.rb +12 -8
  76. data/lib/tremendous/models/reward_without_link_delivery.rb +6 -10
  77. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +3 -5
  78. data/lib/tremendous/models/single_reward_order_with_link_order.rb +9 -9
  79. data/lib/tremendous/models/single_reward_order_without_link_order.rb +9 -9
  80. data/lib/tremendous/models/update_campaign.rb +3 -5
  81. data/lib/tremendous/models/update_campaign_request.rb +3 -5
  82. data/lib/tremendous/models/update_fraud_rule_list_request.rb +6 -4
  83. data/lib/tremendous/models/{get_fraud_review200_response_fraud_review_geo.rb → update_member.rb} +28 -32
  84. data/lib/tremendous/models/{create_report201_response.rb → update_member_request.rb} +34 -27
  85. data/lib/tremendous/version.rb +1 -1
  86. data/lib/tremendous.rb +6 -0
  87. metadata +21 -8
  88. data/lib/tremendous/models/create_order201_response.rb +0 -221
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Tremendous
17
17
  # An active fraud rule
18
18
  class ListFraudRules200ResponseFraudRulesInner
19
- # * `review_country` - Flags when the recipient's IP country matches the criteria in the rule * `review_ip` - Flags when recipient's IP matches one in the list * `review_email` - Flags when the recipient's email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config. The amount is denominated in the organization's currency. * `review_multiple_emails` - Flags when recipient's device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient's IP matches one in the list * `allow_email` - Releases a reward when the recipient's email matches one in the list
19
+ # * `review_country` - Flags when the recipient's IP country matches the criteria in the rule * `review_ip` - Flags when recipient's IP matches one in the list * `review_email` - Flags when the recipient's email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config. The amount is denominated in the organization's currency. * `review_multiple_emails` - Flags when recipient's device or account has multiple emails associated * `review_vpn` - Flags when VPN or proxy use is suspected. Can be configured to exclude Apple Private Relay. * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient's IP matches one in the list * `allow_email` - Releases a reward when the recipient's email matches one in the list
20
20
  attr_accessor :rule_type
21
21
 
22
22
  # The configuration associated with the rule. The properties allowed depend on the type of rule. This property is only present for rules that require configuration.
@@ -121,13 +121,11 @@ module Tremendous
121
121
  true
122
122
  end
123
123
 
124
- # Custom attribute writer method checking allowed values (enum).
124
+ # Custom attribute writer method for enum attributes. Any value is accepted
125
+ # so that enum values added to the API don't break deserialization on
126
+ # older versions of this gem.
125
127
  # @param [Object] rule_type Object to be assigned
126
128
  def rule_type=(rule_type)
127
- validator = EnumAttributeValidator.new('String', ["review_country", "review_ip", "review_email", "review_redeemed_rewards_count", "review_redeemed_rewards_amount", "review_multiple_emails", "review_vpn", "review_tremendous_flag_list", "review_previously_blocked_recipients", "allow_ip", "allow_email"])
128
- unless validator.valid?(rule_type)
129
- fail ArgumentError, "invalid value for \"rule_type\", must be one of #{validator.allowable_values}."
130
- end
131
129
  @rule_type = rule_type
132
130
  end
133
131
 
@@ -200,33 +200,31 @@ module Tremendous
200
200
  @id = id
201
201
  end
202
202
 
203
- # Custom attribute writer method checking allowed values (enum).
203
+ # Custom attribute writer method for enum attributes. Any value is accepted
204
+ # so that enum values added to the API don't break deserialization on
205
+ # older versions of this gem.
204
206
  # @param [Object] method Object to be assigned
205
207
  def method=(method)
206
- validator = EnumAttributeValidator.new('String', ["balance", "bank_account", "credit_card", "invoice"])
207
- unless validator.valid?(method)
208
- fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
208
+ if method.nil?
209
+ fail ArgumentError, 'method cannot be nil'
209
210
  end
211
+
210
212
  @method = method
211
213
  end
212
214
 
213
- # Custom attribute writer method checking allowed values (enum).
215
+ # Custom attribute writer method for enum attributes. Any value is accepted
216
+ # so that enum values added to the API don't break deserialization on
217
+ # older versions of this gem.
214
218
  # @param [Object] status Object to be assigned
215
219
  def status=(status)
216
- validator = EnumAttributeValidator.new('String', ["active", "deleted", "failed"])
217
- unless validator.valid?(status)
218
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
219
- end
220
220
  @status = status
221
221
  end
222
222
 
223
- # Custom attribute writer method checking allowed values (enum).
223
+ # Custom attribute writer method for enum attributes. Any value is accepted
224
+ # so that enum values added to the API don't break deserialization on
225
+ # older versions of this gem.
224
226
  # @param [Object] type Object to be assigned
225
227
  def type=(type)
226
- validator = EnumAttributeValidator.new('String', ["COMMERCIAL", "PRO_FORMA", "PREFUNDING_ONLY"])
227
- unless validator.valid?(type)
228
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
229
- end
230
228
  @type = type
231
229
  end
232
230
 
@@ -418,13 +418,11 @@ module Tremendous
418
418
  true
419
419
  end
420
420
 
421
- # Custom attribute writer method checking allowed values (enum).
421
+ # Custom attribute writer method for enum attributes. Any value is accepted
422
+ # so that enum values added to the API don't break deserialization on
423
+ # older versions of this gem.
422
424
  # @param [Object] account_type Object to be assigned
423
425
  def account_type=(account_type)
424
- validator = EnumAttributeValidator.new('String', ["checking", "savings"])
425
- unless validator.valid?(account_type)
426
- fail ArgumentError, "invalid value for \"account_type\", must be one of #{validator.allowable_values}."
427
- end
428
426
  @account_type = account_type
429
427
  end
430
428
 
@@ -458,13 +456,11 @@ module Tremendous
458
456
  @account_routing_mask = account_routing_mask
459
457
  end
460
458
 
461
- # Custom attribute writer method checking allowed values (enum).
459
+ # Custom attribute writer method for enum attributes. Any value is accepted
460
+ # so that enum values added to the API don't break deserialization on
461
+ # older versions of this gem.
462
462
  # @param [Object] network Object to be assigned
463
463
  def network=(network)
464
- validator = EnumAttributeValidator.new('String', ["MasterCard", "Amex", "JCB", "Diner's Club", "Visa", "Discover", "Laser", "Elo", "Maestro", "Solo"])
465
- unless validator.valid?(network)
466
- fail ArgumentError, "invalid value for \"network\", must be one of #{validator.allowable_values}."
467
- end
468
464
  @network = network
469
465
  end
470
466
 
@@ -258,33 +258,31 @@ module Tremendous
258
258
  @amount = amount
259
259
  end
260
260
 
261
- # Custom attribute writer method checking allowed values (enum).
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.
262
264
  # @param [Object] currency_code Object to be assigned
263
265
  def currency_code=(currency_code)
264
- validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
265
- unless validator.valid?(currency_code)
266
- fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
267
- end
268
266
  @currency_code = currency_code
269
267
  end
270
268
 
271
- # Custom attribute writer method checking allowed values (enum).
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
272
  # @param [Object] currency Object to be assigned
273
273
  def currency=(currency)
274
- validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
275
- unless validator.valid?(currency)
276
- fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
277
- end
278
274
  @currency = currency
279
275
  end
280
276
 
281
- # Custom attribute writer method checking allowed values (enum).
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.
282
280
  # @param [Object] status Object to be assigned
283
281
  def status=(status)
284
- validator = EnumAttributeValidator.new('String', ["DELETED", "PAID", "OPEN", "MARKED_AS_PAID"])
285
- unless validator.valid?(status)
286
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
282
+ if status.nil?
283
+ fail ArgumentError, 'status cannot be nil'
287
284
  end
285
+
288
286
  @status = status
289
287
  end
290
288
 
@@ -228,13 +228,15 @@ module Tremendous
228
228
  @email = email
229
229
  end
230
230
 
231
- # Custom attribute writer method checking allowed values (enum).
231
+ # Custom attribute writer method for enum attributes. Any value is accepted
232
+ # so that enum values added to the API don't break deserialization on
233
+ # older versions of this gem.
232
234
  # @param [Object] status Object to be assigned
233
235
  def status=(status)
234
- validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
235
- unless validator.valid?(status)
236
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
236
+ if status.nil?
237
+ fail ArgumentError, 'status cannot be nil'
237
238
  end
239
+
238
240
  @status = status
239
241
  end
240
242
 
@@ -254,23 +254,23 @@ module Tremendous
254
254
  @created_at = created_at
255
255
  end
256
256
 
257
- # Custom attribute writer method checking allowed values (enum).
257
+ # Custom attribute writer method for enum attributes. Any value is accepted
258
+ # so that enum values added to the API don't break deserialization on
259
+ # older versions of this gem.
258
260
  # @param [Object] status Object to be assigned
259
261
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL", "PENDING SETTLEMENT"])
261
- unless validator.valid?(status)
262
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
262
+ if status.nil?
263
+ fail ArgumentError, 'status cannot be nil'
263
264
  end
265
+
264
266
  @status = status
265
267
  end
266
268
 
267
- # Custom attribute writer method checking allowed values (enum).
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.
268
272
  # @param [Object] channel Object to be assigned
269
273
  def channel=(channel)
270
- validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
271
- unless validator.valid?(channel)
272
- fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
273
- end
274
274
  @channel = channel
275
275
  end
276
276
 
@@ -208,13 +208,11 @@ module Tremendous
208
208
  @website = website
209
209
  end
210
210
 
211
- # Custom attribute writer method checking allowed values (enum).
211
+ # Custom attribute writer method for enum attributes. Any value is accepted
212
+ # so that enum values added to the API don't break deserialization on
213
+ # older versions of this gem.
212
214
  # @param [Object] status Object to be assigned
213
215
  def status=(status)
214
- validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED"])
215
- unless validator.valid?(status)
216
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
217
- end
218
216
  @status = status
219
217
  end
220
218
 
@@ -24,7 +24,7 @@ module Tremendous
24
24
  # Detailed description of the product.
25
25
  attr_accessor :description
26
26
 
27
- # The category of the 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> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> </tbody> </table>
27
+ # The category of the 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> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> <tr> <td><code>wallet</code></td> <td>Payout to a digital wallet (e.g. GCash, MoMo)</td> </tr> </tbody> </table>
28
28
  attr_accessor :category
29
29
 
30
30
  # Additional classification for the product. Only applicable to products with a `category` of `merchant_card`. Possible subcategories: * `beauty_and_health` * `digital_financial_services` * `electronics` * `entertainment` * `fashion` * `food_and_drink` * `general_merchandise` * `grocery_and_supermarkets` * `home_and_living` * `mobility_and_fuel` * `sports_and_outdoor_gear` * `travel_and_hospitality`
@@ -280,7 +280,7 @@ module Tremendous
280
280
  return false if @name.nil?
281
281
  return false if @description.nil?
282
282
  return false if @category.nil?
283
- category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank"])
283
+ category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank", "wallet"])
284
284
  return false unless category_validator.valid?(@category)
285
285
  subcategory_validator = EnumAttributeValidator.new('String', ["beauty_and_health", "digital_financial_services", "electronics", "entertainment", "fashion", "food_and_drink", "general_merchandise", "grocery_and_supermarkets", "home_and_living", "mobility_and_fuel", "sports_and_outdoor_gear", "travel_and_hospitality"])
286
286
  return false unless subcategory_validator.valid?(@subcategory)
@@ -329,23 +329,23 @@ module Tremendous
329
329
  @description = description
330
330
  end
331
331
 
332
- # Custom attribute writer method checking allowed values (enum).
332
+ # Custom attribute writer method for enum attributes. Any value is accepted
333
+ # so that enum values added to the API don't break deserialization on
334
+ # older versions of this gem.
333
335
  # @param [Object] category Object to be assigned
334
336
  def category=(category)
335
- validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank"])
336
- unless validator.valid?(category)
337
- fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
337
+ if category.nil?
338
+ fail ArgumentError, 'category cannot be nil'
338
339
  end
340
+
339
341
  @category = category
340
342
  end
341
343
 
342
- # Custom attribute writer method checking allowed values (enum).
344
+ # Custom attribute writer method for enum attributes. Any value is accepted
345
+ # so that enum values added to the API don't break deserialization on
346
+ # older versions of this gem.
343
347
  # @param [Object] subcategory Object to be assigned
344
348
  def subcategory=(subcategory)
345
- validator = EnumAttributeValidator.new('String', ["beauty_and_health", "digital_financial_services", "electronics", "entertainment", "fashion", "food_and_drink", "general_merchandise", "grocery_and_supermarkets", "home_and_living", "mobility_and_fuel", "sports_and_outdoor_gear", "travel_and_hospitality"])
346
- unless validator.valid?(subcategory)
347
- fail ArgumentError, "invalid value for \"subcategory\", must be one of #{validator.allowable_values}."
348
- end
349
349
  @subcategory = subcategory
350
350
  end
351
351
 
@@ -151,13 +151,15 @@ module Tremendous
151
151
  @src = src
152
152
  end
153
153
 
154
- # Custom attribute writer method checking allowed values (enum).
154
+ # Custom attribute writer method for enum attributes. Any value is accepted
155
+ # so that enum values added to the API don't break deserialization on
156
+ # older versions of this gem.
155
157
  # @param [Object] type Object to be assigned
156
158
  def type=(type)
157
- validator = EnumAttributeValidator.new('String', ["card", "logo"])
158
- unless validator.valid?(type)
159
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
159
+ if type.nil?
160
+ fail ArgumentError, 'type cannot be nil'
160
161
  end
162
+
161
163
  @type = type
162
164
  end
163
165
 
@@ -120,23 +120,19 @@ module Tremendous
120
120
  true
121
121
  end
122
122
 
123
- # Custom attribute writer method checking allowed values (enum).
123
+ # Custom attribute writer method for enum attributes. Any value is accepted
124
+ # so that enum values added to the API don't break deserialization on
125
+ # older versions of this gem.
124
126
  # @param [Object] method Object to be assigned
125
127
  def method=(method)
126
- validator = EnumAttributeValidator.new('String', ["EMAIL", "LINK", "PHONE"])
127
- unless validator.valid?(method)
128
- fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
129
- end
130
128
  @method = method
131
129
  end
132
130
 
133
- # Custom attribute writer method checking allowed values (enum).
131
+ # Custom attribute writer method for enum attributes. Any value is accepted
132
+ # so that enum values added to the API don't break deserialization on
133
+ # older versions of this gem.
134
134
  # @param [Object] status Object to be assigned
135
135
  def status=(status)
136
- validator = EnumAttributeValidator.new('String', ["SCHEDULED", "FAILED", "SUCCEEDED", "PENDING"])
137
- unless validator.valid?(status)
138
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
139
- end
140
136
  @status = status
141
137
  end
142
138
 
@@ -134,13 +134,11 @@ module Tremendous
134
134
  @denomination = denomination
135
135
  end
136
136
 
137
- # Custom attribute writer method checking allowed values (enum).
137
+ # Custom attribute writer method for enum attributes. Any value is accepted
138
+ # so that enum values added to the API don't break deserialization on
139
+ # older versions of this gem.
138
140
  # @param [Object] currency_code Object to be assigned
139
141
  def currency_code=(currency_code)
140
- validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "HRK", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KHR", "KRW", "KWD", "KZT", "LBP", "LKR", "MAD", "MDL", "MGA", "MKD", "MMK", "MOP", "MUR", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SDG", "SEK", "SGD", "SOS", "SYP", "THB", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "UYU", "UZS", "VEF", "VND", "XAF", "XOF", "YER", "ZAR"])
141
- unless validator.valid?(currency_code)
142
- fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
143
- end
144
142
  @currency_code = currency_code
145
143
  end
146
144
 
@@ -228,13 +228,15 @@ module Tremendous
228
228
  @email = email
229
229
  end
230
230
 
231
- # Custom attribute writer method checking allowed values (enum).
231
+ # Custom attribute writer method for enum attributes. Any value is accepted
232
+ # so that enum values added to the API don't break deserialization on
233
+ # older versions of this gem.
232
234
  # @param [Object] status Object to be assigned
233
235
  def status=(status)
234
- validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
235
- unless validator.valid?(status)
236
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
236
+ if status.nil?
237
+ fail ArgumentError, 'status cannot be nil'
237
238
  end
239
+
238
240
  @status = status
239
241
  end
240
242
 
@@ -209,13 +209,15 @@ module Tremendous
209
209
  @email = email
210
210
  end
211
211
 
212
- # Custom attribute writer method checking allowed values (enum).
212
+ # Custom attribute writer method for enum attributes. Any value is accepted
213
+ # so that enum values added to the API don't break deserialization on
214
+ # older versions of this gem.
213
215
  # @param [Object] status Object to be assigned
214
216
  def status=(status)
215
- validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
216
- unless validator.valid?(status)
217
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
217
+ if status.nil?
218
+ fail ArgumentError, 'status cannot be nil'
218
219
  end
220
+
219
221
  @status = status
220
222
  end
221
223
 
@@ -220,13 +220,15 @@ module Tremendous
220
220
  @email = email
221
221
  end
222
222
 
223
- # Custom attribute writer method checking allowed values (enum).
223
+ # Custom attribute writer method for enum attributes. Any value is accepted
224
+ # so that enum values added to the API don't break deserialization on
225
+ # older versions of this gem.
224
226
  # @param [Object] status Object to be assigned
225
227
  def status=(status)
226
- validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
227
- unless validator.valid?(status)
228
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
228
+ if status.nil?
229
+ fail ArgumentError, 'status cannot be nil'
229
230
  end
231
+
230
232
  @status = status
231
233
  end
232
234
 
@@ -228,13 +228,15 @@ module Tremendous
228
228
  @email = email
229
229
  end
230
230
 
231
- # Custom attribute writer method checking allowed values (enum).
231
+ # Custom attribute writer method for enum attributes. Any value is accepted
232
+ # so that enum values added to the API don't break deserialization on
233
+ # older versions of this gem.
232
234
  # @param [Object] status Object to be assigned
233
235
  def status=(status)
234
- validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
235
- unless validator.valid?(status)
236
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
236
+ if status.nil?
237
+ fail ArgumentError, 'status cannot be nil'
237
238
  end
239
+
238
240
  @status = status
239
241
  end
240
242
 
@@ -254,23 +254,23 @@ module Tremendous
254
254
  @created_at = created_at
255
255
  end
256
256
 
257
- # Custom attribute writer method checking allowed values (enum).
257
+ # Custom attribute writer method for enum attributes. Any value is accepted
258
+ # so that enum values added to the API don't break deserialization on
259
+ # older versions of this gem.
258
260
  # @param [Object] status Object to be assigned
259
261
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL", "PENDING SETTLEMENT"])
261
- unless validator.valid?(status)
262
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
262
+ if status.nil?
263
+ fail ArgumentError, 'status cannot be nil'
263
264
  end
265
+
264
266
  @status = status
265
267
  end
266
268
 
267
- # Custom attribute writer method checking allowed values (enum).
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.
268
272
  # @param [Object] channel Object to be assigned
269
273
  def channel=(channel)
270
- validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
271
- unless validator.valid?(channel)
272
- fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
273
- end
274
274
  @channel = channel
275
275
  end
276
276
 
@@ -244,23 +244,23 @@ module Tremendous
244
244
  @created_at = created_at
245
245
  end
246
246
 
247
- # Custom attribute writer method checking allowed values (enum).
247
+ # Custom attribute writer method for enum attributes. Any value is accepted
248
+ # so that enum values added to the API don't break deserialization on
249
+ # older versions of this gem.
248
250
  # @param [Object] status Object to be assigned
249
251
  def status=(status)
250
- validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL", "PENDING SETTLEMENT"])
251
- unless validator.valid?(status)
252
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
252
+ if status.nil?
253
+ fail ArgumentError, 'status cannot be nil'
253
254
  end
255
+
254
256
  @status = status
255
257
  end
256
258
 
257
- # Custom attribute writer method checking allowed values (enum).
259
+ # Custom attribute writer method for enum attributes. Any value is accepted
260
+ # so that enum values added to the API don't break deserialization on
261
+ # older versions of this gem.
258
262
  # @param [Object] channel Object to be assigned
259
263
  def channel=(channel)
260
- validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
261
- unless validator.valid?(channel)
262
- fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
263
- end
264
264
  @channel = channel
265
265
  end
266
266
 
@@ -254,23 +254,23 @@ module Tremendous
254
254
  @created_at = created_at
255
255
  end
256
256
 
257
- # Custom attribute writer method checking allowed values (enum).
257
+ # Custom attribute writer method for enum attributes. Any value is accepted
258
+ # so that enum values added to the API don't break deserialization on
259
+ # older versions of this gem.
258
260
  # @param [Object] status Object to be assigned
259
261
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL", "PENDING SETTLEMENT"])
261
- unless validator.valid?(status)
262
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
262
+ if status.nil?
263
+ fail ArgumentError, 'status cannot be nil'
263
264
  end
265
+
264
266
  @status = status
265
267
  end
266
268
 
267
- # Custom attribute writer method checking allowed values (enum).
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.
268
272
  # @param [Object] channel Object to be assigned
269
273
  def channel=(channel)
270
- validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
271
- unless validator.valid?(channel)
272
- fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
273
- end
274
274
  @channel = channel
275
275
  end
276
276
 
@@ -254,23 +254,23 @@ module Tremendous
254
254
  @created_at = created_at
255
255
  end
256
256
 
257
- # Custom attribute writer method checking allowed values (enum).
257
+ # Custom attribute writer method for enum attributes. Any value is accepted
258
+ # so that enum values added to the API don't break deserialization on
259
+ # older versions of this gem.
258
260
  # @param [Object] status Object to be assigned
259
261
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL", "PENDING SETTLEMENT"])
261
- unless validator.valid?(status)
262
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
262
+ if status.nil?
263
+ fail ArgumentError, 'status cannot be nil'
263
264
  end
265
+
264
266
  @status = status
265
267
  end
266
268
 
267
- # Custom attribute writer method checking allowed values (enum).
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.
268
272
  # @param [Object] channel Object to be assigned
269
273
  def channel=(channel)
270
- validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
271
- unless validator.valid?(channel)
272
- fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
273
- end
274
274
  @channel = channel
275
275
  end
276
276
 
@@ -208,13 +208,11 @@ module Tremendous
208
208
  @website = website
209
209
  end
210
210
 
211
- # Custom attribute writer method checking allowed values (enum).
211
+ # Custom attribute writer method for enum attributes. Any value is accepted
212
+ # so that enum values added to the API don't break deserialization on
213
+ # older versions of this gem.
212
214
  # @param [Object] status Object to be assigned
213
215
  def status=(status)
214
- validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED"])
215
- unless validator.valid?(status)
216
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
217
- end
218
216
  @status = status
219
217
  end
220
218
 
@@ -190,13 +190,11 @@ module Tremendous
190
190
  @id = id
191
191
  end
192
192
 
193
- # Custom attribute writer method checking allowed values (enum).
193
+ # Custom attribute writer method for enum attributes. Any value is accepted
194
+ # so that enum values added to the API don't break deserialization on
195
+ # older versions of this gem.
194
196
  # @param [Object] status Object to be assigned
195
197
  def status=(status)
196
- validator = EnumAttributeValidator.new('String', ["UNEXECUTED", "COMPLETED", "FAILED", "CANCELED", "ORGANIZATION_REVIEW", "ADMIN_HELD"])
197
- unless validator.valid?(status)
198
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
199
- end
200
198
  @status = status
201
199
  end
202
200