tremendous_ruby 5.6.0 → 5.8.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +148 -10
  3. data/lib/tremendous/models/balance_transaction.rb +13 -4
  4. data/lib/tremendous/models/balance_transaction_order.rb +256 -0
  5. data/lib/tremendous/models/balance_transaction_order_payment.rb +358 -0
  6. data/lib/tremendous/models/create_report201_response.rb +231 -0
  7. data/lib/tremendous/models/create_report201_response_report.rb +291 -0
  8. data/lib/tremendous/models/create_report_request.rb +295 -0
  9. data/lib/tremendous/models/create_report_request_filters.rb +216 -0
  10. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +340 -0
  11. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +226 -0
  12. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +226 -0
  13. data/lib/tremendous/models/fraud_review.rb +23 -1
  14. data/lib/tremendous/models/fraud_review_risk.rb +41 -0
  15. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +23 -1
  16. data/lib/tremendous/models/get_order200_response.rb +221 -0
  17. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +13 -4
  18. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +256 -0
  19. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +358 -0
  20. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +37 -7
  21. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +225 -0
  22. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +64 -7
  23. data/lib/tremendous/models/order_base_payment.rb +64 -7
  24. data/lib/tremendous/models/payment_details.rb +64 -7
  25. data/lib/tremendous/models/payout.rb +16 -4
  26. data/lib/tremendous/models/report.rb +291 -0
  27. data/lib/tremendous/models/resend_reward_request.rb +225 -0
  28. data/lib/tremendous/version.rb +1 -1
  29. data/lib/tremendous.rb +16 -1
  30. metadata +19 -3
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Fees for the order (in USD)
26
26
  attr_accessor :fees
27
27
 
28
+ # Discount for the order (in USD)
29
+ attr_accessor :discount
30
+
28
31
  attr_accessor :refund
29
32
 
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Tremendous
33
36
  :'subtotal' => :'subtotal',
34
37
  :'total' => :'total',
35
38
  :'fees' => :'fees',
39
+ :'discount' => :'discount',
36
40
  :'refund' => :'refund'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Tremendous
48
52
  :'subtotal' => :'Float',
49
53
  :'total' => :'Float',
50
54
  :'fees' => :'Float',
55
+ :'discount' => :'Float',
51
56
  :'refund' => :'ListOrders200ResponseOrdersInnerPaymentRefund'
52
57
  }
53
58
  end
@@ -75,14 +80,26 @@ module Tremendous
75
80
 
76
81
  if attributes.key?(:'subtotal')
77
82
  self.subtotal = attributes[:'subtotal']
83
+ else
84
+ self.subtotal = nil
78
85
  end
79
86
 
80
87
  if attributes.key?(:'total')
81
88
  self.total = attributes[:'total']
89
+ else
90
+ self.total = nil
82
91
  end
83
92
 
84
93
  if attributes.key?(:'fees')
85
94
  self.fees = attributes[:'fees']
95
+ else
96
+ self.fees = nil
97
+ end
98
+
99
+ if attributes.key?(:'discount')
100
+ self.discount = attributes[:'discount']
101
+ else
102
+ self.discount = nil
86
103
  end
87
104
 
88
105
  if attributes.key?(:'refund')
@@ -95,18 +112,38 @@ module Tremendous
95
112
  def list_invalid_properties
96
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
114
  invalid_properties = Array.new
98
- if !@subtotal.nil? && @subtotal < 0
115
+ if @subtotal.nil?
116
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
117
+ end
118
+
119
+ if @subtotal < 0
99
120
  invalid_properties.push('invalid value for "subtotal", must be greater than or equal to 0.')
100
121
  end
101
122
 
102
- if !@total.nil? && @total < 0
123
+ if @total.nil?
124
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
125
+ end
126
+
127
+ if @total < 0
103
128
  invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
104
129
  end
105
130
 
106
- if !@fees.nil? && @fees < 0
131
+ if @fees.nil?
132
+ invalid_properties.push('invalid value for "fees", fees cannot be nil.')
133
+ end
134
+
135
+ if @fees < 0
107
136
  invalid_properties.push('invalid value for "fees", must be greater than or equal to 0.')
108
137
  end
109
138
 
139
+ if @discount.nil?
140
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
141
+ end
142
+
143
+ if @discount < 0
144
+ invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
145
+ end
146
+
110
147
  invalid_properties
111
148
  end
112
149
 
@@ -114,9 +151,14 @@ module Tremendous
114
151
  # @return true if the model is valid
115
152
  def valid?
116
153
  warn '[DEPRECATED] the `valid?` method is obsolete'
