tremendous_ruby 5.15.0 → 5.17.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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +2 -2
  3. data/lib/tremendous/models/create_order200_response_order.rb +3 -3
  4. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +12 -1
  5. data/lib/tremendous/models/currency_codes.rb +1 -2
  6. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +3 -3
  7. data/lib/tremendous/models/list_products_response_products_inner.rb +1 -1
  8. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +12 -1
  9. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +2 -2
  10. data/lib/tremendous/models/order.rb +3 -3
  11. data/lib/tremendous/models/order_base.rb +3 -3
  12. data/lib/tremendous/models/order_status.rb +2 -2
  13. data/lib/tremendous/models/order_with_link.rb +3 -3
  14. data/lib/tremendous/models/order_with_link_rewards_inner.rb +12 -1
  15. data/lib/tremendous/models/order_without_link.rb +3 -3
  16. data/lib/tremendous/models/order_without_link_rewards_inner.rb +12 -1
  17. data/lib/tremendous/models/product.rb +1 -1
  18. data/lib/tremendous/models/reward.rb +12 -1
  19. data/lib/tremendous/models/reward_base.rb +12 -1
  20. data/lib/tremendous/models/reward_for_order_create.rb +12 -1
  21. data/lib/tremendous/models/reward_value.rb +2 -2
  22. data/lib/tremendous/models/reward_with_link.rb +12 -1
  23. data/lib/tremendous/models/reward_without_link.rb +12 -1
  24. data/lib/tremendous/models/single_reward_order_with_link_order.rb +3 -3
  25. data/lib/tremendous/models/single_reward_order_without_link_order.rb +3 -3
  26. data/lib/tremendous/version.rb +1 -1
  27. metadata +1 -1
@@ -28,7 +28,7 @@ module Tremendous
28
28
  # Date the order has been created
29
29
  attr_accessor :created_at
30
30
 
31
- # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> CART </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
31
+ # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> OPEN </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
32
32
  attr_accessor :status
33
33
 
34
34
  # Name of the channel in which the order was created
@@ -211,7 +211,7 @@ module Tremendous
211
211
  return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
212
212
  return false if @created_at.nil?
213
213
  return false if @status.nil?
214
- status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
214
+ status_validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
215
215
  return false unless status_validator.valid?(@status)
216
216
  channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
217
217
  return false unless channel_validator.valid?(@channel)
@@ -257,7 +257,7 @@ module Tremendous
257
257
  # Custom attribute writer method checking allowed values (enum).
258
258
  # @param [Object] status Object to be assigned
259
259
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
260
+ validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
261
261
  unless validator.valid?(status)
262
262
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
263
263
  end
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -48,6 +51,7 @@ module Tremendous
48
51
  :'id' => :'id',
49
52
  :'order_id' => :'order_id',
50
53
  :'created_at' => :'created_at',
54
+ :'expires_at' => :'expires_at',
51
55
  :'campaign_id' => :'campaign_id',
52
56
  :'products' => :'products',
53
57
  :'value' => :'value',
@@ -74,6 +78,7 @@ module Tremendous
74
78
  :'id' => :'String',
75
79
  :'order_id' => :'String',
76
80
  :'created_at' => :'Time',
81
+ :'expires_at' => :'Time',
77
82
  :'campaign_id' => :'String',
78
83
  :'products' => :'Array<String>',
79
84
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -87,6 +92,7 @@ module Tremendous
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'expires_at',
90
96
  :'campaign_id',
91
97
  ])
92
98
  end
@@ -119,6 +125,10 @@ module Tremendous
119
125
  self.created_at = attributes[:'created_at']
120
126
  end
121
127
 
128
+ if attributes.key?(:'expires_at')
129
+ self.expires_at = attributes[:'expires_at']
130
+ end
131
+
122
132
  if attributes.key?(:'campaign_id')
123
133
  self.campaign_id = attributes[:'campaign_id']
124
134
  end
@@ -253,6 +263,7 @@ module Tremendous
253
263
  id == o.id &&
254
264
  order_id == o.order_id &&
255
265
  created_at == o.created_at &&
266
+ expires_at == o.expires_at &&
256
267
  campaign_id == o.campaign_id &&