117
- return false if !@subtotal.nil? && @subtotal < 0
118
- return false if !@total.nil? && @total < 0
119
- return false if !@fees.nil? && @fees < 0
154
+ return false if @subtotal.nil?
155
+ return false if @subtotal < 0
156
+ return false if @total.nil?
157
+ return false if @total < 0
158
+ return false if @fees.nil?
159
+ return false if @fees < 0
160
+ return false if @discount.nil?
161
+ return false if @discount < 0
120
162
  true
121
163
  end
122
164
 
@@ -162,6 +204,20 @@ module Tremendous
162
204
  @fees = fees
163
205
  end
164
206
 
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] discount Value to be assigned
209
+ def discount=(discount)
210
+ if discount.nil?
211
+ fail ArgumentError, 'discount cannot be nil'
212
+ end
213
+
214
+ if discount < 0
215
+ fail ArgumentError, 'invalid value for "discount", must be greater than or equal to 0.'
216
+ end
217
+
218
+ @discount = discount
219
+ end
220
+
165
221
  # Checks equality by comparing each attribute.
166
222
  # @param [Object] Object to be compared
167
223
  def ==(o)
@@ -170,6 +226,7 @@ module Tremendous
170
226
  subtotal == o.subtotal &&
171
227
  total == o.total &&
172
228
  fees == o.fees &&
229
+ discount == o.discount &&
173
230
  refund == o.refund
174
231
  end
175
232
 
@@ -182,7 +239,7 @@ module Tremendous
182
239
  # Calculates hash code according to all attributes.
183
240
  # @return [Integer] Hash code
184
241
  def hash
185
- [subtotal, total, fees, refund].hash
242
+ [subtotal, total, fees, discount, refund].hash
186
243
  end
187
244
 
188
245
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Fees for the order (in USD)
26
26
  attr_accessor :fees
27
27
 
28
+ # Discount for the order (in USD)
29
+ attr_accessor :discount
30
+
28
31
  attr_accessor :refund
29
32
 
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Tremendous
33
36
  :'subtotal' => :'subtotal',
34
37
  :'total' => :'total',
35
38
  :'fees' => :'fees',
39
+ :'discount' => :'discount',
36
40
  :'refund' => :'refund'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Tremendous
48
52
  :'subtotal' => :'Float',
49
53
  :'total' => :'Float',
50
54
  :'fees' => :'Float',
55
+ :'discount' => :'Float',
51
56
  :'refund' => :'PaymentDetailsRefund'
52
57
  }
53
58
  end
@@ -75,14 +80,26 @@ module Tremendous
75
80
 
76
81
  if attributes.key?(:'subtotal')
77
82
  self.subtotal = attributes[:'subtotal']
83
+ else
84
+ self.subtotal = nil
78
85
  end
79
86
 
80
87
  if attributes.key?(:'total')
81
88
  self.total = attributes[:'total']
89
+ else
90
+ self.total = nil
82
91
  end
83
92
 
84
93
  if attributes.key?(:'fees')
85
94
  self.fees = attributes[:'fees']
95
+ else
96
+ self.fees = nil
97
+ end
98
+
99
+ if attributes.key?(:'discount')
100
+ self.discount = attributes[:'discount']
101
+ else
102
+ self.discount = nil
86
103
  end
87
104
 
88
105
  if attributes.key?(:'refund')
@@ -95,18 +112,38 @@ module Tremendous
95
112
  def list_invalid_properties
96
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
114
  invalid_properties = Array.new
98
- if !@subtotal.nil? && @subtotal < 0
115
+ if @subtotal.nil?
116
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
117
+ end
118
+
119
+ if @subtotal < 0
99
120
  invalid_properties.push('invalid value for "subtotal", must be greater than or equal to 0.')
100
121
  end
101
122
 
102
- if !@total.nil? && @total < 0
123
+ if @total.nil?
124
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
125
+ end
126
+
127
+ if @total < 0
103
128
  invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
104
129
  end
105
130
 
106
- if !@fees.nil? && @fees < 0
131
+ if @fees.nil?
132
+ invalid_properties.push('invalid value for "fees", fees cannot be nil.')
133
+ end
134
+
135
+ if @fees < 0
107
136
  invalid_properties.push('invalid value for "fees", must be greater than or equal to 0.')
108
137
  end
109
138
 
139
+ if @discount.nil?
140
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
141
+ end
142
+
143
+ if @discount < 0
144
+ invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
145
+ end
146
+
110
147
  invalid_properties
111
148
  end
112
149
 
@@ -114,9 +151,14 @@ module Tremendous
114
151
  # @return true if the model is valid
115
152
  def valid?
116
153
  warn '[DEPRECATED] the `valid?` method is obsolete'