257
268
  products == o.products &&
258
269
  value == o.value &&
@@ -271,7 +282,7 @@ module Tremendous
271
282
  # Calculates hash code according to all attributes.
272
283
  # @return [Integer] Hash code
273
284
  def hash
274
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
285
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
275
286
  end
276
287
 
277
288
  # Builds the object from hash
@@ -28,7 +28,7 @@ module Tremendous
28
28
  # Date the order has been created
29
29
  attr_accessor :created_at
30
30
 
31
- # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> CART </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
31
+ # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> OPEN </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
32
32
  attr_accessor :status
33
33
 
34
34
  # Name of the channel in which the order was created
@@ -211,7 +211,7 @@ module Tremendous
211
211
  return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
212
212
  return false if @created_at.nil?
213
213
  return false if @status.nil?
214
- status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
214
+ status_validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
215
215
  return false unless status_validator.valid?(@status)
216
216
  channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
217
217
  return false unless channel_validator.valid?(@channel)
@@ -257,7 +257,7 @@ module Tremendous
257
257
  # Custom attribute writer method checking allowed values (enum).
258
258
  # @param [Object] status Object to be assigned
259
259
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
260
+ validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
261
261
  unless validator.valid?(status)
262
262
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
263
263
  end
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -48,6 +51,7 @@ module Tremendous
48
51
  :'id' => :'id',
49
52
  :'order_id' => :'order_id',
50
53
  :'created_at' => :'created_at',
54
+ :'expires_at' => :'expires_at',
51
55
  :'campaign_id' => :'campaign_id',
52
56
  :'products' => :'products',
53
57
  :'value' => :'value',
@@ -74,6 +78,7 @@ module Tremendous
74
78
  :'id' => :'String',
75
79
  :'order_id' => :'String',
76
80
  :'created_at' => :'Time',
81
+ :'expires_at' => :'Time',
77
82
  :'campaign_id' => :'String',
78
83
  :'products' => :'Array<String>',
79
84
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -87,6 +92,7 @@ module Tremendous
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'expires_at',
90
96
  :'campaign_id',
91
97
  ])
92
98
  end
@@ -119,6 +125,10 @@ module Tremendous
119
125
  self.created_at = attributes[:'created_at']
120
126
  end
121
127
 
128
+ if attributes.key?(:'expires_at')
129
+ self.expires_at = attributes[:'expires_at']
130
+ end
131
+
122
132
  if attributes.key?(:'campaign_id')
123
133
  self.campaign_id = attributes[:'campaign_id']
124
134
  end
@@ -253,6 +263,7 @@ module Tremendous
253
263
  id == o.id &&
254
264
  order_id == o.order_id &&
255
265
  created_at == o.created_at &&
266
+ expires_at == o.expires_at &&
256
267
  campaign_id == o.campaign_id &&
257
268
  products == o.products &&
258
269
  value == o.value &&
@@ -271,7 +282,7 @@ module Tremendous
271
282
  # Calculates hash code according to all attributes.
272
283
  # @return [Integer] Hash code
273
284
  def hash
274
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
285
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
275
286
  end
276
287
 
277
288
  # Builds the object from hash
@@ -21,7 +21,7 @@ module Tremendous
21
21
  # Name of the product
22
22
  attr_accessor :name
23
23
 
24
- # Detailed description of the product. Mostly used for products with a `category` of `charities`.
24
+ # Detailed description of the product.
25
25
  attr_accessor :description
26
26
 
27
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> </tbody> </table>
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -48,6 +51,7 @@ module Tremendous
48
51
  :'id' => :'id',
49
52
  :'order_id' => :'order_id',
50
53
  :'created_at' => :'created_at',
54
+ :'expires_at' => :'expires_at',
51
55
  :'campaign_id' => :'campaign_id',
52
56
  :'products' => :'products',
53
57
  :'value' => :'value',
@@ -74,6 +78,7 @@ module Tremendous
74
78
  :'id' => :'String',
75
79
  :'order_id' => :'String',
76
80
  :'created_at' => :'Time',
81
+ :'expires_at' => :'Time',
77
82
  :'campaign_id' => :'String',
78
83
  :'products' => :'Array<String>',
79
84
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -87,6 +92,7 @@ module Tremendous
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'expires_at',
90
96
  :'campaign_id',
91
97
  ])
92
98
  end
@@ -119,6 +125,10 @@ module Tremendous
119
125
  self.created_at = attributes[:'created_at']
120
126
  end
121
127
 
128
+ if attributes.key?(:'expires_at')
129
+ self.expires_at = attributes[:'expires_at']
130
+ end
131
+
122
132
  if attributes.key?(:'campaign_id')
123
133
  self.campaign_id = attributes[:'campaign_id']
124
134
  end
@@ -253,6 +263,7 @@ module Tremendous
253
263
  id == o.id &&
254
264
  order_id == o.order_id &&
255
265
  created_at == o.created_at &&
266
+ expires_at == o.expires_at &&
256
267
  campaign_id == o.campaign_id &&
257
268
  products == o.products &&
258
269
  value == o.value &&
@@ -271,7 +282,7 @@ module Tremendous
271
282
  # Calculates hash code according to all attributes.
272
283
  # @return [Integer] Hash code
273
284
  def hash
274
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
285
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
275
286
  end
276
287
 
277
288
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -46,6 +49,7 @@ module Tremendous
46
49
  :'id' => :'id',
47
50
  :'order_id' => :'order_id',
48
51
  :'created_at' => :'created_at',
52
+ :'expires_at' => :'expires_at',
49
53
  :'campaign_id' => :'campaign_id',
50
54
  :'products' => :'products',
51
55
  :'value' => :'value',
@@ -71,6 +75,7 @@ module Tremendous
71
75
  :'id' => :'String',
72
76
  :'order_id' => :'String',
73
77
  :'created_at' => :'Time',
78
+ :'expires_at' => :'Time',
74
79
  :'campaign_id' => :'String',
75
80
  :'products' => :'Array<String>',
76
81
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -83,6 +88,7 @@ module Tremendous
83
88
  # List of attributes with nullable: true
84
89
  def self.openapi_nullable
85
90
  Set.new([
91
+ :'expires_at',
86
92
  :'campaign_id',
87
93
  ])
88
94
  end
@@ -115,6 +121,10 @@ module Tremendous
115
121
  self.created_at = attributes[:'created_at']
116
122
  end
117
123
 
124
+ if attributes.key?(:'expires_at')
125
+ self.expires_at = attributes[:'expires_at']
126
+ end
127
+
118
128
  if attributes.key?(:'campaign_id')
119
129
  self.campaign_id = attributes[:'campaign_id']
120
130
  end
@@ -245,6 +255,7 @@ module Tremendous
245
255
  id == o.id &&
246
256
  order_id == o.order_id &&
247
257
  created_at == o.created_at &&
258
+ expires_at == o.expires_at &&
248
259
  campaign_id == o.campaign_id &&
249
260
  products == o.products &&
250
261
  value == o.value &&
@@ -262,7 +273,7 @@ module Tremendous
262
273
  # Calculates hash code according to all attributes.
263
274
  # @return [Integer] Hash code
264
275
  def hash
265
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields].hash
276
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields].hash
266
277
  end
267
278
 
268
279
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -51,6 +54,7 @@ module Tremendous
51
54
  :'id' => :'id',
52
55
  :'order_id' => :'order_id',
53
56
  :'created_at' => :'created_at',
57
+ :'expires_at' => :'expires_at',
54
58
  :'campaign_id' => :'campaign_id',
55
59
  :'products' => :'products',
56
60
  :'value' => :'value',
@@ -78,6 +82,7 @@ module Tremendous
78
82
  :'id' => :'String',
79
83
  :'order_id' => :'String',
80
84
  :'created_at' => :'Time',
85
+ :'expires_at' => :'Time',
81
86
  :'campaign_id' => :'String',
82
87
  :'products' => :'Array<String>',
83
88
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -92,6 +97,7 @@ module Tremendous
92
97
  # List of attributes with nullable: true
93
98
  def self.openapi_nullable
94
99
  Set.new([
100
+ :'expires_at',
95
101
  :'campaign_id',
96
102
  ])
97
103
  end
@@ -124,6 +130,10 @@ module Tremendous
124
130
  self.created_at = attributes[:'created_at']