117
- return false if !@subtotal.nil? && @subtotal < 0
118
- return false if !@total.nil? && @total < 0
119
- return false if !@fees.nil? && @fees < 0
154
+ return false if @subtotal.nil?
155
+ return false if @subtotal < 0
156
+ return false if @total.nil?
157
+ return false if @total < 0
158
+ return false if @fees.nil?
159
+ return false if @fees < 0
160
+ return false if @discount.nil?
161
+ return false if @discount < 0
120
162
  true
121
163
  end
122
164
 
@@ -162,6 +204,20 @@ module Tremendous
162
204
  @fees = fees
163
205
  end
164
206
 
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] discount Value to be assigned
209
+ def discount=(discount)
210
+ if discount.nil?
211
+ fail ArgumentError, 'discount cannot be nil'
212
+ end
213
+
214
+ if discount < 0
215
+ fail ArgumentError, 'invalid value for "discount", must be greater than or equal to 0.'
216
+ end
217
+
218
+ @discount = discount
219
+ end
220
+
165
221
  # Checks equality by comparing each attribute.
166
222
  # @param [Object] Object to be compared
167
223
  def ==(o)
@@ -170,6 +226,7 @@ module Tremendous
170
226
  subtotal == o.subtotal &&
171
227
  total == o.total &&
172
228
  fees == o.fees &&
229
+ discount == o.discount &&
173
230
  refund == o.refund
174
231
  end
175
232
 
@@ -182,7 +239,7 @@ module Tremendous
182
239
  # Calculates hash code according to all attributes.
183
240
  # @return [Integer] Hash code
184
241
  def hash
185
- [subtotal, total, fees, refund].hash
242
+ [subtotal, total, fees, discount, refund].hash
186
243
  end
187
244
 
188
245
  # Builds the object from hash
@@ -24,6 +24,9 @@ module Tremendous
24
24
  # Fees for the order (in USD)
25
25
  attr_accessor :fees
26
26
 
27
+ # Discount for the order (in USD)
28
+ attr_accessor :discount
29
+
27
30
  attr_accessor :refund
28
31
 
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -32,6 +35,7 @@ module Tremendous
32
35
  :'subtotal' => :'subtotal',
33
36
  :'total' => :'total',
34
37
  :'fees' => :'fees',
38
+ :'discount' => :'discount',
35
39
  :'refund' => :'refund'
36
40
  }
37
41
  end
@@ -47,6 +51,7 @@ module Tremendous
47
51
  :'subtotal' => :'Float',
48
52
  :'total' => :'Float',
49
53
  :'fees' => :'Float',
54
+ :'discount' => :'Float',
50
55
  :'refund' => :'PaymentDetailsRefund'
51
56
  }
52
57
  end
@@ -74,14 +79,26 @@ module Tremendous
74
79
 
75
80
  if attributes.key?(:'subtotal')
76
81
  self.subtotal = attributes[:'subtotal']
82
+ else
83
+ self.subtotal = nil
77
84
  end
78
85
 
79
86
  if attributes.key?(:'total')
80
87
  self.total = attributes[:'total']
88
+ else
89
+ self.total = nil
81
90
  end
82
91
 
83
92
  if attributes.key?(:'fees')
84
93
  self.fees = attributes[:'fees']
94
+ else
95
+ self.fees = nil
96
+ end
97
+
98
+ if attributes.key?(:'discount')
99
+ self.discount = attributes[:'discount']
100
+ else
101
+ self.discount = nil
85
102
  end
86
103
 
87
104
  if attributes.key?(:'refund')
@@ -94,18 +111,38 @@ module Tremendous
94
111
  def list_invalid_properties
95
112
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
113
  invalid_properties = Array.new
97
- if !@subtotal.nil? && @subtotal < 0
114
+ if @subtotal.nil?
115
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
116
+ end
117
+
118
+ if @subtotal < 0
98
119
  invalid_properties.push('invalid value for "subtotal", must be greater than or equal to 0.')
99
120
  end
100
121
 
101
- if !@total.nil? && @total < 0
122
+ if @total.nil?
123
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
124
+ end
125
+
126
+ if @total < 0
102
127
  invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
103
128
  end
104
129
 
105
- if !@fees.nil? && @fees < 0
130
+ if @fees.nil?
131
+ invalid_properties.push('invalid value for "fees", fees cannot be nil.')
132
+ end
133
+
134
+ if @fees < 0
106
135
  invalid_properties.push('invalid value for "fees", must be greater than or equal to 0.')
107
136
  end
108
137
 
138
+ if @discount.nil?
139
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
140
+ end
141
+
142
+ if @discount < 0
143
+ invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
144
+ end
145
+
109
146
  invalid_properties