125
131
  end
126
132
 
133
+ if attributes.key?(:'expires_at')
134
+ self.expires_at = attributes[:'expires_at']
135
+ end
136
+
127
137
  if attributes.key?(:'campaign_id')
128
138
  self.campaign_id = attributes[:'campaign_id']
129
139
  end
@@ -262,6 +272,7 @@ module Tremendous
262
272
  id == o.id &&
263
273
  order_id == o.order_id &&
264
274
  created_at == o.created_at &&
275
+ expires_at == o.expires_at &&
265
276
  campaign_id == o.campaign_id &&
266
277
  products == o.products &&
267
278
  value == o.value &&
@@ -281,7 +292,7 @@ module Tremendous
281
292
  # Calculates hash code according to all attributes.
282
293
  # @return [Integer] Hash code
283
294
  def hash
284
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, language, delivery].hash
295
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, language, delivery].hash
285
296
  end
286
297
 
287
298
  # Builds the object from hash
@@ -121,7 +121,7 @@ module Tremendous
121
121
  def valid?
122
122
  warn '[DEPRECATED] the `valid?` method is obsolete'
123
123
  return false if @denomination.nil?
124
- currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BGN", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYR", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "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", "LTL", "LVL", "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", "ZMK"])
124
+ currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYR", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "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", "LTL", "LVL", "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", "ZMK"])
125
125
  return false unless currency_code_validator.valid?(@currency_code)
126
126
  true
127
127
  end
@@ -139,7 +139,7 @@ module Tremendous
139
139
  # Custom attribute writer method checking allowed values (enum).
140
140
  # @param [Object] currency_code Object to be assigned
141
141
  def currency_code=(currency_code)
142
- validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BGN", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYR", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "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", "LTL", "LVL", "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", "ZMK"])
142
+ validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYR", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "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", "LTL", "LVL", "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", "ZMK"])
143
143
  unless validator.valid?(currency_code)
144
144
  fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
145
145
  end
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -48,6 +51,7 @@ module Tremendous
48
51
  :'id' => :'id',
49
52
  :'order_id' => :'order_id',
50
53
  :'created_at' => :'created_at',
54
+ :'expires_at' => :'expires_at',
51
55
  :'campaign_id' => :'campaign_id',
52
56
  :'products' => :'products',
53
57
  :'value' => :'value',
@@ -74,6 +78,7 @@ module Tremendous
74
78
  :'id' => :'String',
75
79
  :'order_id' => :'String',
76
80
  :'created_at' => :'Time',
81
+ :'expires_at' => :'Time',
77
82
  :'campaign_id' => :'String',
78
83
  :'products' => :'Array<String>',
79
84
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -87,6 +92,7 @@ module Tremendous
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'expires_at',
90
96
  :'campaign_id',
91
97
  ])
92
98
  end
@@ -119,6 +125,10 @@ module Tremendous
119
125
  self.created_at = attributes[:'created_at']
120
126
  end
121
127
 
128
+ if attributes.key?(:'expires_at')
129
+ self.expires_at = attributes[:'expires_at']
130
+ end
131
+
122
132
  if attributes.key?(:'campaign_id')
123
133
  self.campaign_id = attributes[:'campaign_id']
124
134
  end
@@ -253,6 +263,7 @@ module Tremendous
253
263
  id == o.id &&
254
264
  order_id == o.order_id &&
255
265
  created_at == o.created_at &&
266
+ expires_at == o.expires_at &&
256
267
  campaign_id == o.campaign_id &&
257
268
  products == o.products &&
258
269
  value == o.value &&
@@ -271,7 +282,7 @@ module Tremendous
271
282
  # Calculates hash code according to all attributes.
272
283
  # @return [Integer] Hash code
273
284
  def hash
274
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
285
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
275
286
  end
276
287
 
277
288
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Date the reward was created
26
26
  attr_accessor :created_at
27
27
 
28
+ # Expiration date of the reward. If null, the reward does not expire.
29
+ attr_accessor :expires_at
30
+
28
31
  # ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
29
32
  attr_accessor :campaign_id
30
33
 
@@ -48,6 +51,7 @@ module Tremendous
48
51
  :'id' => :'id',
49
52
  :'order_id' => :'order_id',
50
53
  :'created_at' => :'created_at',
54
+ :'expires_at' => :'expires_at',
51
55
  :'campaign_id' => :'campaign_id',
52
56
  :'products' => :'products',
53
57
  :'value' => :'value',
@@ -74,6 +78,7 @@ module Tremendous
74
78
  :'id' => :'String',
75
79
  :'order_id' => :'String',
76
80
  :'created_at' => :'Time',
81
+ :'expires_at' => :'Time',
77
82
  :'campaign_id' => :'String',
78
83
  :'products' => :'Array<String>',
79
84
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
@@ -87,6 +92,7 @@ module Tremendous
87
92
  # List of attributes with nullable: true
88
93
  def self.openapi_nullable
89
94
  Set.new([
95
+ :'expires_at',
90
96
  :'campaign_id',
91
97
  ])
92
98
  end
@@ -119,6 +125,10 @@ module Tremendous
119
125
  self.created_at = attributes[:'created_at']
120
126
  end
121
127
 
128
+ if attributes.key?(:'expires_at')
129
+ self.expires_at = attributes[:'expires_at']
130
+ end
131
+
122
132
  if attributes.key?(:'campaign_id')
123
133
  self.campaign_id = attributes[:'campaign_id']
124
134
  end
@@ -253,6 +263,7 @@ module Tremendous
253
263
  id == o.id &&
254
264
  order_id == o.order_id &&
255
265
  created_at == o.created_at &&
266
+ expires_at == o.expires_at &&
256
267
  campaign_id == o.campaign_id &&
257
268
  products == o.products &&
258
269
  value == o.value &&
@@ -271,7 +282,7 @@ module Tremendous
271
282
  # Calculates hash code according to all attributes.
272
283
  # @return [Integer] Hash code
273
284
  def hash
274
- [id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
285
+ [id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
275
286
  end
276
287
 
277
288
  # Builds the object from hash
@@ -28,7 +28,7 @@ module Tremendous
28
28
  # Date the order has been created
29
29
  attr_accessor :created_at
30
30
 
31
- # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> CART </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
31
+ # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> OPEN </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
32
32
  attr_accessor :status
33
33
 
34
34
  # Name of the channel in which the order was created
@@ -211,7 +211,7 @@ module Tremendous
211
211
  return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
212
212
  return false if @created_at.nil?
213
213
  return false if @status.nil?
214
- status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
214
+ status_validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
215
215
  return false unless status_validator.valid?(@status)
216
216
  channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
217
217
  return false unless channel_validator.valid?(@channel)
@@ -257,7 +257,7 @@ module Tremendous
257
257
  # Custom attribute writer method checking allowed values (enum).
258
258
  # @param [Object] status Object to be assigned
259
259
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
260
+ validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
261
261
  unless validator.valid?(status)
262
262
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
263
263
  end
@@ -28,7 +28,7 @@ module Tremendous
28
28
  # Date the order has been created
29
29
  attr_accessor :created_at
30
30
 
31
- # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> CART </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
31
+ # Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> OPEN </code> </td> <td> The order has been created, but hasn't yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
32
32
  attr_accessor :status
33
33
 
34
34
  # Name of the channel in which the order was created
@@ -211,7 +211,7 @@ module Tremendous
211
211
  return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
212
212
  return false if @created_at.nil?
213
213
  return false if @status.nil?
214
- status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
214
+ status_validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
215
215
  return false unless status_validator.valid?(@status)
216
216
  channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
217
217
  return false unless channel_validator.valid?(@channel)
@@ -257,7 +257,7 @@ module Tremendous
257
257
  # Custom attribute writer method checking allowed values (enum).
258
258
  # @param [Object] status Object to be assigned
259
259
  def status=(status)
260
- validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
260
+ validator = EnumAttributeValidator.new('String', ["CANCELED", "OPEN", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
261
261
  unless validator.valid?(status)
262
262
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
263
263
  end
@@ -1,3 +1,3 @@
1
1
  module Tremendous
2
- VERSION = "5.15.0"
2
+ VERSION = "5.17.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tremendous_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.0
4
+ version: 5.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tremendous Developers