110
147
  end
111
148
 
@@ -113,9 +150,14 @@ module Tremendous
113
150
  # @return true if the model is valid
114
151
  def valid?
115
152
  warn '[DEPRECATED] the `valid?` method is obsolete'
116
- return false if !@subtotal.nil? && @subtotal < 0
117
- return false if !@total.nil? && @total < 0
118
- return false if !@fees.nil? && @fees < 0
153
+ return false if @subtotal.nil?
154
+ return false if @subtotal < 0
155
+ return false if @total.nil?
156
+ return false if @total < 0
157
+ return false if @fees.nil?
158
+ return false if @fees < 0
159
+ return false if @discount.nil?
160
+ return false if @discount < 0
119
161
  true
120
162
  end
121
163
 
@@ -161,6 +203,20 @@ module Tremendous
161
203
  @fees = fees
162
204
  end
163
205
 
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] discount Value to be assigned
208
+ def discount=(discount)
209
+ if discount.nil?
210
+ fail ArgumentError, 'discount cannot be nil'
211
+ end
212
+
213
+ if discount < 0
214
+ fail ArgumentError, 'invalid value for "discount", must be greater than or equal to 0.'
215
+ end
216
+
217
+ @discount = discount
218
+ end
219
+
164
220
  # Checks equality by comparing each attribute.
165
221
  # @param [Object] Object to be compared
166
222
  def ==(o)
@@ -169,6 +225,7 @@ module Tremendous
169
225
  subtotal == o.subtotal &&
170
226
  total == o.total &&
171
227
  fees == o.fees &&
228
+ discount == o.discount &&
172
229
  refund == o.refund
173
230
  end
174
231
 
@@ -181,7 +238,7 @@ module Tremendous
181
238
  # Calculates hash code according to all attributes.
182
239
  # @return [Integer] Hash code
183
240
  def hash
184
- [subtotal, total, fees, refund].hash
241
+ [subtotal, total, fees, discount, refund].hash
185
242
  end
186
243
 
187
244
  # Builds the object from hash
@@ -32,6 +32,9 @@ module Tremendous
32
32
  # Date the payout was executed
33
33
  attr_accessor :executed_at
34
34
 
35
+ # Date when a delayed payout will be executed in the future
36
+ attr_accessor :defer_execution_until
37
+
35
38
  class EnumAttributeValidator
36
39
  attr_reader :datatype
37
40
  attr_reader :allowable_values
@@ -62,7 +65,8 @@ module Tremendous
62
65
  :'product_id' => :'product_id',
63
66
  :'product_name' => :'product_name',
64
67
  :'created_at' => :'created_at',
65
- :'executed_at' => :'executed_at'
68
+ :'executed_at' => :'executed_at',
69
+ :'defer_execution_until' => :'defer_execution_until'
66
70
  }
67
71
  end
68
72
 
@@ -79,13 +83,16 @@ module Tremendous
79
83
  :'product_id' => :'String',
80
84
  :'product_name' => :'String',
81
85
  :'created_at' => :'Time',
82
- :'executed_at' => :'Time'
86
+ :'executed_at' => :'Time',
87
+ :'defer_execution_until' => :'Time'
83
88
  }
84
89
  end
85
90
 
86
91
  # List of attributes with nullable: true
87
92
  def self.openapi_nullable
88
93
  Set.new([
94
+ :'executed_at',
95
+ :'defer_execution_until'
89
96
  ])
90
97
  end
91
98
 
@@ -127,6 +134,10 @@ module Tremendous
127
134
  if attributes.key?(:'executed_at')
128
135
  self.executed_at = attributes[:'executed_at']
129
136
  end
137
+
138
+ if attributes.key?(:'defer_execution_until')
139
+ self.defer_execution_until = attributes[:'defer_execution_until']
140
+ end
130
141
  end
131
142
 
132
143
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -208,7 +219,8 @@ module Tremendous
208
219
  product_id == o.product_id &&
209
220
  product_name == o.product_name &&
210
221
  created_at == o.created_at &&
211
- executed_at == o.executed_at
222
+ executed_at == o.executed_at &&
223
+ defer_execution_until == o.defer_execution_until
212
224
  end
213
225
 
214
226
  # @see the `==` method
@@ -220,7 +232,7 @@ module Tremendous
220
232
  # Calculates hash code according to all attributes.
221
233
  # @return [Integer] Hash code
222
234
  def hash
223
- [id, status, product_id, product_name, created_at, executed_at].hash
235
+ [id, status, product_id, product_name, created_at, executed_at, defer_execution_until].hash
224
236
  end
225
237
 
226
238
  # Builds the object from hash