tremendous_ruby 5.21.0 → 5.23.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.
- checksums.yaml +4 -4
- data/lib/tremendous/models/balance_transaction.rb +30 -3
- data/lib/tremendous/models/balance_transaction_order_payment.rb +32 -5
- data/lib/tremendous/models/campaign.rb +46 -1
- data/lib/tremendous/models/campaign_base.rb +46 -1
- data/lib/tremendous/models/connected_organization_organization.rb +11 -1
- data/lib/tremendous/models/create_campaign_request.rb +46 -1
- data/lib/tremendous/models/create_connected_organization_member_request.rb +34 -4
- data/lib/tremendous/models/create_order200_response_order.rb +1 -1
- data/lib/tremendous/models/create_organization.rb +11 -1
- data/lib/tremendous/models/create_organization200_response_organization.rb +11 -1
- data/lib/tremendous/models/create_organization_for_response.rb +11 -1
- data/lib/tremendous/models/create_organization_properties.rb +11 -1
- data/lib/tremendous/models/create_organization_request.rb +14 -4
- data/lib/tremendous/models/create_topup_request.rb +1 -1
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +1 -1
- data/lib/tremendous/models/fraud_review.rb +1 -1
- data/lib/tremendous/models/fraud_review_related_rewards.rb +16 -5
- data/lib/tremendous/models/fraud_rules_list_item.rb +1 -1
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +15 -5
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +30 -3
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +32 -5
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +46 -1
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +11 -1
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +1 -1
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +44 -4
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +1 -1
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +33 -6
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +33 -6
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +11 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +1 -0
- data/lib/tremendous/models/list_topups200_response_topups_inner.rb +48 -7
- data/lib/tremendous/models/order.rb +1 -1
- data/lib/tremendous/models/order_base.rb +1 -1
- data/lib/tremendous/models/order_base_payment.rb +33 -6
- data/lib/tremendous/models/order_with_link.rb +1 -1
- data/lib/tremendous/models/order_without_link.rb +1 -1
- data/lib/tremendous/models/organization.rb +11 -1
- data/lib/tremendous/models/payment_details.rb +32 -5
- data/lib/tremendous/models/payment_details_refund.rb +33 -6
- data/lib/tremendous/models/recipient.rb +1 -0
- data/lib/tremendous/models/refund_details.rb +32 -5
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +1 -1
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +1 -1
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +1 -1
- data/lib/tremendous/models/topup.rb +48 -7
- data/lib/tremendous/models/topup_create_request.rb +1 -1
- data/lib/tremendous/models/update_campaign.rb +46 -1
- data/lib/tremendous/models/update_campaign_request.rb +46 -1
- data/lib/tremendous/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc07185019a542c77863eb985c13103495fb55933bafb01a9c26bf6019816c97
|
|
4
|
+
data.tar.gz: 560f1e3ed98dd7070e8d61bb837a05305d02535152bcccd4a57c7316e9779415
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d188896ded84360d1c661258b0ca3d89c452244bf52ddc6547a3c2513265dcd1495339064278a7d29ad58737474baa52e5dcc2d78144996e1a3c380be1e3be56
|
|
7
|
+
data.tar.gz: 7c55d5f47050b61755db4dd7ee2e40d7c02139c9aa213b211c8ee251222600b7b9804588de48814721562881d4f1e8dd94a621f7bdb48e4cef5cb5a0b3f3b09b
|
|
@@ -19,10 +19,13 @@ module Tremendous
|
|
|
19
19
|
# Date that the transaction was created
|
|
20
20
|
attr_accessor :created_at
|
|
21
21
|
|
|
22
|
-
# Amount of the transaction in
|
|
22
|
+
# Amount of the transaction, denominated in `currency_code`.
|
|
23
23
|
attr_accessor :amount
|
|
24
24
|
|
|
25
|
-
#
|
|
25
|
+
# Currency of the transaction amount and running balance. Always matches the organization's currency.
|
|
26
|
+
attr_accessor :currency_code
|
|
27
|
+
|
|
28
|
+
# The updated total after the transaction, denominated in `currency_code`. Note that this running balance may be delayed and contain `null`.
|
|
26
29
|
attr_accessor :balance
|
|
27
30
|
|
|
28
31
|
# The action that was performed
|
|
@@ -38,6 +41,7 @@ module Tremendous
|
|
|
38
41
|
{
|
|
39
42
|
:'created_at' => :'created_at',
|
|
40
43
|
:'amount' => :'amount',
|
|
44
|
+
:'currency_code' => :'currency_code',
|
|
41
45
|
:'balance' => :'balance',
|
|
42
46
|
:'action' => :'action',
|
|
43
47
|
:'description' => :'description',
|
|
@@ -60,6 +64,7 @@ module Tremendous
|
|
|
60
64
|
{
|
|
61
65
|
:'created_at' => :'Time',
|
|
62
66
|
:'amount' => :'Float',
|
|
67
|
+
:'currency_code' => :'String',
|
|
63
68
|
:'balance' => :'Float',
|
|
64
69
|
:'action' => :'String',
|
|
65
70
|
:'description' => :'String',
|
|
@@ -101,6 +106,12 @@ module Tremendous
|
|
|
101
106
|
self.amount = nil
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
if attributes.key?(:'currency_code')
|
|
110
|
+
self.currency_code = attributes[:'currency_code']
|
|
111
|
+
else
|
|
112
|
+
self.currency_code = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
104
115
|
if attributes.key?(:'balance')
|
|
105
116
|
self.balance = attributes[:'balance']
|
|
106
117
|
else
|
|
@@ -137,6 +148,10 @@ module Tremendous
|
|
|
137
148
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
138
149
|
end
|
|
139
150
|
|
|
151
|
+
if @currency_code.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "currency_code", currency_code cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
140
155
|
if @balance.nil?
|
|
141
156
|
invalid_properties.push('invalid value for "balance", balance cannot be nil.')
|
|
142
157
|
end
|
|
@@ -158,6 +173,7 @@ module Tremendous
|
|
|
158
173
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
159
174
|
return false if @created_at.nil?
|
|
160
175
|
return false if @amount.nil?
|
|
176
|
+
return false if @currency_code.nil?
|
|
161
177
|
return false if @balance.nil?
|
|
162
178
|
return false if @action.nil?
|
|
163
179
|
return false if @description.nil?
|
|
@@ -184,6 +200,16 @@ module Tremendous
|
|
|
184
200
|
@amount = amount
|
|
185
201
|
end
|
|
186
202
|
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] currency_code Value to be assigned
|
|
205
|
+
def currency_code=(currency_code)
|
|
206
|
+
if currency_code.nil?
|
|
207
|
+
fail ArgumentError, 'currency_code cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@currency_code = currency_code
|
|
211
|
+
end
|
|
212
|
+
|
|
187
213
|
# Custom attribute writer method with validation
|
|
188
214
|
# @param [Object] balance Value to be assigned
|
|
189
215
|
def balance=(balance)
|
|
@@ -221,6 +247,7 @@ module Tremendous
|
|
|
221
247
|
self.class == o.class &&
|
|
222
248
|
created_at == o.created_at &&
|
|
223
249
|
amount == o.amount &&
|
|
250
|
+
currency_code == o.currency_code &&
|
|
224
251
|
balance == o.balance &&
|
|
225
252
|
action == o.action &&
|
|
226
253
|
description == o.description &&
|
|
@@ -236,7 +263,7 @@ module Tremendous
|
|
|
236
263
|
# Calculates hash code according to all attributes.
|
|
237
264
|
# @return [Integer] Hash code
|
|
238
265
|
def hash
|
|
239
|
-
[created_at, amount, balance, action, description, order].hash
|
|
266
|
+
[created_at, amount, currency_code, balance, action, description, order].hash
|
|
240
267
|
end
|
|
241
268
|
|
|
242
269
|
# Builds the object from hash
|
|
@@ -15,18 +15,21 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
class BalanceTransactionOrderPayment
|
|
18
|
-
# Total price of the order before fees
|
|
18
|
+
# Total price of the order before fees, denominated in `currency_code`.
|
|
19
19
|
attr_accessor :subtotal
|
|
20
20
|
|
|
21
|
-
# Total price of the order including fees
|
|
21
|
+
# Total price of the order including fees, denominated in `currency_code`.
|
|
22
22
|
attr_accessor :total
|
|
23
23
|
|
|
24
|
-
# Fees for the order
|
|
24
|
+
# Fees for the order, denominated in `currency_code`.
|
|
25
25
|
attr_accessor :fees
|
|
26
26
|
|
|
27
|
-
# Discount for the order
|
|
27
|
+
# Discount for the order, denominated in `currency_code`.
|
|
28
28
|
attr_accessor :discount
|
|
29
29
|
|
|
30
|
+
# Currency in which the payment amounts (subtotal, total, fees, discount, refund) are denominated. This always matches the organization's currency.
|
|
31
|
+
attr_accessor :currency_code
|
|
32
|
+
|
|
30
33
|
attr_accessor :refund
|
|
31
34
|
|
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,6 +39,7 @@ module Tremendous
|
|
|
36
39
|
:'total' => :'total',
|
|
37
40
|
:'fees' => :'fees',
|
|
38
41
|
:'discount' => :'discount',
|
|
42
|
+
:'currency_code' => :'currency_code',
|
|
39
43
|
:'refund' => :'refund'
|
|
40
44
|
}
|
|
41
45
|
end
|
|
@@ -57,6 +61,7 @@ module Tremendous
|
|
|
57
61
|
:'total' => :'Float',
|
|
58
62
|
:'fees' => :'Float',
|
|
59
63
|
:'discount' => :'Float',
|
|
64
|
+
:'currency_code' => :'String',
|
|
60
65
|
:'refund' => :'PaymentDetailsRefund'
|
|
61
66
|
}
|
|
62
67
|
end
|
|
@@ -107,6 +112,12 @@ module Tremendous
|
|
|
107
112
|
self.discount = nil
|
|
108
113
|
end
|
|
109
114
|
|
|
115
|
+
if attributes.key?(:'currency_code')
|
|
116
|
+
self.currency_code = attributes[:'currency_code']
|
|
117
|
+
else
|
|
118
|
+
self.currency_code = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
110
121
|
if attributes.key?(:'refund')
|
|
111
122
|
self.refund = attributes[:'refund']
|
|
112
123
|
end
|
|
@@ -149,6 +160,10 @@ module Tremendous
|
|
|
149
160
|
invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
|
|
150
161
|
end
|
|
151
162
|
|
|
163
|
+
if @currency_code.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "currency_code", currency_code cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
152
167
|
invalid_properties
|
|
153
168
|
end
|
|
154
169
|
|
|
@@ -164,6 +179,7 @@ module Tremendous
|
|
|
164
179
|
return false if @fees < 0
|
|
165
180
|
return false if @discount.nil?
|
|
166
181
|
return false if @discount < 0
|
|
182
|
+
return false if @currency_code.nil?
|
|
167
183
|
true
|
|
168
184
|
end
|
|
169
185
|
|
|
@@ -223,6 +239,16 @@ module Tremendous
|
|
|
223
239
|
@discount = discount
|
|
224
240
|
end
|
|
225
241
|
|
|
242
|
+
# Custom attribute writer method with validation
|
|
243
|
+
# @param [Object] currency_code Value to be assigned
|
|
244
|
+
def currency_code=(currency_code)
|
|
245
|
+
if currency_code.nil?
|
|
246
|
+
fail ArgumentError, 'currency_code cannot be nil'
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
@currency_code = currency_code
|
|
250
|
+
end
|
|
251
|
+
|
|
226
252
|
# Checks equality by comparing each attribute.
|
|
227
253
|
# @param [Object] Object to be compared
|
|
228
254
|
def ==(o)
|
|
@@ -232,6 +258,7 @@ module Tremendous
|
|
|
232
258
|
total == o.total &&
|
|
233
259
|
fees == o.fees &&
|
|
234
260
|
discount == o.discount &&
|
|
261
|
+
currency_code == o.currency_code &&
|
|
235
262
|
refund == o.refund
|
|
236
263
|
end
|
|
237
264
|
|
|
@@ -244,7 +271,7 @@ module Tremendous
|
|
|
244
271
|
# Calculates hash code according to all attributes.
|
|
245
272
|
# @return [Integer] Hash code
|
|
246
273
|
def hash
|
|
247
|
-
[subtotal, total, fees, discount, refund].hash
|
|
274
|
+
[subtotal, total, fees, discount, currency_code, refund].hash
|
|
248
275
|
end
|
|
249
276
|
|
|
250
277
|
# Builds the object from hash
|
|
@@ -27,10 +27,35 @@ module Tremendous
|
|
|
27
27
|
# List of IDs of products (different gift cards, charity, etc.) that are available in this campaign.
|
|
28
28
|
attr_accessor :products
|
|
29
29
|
|
|
30
|
+
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
|
+
attr_accessor :fee_charged_to
|
|
32
|
+
|
|
30
33
|
attr_accessor :webpage_style
|
|
31
34
|
|
|
32
35
|
attr_accessor :email_style
|
|
33
36
|
|
|
37
|
+
class EnumAttributeValidator
|
|
38
|
+
attr_reader :datatype
|
|
39
|
+
attr_reader :allowable_values
|
|
40
|
+
|
|
41
|
+
def initialize(datatype, allowable_values)
|
|
42
|
+
@allowable_values = allowable_values.map do |value|
|
|
43
|
+
case datatype.to_s
|
|
44
|
+
when /Integer/i
|
|
45
|
+
value.to_i
|
|
46
|
+
when /Float/i
|
|
47
|
+
value.to_f
|
|
48
|
+
else
|
|
49
|
+
value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def valid?(value)
|
|
55
|
+
!value || allowable_values.include?(value)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
34
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
60
|
def self.attribute_map
|
|
36
61
|
{
|
|
@@ -38,6 +63,7 @@ module Tremendous
|
|
|
38
63
|
:'name' => :'name',
|
|
39
64
|
:'description' => :'description',
|
|
40
65
|
:'products' => :'products',
|
|
66
|
+
:'fee_charged_to' => :'fee_charged_to',
|
|
41
67
|
:'webpage_style' => :'webpage_style',
|
|
42
68
|
:'email_style' => :'email_style'
|
|
43
69
|
}
|
|
@@ -60,6 +86,7 @@ module Tremendous
|
|
|
60
86
|
:'name' => :'String',
|
|
61
87
|
:'description' => :'String',
|
|
62
88
|
:'products' => :'Array<String>',
|
|
89
|
+
:'fee_charged_to' => :'String',
|
|
63
90
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
64
91
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
65
92
|
}
|
|
@@ -69,6 +96,7 @@ module Tremendous
|
|
|
69
96
|
def self.openapi_nullable
|
|
70
97
|
Set.new([
|
|
71
98
|
:'description',
|
|
99
|
+
:'fee_charged_to',
|
|
72
100
|
])
|
|
73
101
|
end
|
|
74
102
|
|
|
@@ -112,6 +140,10 @@ module Tremendous
|
|
|
112
140
|
self.products = nil
|
|
113
141
|
end
|
|
114
142
|
|
|
143
|
+
if attributes.key?(:'fee_charged_to')
|
|
144
|
+
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
145
|
+
end
|
|
146
|
+
|
|
115
147
|
if attributes.key?(:'webpage_style')
|
|
116
148
|
self.webpage_style = attributes[:'webpage_style']
|
|
117
149
|
end
|
|
@@ -149,6 +181,8 @@ module Tremendous
|
|
|
149
181
|
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
150
182
|
return false if @name.nil?
|
|
151
183
|
return false if @products.nil?
|
|
184
|
+
fee_charged_to_validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
185
|
+
return false unless fee_charged_to_validator.valid?(@fee_charged_to)
|
|
152
186
|
true
|
|
153
187
|
end
|
|
154
188
|
|
|
@@ -187,6 +221,16 @@ module Tremendous
|
|
|
187
221
|
@products = products
|
|
188
222
|
end
|
|
189
223
|
|
|
224
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
225
|
+
# @param [Object] fee_charged_to Object to be assigned
|
|
226
|
+
def fee_charged_to=(fee_charged_to)
|
|
227
|
+
validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
228
|
+
unless validator.valid?(fee_charged_to)
|
|
229
|
+
fail ArgumentError, "invalid value for \"fee_charged_to\", must be one of #{validator.allowable_values}."
|
|
230
|
+
end
|
|
231
|
+
@fee_charged_to = fee_charged_to
|
|
232
|
+
end
|
|
233
|
+
|
|
190
234
|
# Checks equality by comparing each attribute.
|
|
191
235
|
# @param [Object] Object to be compared
|
|
192
236
|
def ==(o)
|
|
@@ -196,6 +240,7 @@ module Tremendous
|
|
|
196
240
|
name == o.name &&
|
|
197
241
|
description == o.description &&
|
|
198
242
|
products == o.products &&
|
|
243
|
+
fee_charged_to == o.fee_charged_to &&
|
|
199
244
|
webpage_style == o.webpage_style &&
|
|
200
245
|
email_style == o.email_style
|
|
201
246
|
end
|
|
@@ -209,7 +254,7 @@ module Tremendous
|
|
|
209
254
|
# Calculates hash code according to all attributes.
|
|
210
255
|
# @return [Integer] Hash code
|
|
211
256
|
def hash
|
|
212
|
-
[id, name, description, products, webpage_style, email_style].hash
|
|
257
|
+
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
213
258
|
end
|
|
214
259
|
|
|
215
260
|
# Builds the object from hash
|
|
@@ -27,10 +27,35 @@ module Tremendous
|
|
|
27
27
|
# List of IDs of products (different gift cards, charity, etc.) that are available in this campaign.
|
|
28
28
|
attr_accessor :products
|
|
29
29
|
|
|
30
|
+
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
|
+
attr_accessor :fee_charged_to
|
|
32
|
+
|
|
30
33
|
attr_accessor :webpage_style
|
|
31
34
|
|
|
32
35
|
attr_accessor :email_style
|
|
33
36
|
|
|
37
|
+
class EnumAttributeValidator
|
|
38
|
+
attr_reader :datatype
|
|
39
|
+
attr_reader :allowable_values
|
|
40
|
+
|
|
41
|
+
def initialize(datatype, allowable_values)
|
|
42
|
+
@allowable_values = allowable_values.map do |value|
|
|
43
|
+
case datatype.to_s
|
|
44
|
+
when /Integer/i
|
|
45
|
+
value.to_i
|
|
46
|
+
when /Float/i
|
|
47
|
+
value.to_f
|
|
48
|
+
else
|
|
49
|
+
value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def valid?(value)
|
|
55
|
+
!value || allowable_values.include?(value)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
34
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
60
|
def self.attribute_map
|
|
36
61
|
{
|
|
@@ -38,6 +63,7 @@ module Tremendous
|
|
|
38
63
|
:'name' => :'name',
|
|
39
64
|
:'description' => :'description',
|
|
40
65
|
:'products' => :'products',
|
|
66
|
+
:'fee_charged_to' => :'fee_charged_to',
|
|
41
67
|
:'webpage_style' => :'webpage_style',
|
|
42
68
|
:'email_style' => :'email_style'
|
|
43
69
|
}
|
|
@@ -60,6 +86,7 @@ module Tremendous
|
|
|
60
86
|
:'name' => :'String',
|
|
61
87
|
:'description' => :'String',
|
|
62
88
|
:'products' => :'Array<String>',
|
|
89
|
+
:'fee_charged_to' => :'String',
|
|
63
90
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
64
91
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
65
92
|
}
|
|
@@ -69,6 +96,7 @@ module Tremendous
|
|
|
69
96
|
def self.openapi_nullable
|
|
70
97
|
Set.new([
|
|
71
98
|
:'description',
|
|
99
|
+
:'fee_charged_to',
|
|
72
100
|
])
|
|
73
101
|
end
|
|
74
102
|
|
|
@@ -106,6 +134,10 @@ module Tremendous
|
|
|
106
134
|
end
|
|
107
135
|
end
|
|
108
136
|
|
|
137
|
+
if attributes.key?(:'fee_charged_to')
|
|
138
|
+
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
139
|
+
end
|
|
140
|
+
|
|
109
141
|
if attributes.key?(:'webpage_style')
|
|
110
142
|
self.webpage_style = attributes[:'webpage_style']
|
|
111
143
|
end
|
|
@@ -133,6 +165,8 @@ module Tremendous
|
|
|
133
165
|
def valid?
|
|
134
166
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
167
|
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
168
|
+
fee_charged_to_validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
169
|
+
return false unless fee_charged_to_validator.valid?(@fee_charged_to)
|
|
136
170
|
true
|
|
137
171
|
end
|
|
138
172
|
|
|
@@ -151,6 +185,16 @@ module Tremendous
|
|
|
151
185
|
@id = id
|
|
152
186
|
end
|
|
153
187
|
|
|
188
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
189
|
+
# @param [Object] fee_charged_to Object to be assigned
|
|
190
|
+
def fee_charged_to=(fee_charged_to)
|
|
191
|
+
validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
192
|
+
unless validator.valid?(fee_charged_to)
|
|
193
|
+
fail ArgumentError, "invalid value for \"fee_charged_to\", must be one of #{validator.allowable_values}."
|
|
194
|
+
end
|
|
195
|
+
@fee_charged_to = fee_charged_to
|
|
196
|
+
end
|
|
197
|
+
|
|
154
198
|
# Checks equality by comparing each attribute.
|
|
155
199
|
# @param [Object] Object to be compared
|
|
156
200
|
def ==(o)
|
|
@@ -160,6 +204,7 @@ module Tremendous
|
|
|
160
204
|
name == o.name &&
|
|
161
205
|
description == o.description &&
|
|
162
206
|
products == o.products &&
|
|
207
|
+
fee_charged_to == o.fee_charged_to &&
|
|
163
208
|
webpage_style == o.webpage_style &&
|
|
164
209
|
email_style == o.email_style
|
|
165
210
|
end
|
|
@@ -173,7 +218,7 @@ module Tremendous
|
|
|
173
218
|
# Calculates hash code according to all attributes.
|
|
174
219
|
# @return [Integer] Hash code
|
|
175
220
|
def hash
|
|
176
|
-
[id, name, description, products, webpage_style, email_style].hash
|
|
221
|
+
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
177
222
|
end
|
|
178
223
|
|
|
179
224
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ module Tremendous
|
|
|
24
24
|
# URL of the website of that organization
|
|
25
25
|
attr_accessor :website
|
|
26
26
|
|
|
27
|
+
# Currency used for this organization's balances, orders, and transactions.
|
|
28
|
+
attr_accessor :currency_code
|
|
29
|
+
|
|
27
30
|
# Status of the organization. Organizations need to be approved to be able to use them to send out rewards.
|
|
28
31
|
attr_accessor :status
|
|
29
32
|
|
|
@@ -58,6 +61,7 @@ module Tremendous
|
|
|
58
61
|
:'id' => :'id',
|
|
59
62
|
:'name' => :'name',
|
|
60
63
|
:'website' => :'website',
|
|
64
|
+
:'currency_code' => :'currency_code',
|
|
61
65
|
:'status' => :'status',
|
|
62
66
|
:'created_at' => :'created_at'
|
|
63
67
|
}
|
|
@@ -79,6 +83,7 @@ module Tremendous
|
|
|
79
83
|
:'id' => :'String',
|
|
80
84
|
:'name' => :'String',
|
|
81
85
|
:'website' => :'String',
|
|
86
|
+
:'currency_code' => :'String',
|
|
82
87
|
:'status' => :'String',
|
|
83
88
|
:'created_at' => :'Date'
|
|
84
89
|
}
|
|
@@ -122,6 +127,10 @@ module Tremendous
|
|
|
122
127
|
self.website = nil
|
|
123
128
|
end
|
|
124
129
|
|
|
130
|
+
if attributes.key?(:'currency_code')
|
|
131
|
+
self.currency_code = attributes[:'currency_code']
|
|
132
|
+
end
|
|
133
|
+
|
|
125
134
|
if attributes.key?(:'status')
|
|
126
135
|
self.status = attributes[:'status']
|
|
127
136
|
end
|
|
@@ -217,6 +226,7 @@ module Tremendous
|
|
|
217
226
|
id == o.id &&
|
|
218
227
|
name == o.name &&
|
|
219
228
|
website == o.website &&
|
|
229
|
+
currency_code == o.currency_code &&
|
|
220
230
|
status == o.status &&
|
|
221
231
|
created_at == o.created_at
|
|
222
232
|
end
|
|
@@ -230,7 +240,7 @@ module Tremendous
|
|
|
230
240
|
# Calculates hash code according to all attributes.
|
|
231
241
|
# @return [Integer] Hash code
|
|
232
242
|
def hash
|
|
233
|
-
[id, name, website, status, created_at].hash
|
|
243
|
+
[id, name, website, currency_code, status, created_at].hash
|
|
234
244
|
end
|
|
235
245
|
|
|
236
246
|
# Builds the object from hash
|
|
@@ -25,16 +25,42 @@ module Tremendous
|
|
|
25
25
|
# List of IDs of products (different gift cards, charity, etc.) that are available in this campaign.
|
|
26
26
|
attr_accessor :products
|
|
27
27
|
|
|
28
|
+
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
29
|
+
attr_accessor :fee_charged_to
|
|
30
|
+
|
|
28
31
|
attr_accessor :webpage_style
|
|
29
32
|
|
|
30
33
|
attr_accessor :email_style
|
|
31
34
|
|
|
35
|
+
class EnumAttributeValidator
|
|
36
|
+
attr_reader :datatype
|
|
37
|
+
attr_reader :allowable_values
|
|
38
|
+
|
|
39
|
+
def initialize(datatype, allowable_values)
|
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
|
41
|
+
case datatype.to_s
|
|
42
|
+
when /Integer/i
|
|
43
|
+
value.to_i
|
|
44
|
+
when /Float/i
|
|
45
|
+
value.to_f
|
|
46
|
+
else
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def valid?(value)
|
|
53
|
+
!value || allowable_values.include?(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
32
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
58
|
def self.attribute_map
|
|
34
59
|
{
|
|
35
60
|
:'name' => :'name',
|
|
36
61
|
:'description' => :'description',
|
|
37
62
|
:'products' => :'products',
|
|
63
|
+
:'fee_charged_to' => :'fee_charged_to',
|
|
38
64
|
:'webpage_style' => :'webpage_style',
|
|
39
65
|
:'email_style' => :'email_style'
|
|
40
66
|
}
|
|
@@ -56,6 +82,7 @@ module Tremendous
|
|
|
56
82
|
:'name' => :'String',
|
|
57
83
|
:'description' => :'String',
|
|
58
84
|
:'products' => :'Array<String>',
|
|
85
|
+
:'fee_charged_to' => :'String',
|
|
59
86
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
60
87
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
61
88
|
}
|
|
@@ -65,6 +92,7 @@ module Tremendous
|
|
|
65
92
|
def self.openapi_nullable
|
|
66
93
|
Set.new([
|
|
67
94
|
:'description',
|
|
95
|
+
:'fee_charged_to',
|
|
68
96
|
])
|
|
69
97
|
end
|
|
70
98
|
|
|
@@ -104,6 +132,10 @@ module Tremendous
|
|
|
104
132
|
self.products = nil
|
|
105
133
|
end
|
|
106
134
|
|
|
135
|
+
if attributes.key?(:'fee_charged_to')
|
|
136
|
+
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
137
|
+
end
|
|
138
|
+
|
|
107
139
|
if attributes.key?(:'webpage_style')
|
|
108
140
|
self.webpage_style = attributes[:'webpage_style']
|
|
109
141
|
end
|
|
@@ -135,6 +167,8 @@ module Tremendous
|
|
|
135
167
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
168
|
return false if @name.nil?
|
|
137
169
|
return false if @products.nil?
|
|
170
|
+
fee_charged_to_validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
171
|
+
return false unless fee_charged_to_validator.valid?(@fee_charged_to)
|
|
138
172
|
true
|
|
139
173
|
end
|
|
140
174
|
|
|
@@ -158,6 +192,16 @@ module Tremendous
|
|
|
158
192
|
@products = products
|
|
159
193
|
end
|
|
160
194
|
|
|
195
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
196
|
+
# @param [Object] fee_charged_to Object to be assigned
|
|
197
|
+
def fee_charged_to=(fee_charged_to)
|
|
198
|
+
validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
199
|
+
unless validator.valid?(fee_charged_to)
|
|
200
|
+
fail ArgumentError, "invalid value for \"fee_charged_to\", must be one of #{validator.allowable_values}."
|
|
201
|
+
end
|
|
202
|
+
@fee_charged_to = fee_charged_to
|
|
203
|
+
end
|
|
204
|
+
|
|
161
205
|
# Checks equality by comparing each attribute.
|
|
162
206
|
# @param [Object] Object to be compared
|
|
163
207
|
def ==(o)
|
|
@@ -166,6 +210,7 @@ module Tremendous
|
|
|
166
210
|
name == o.name &&
|
|
167
211
|
description == o.description &&
|
|
168
212
|
products == o.products &&
|
|
213
|
+
fee_charged_to == o.fee_charged_to &&
|
|
169
214
|
webpage_style == o.webpage_style &&
|
|
170
215
|
email_style == o.email_style
|
|
171
216
|
end
|
|
@@ -179,7 +224,7 @@ module Tremendous
|
|
|
179
224
|
# Calculates hash code according to all attributes.
|
|
180
225
|
# @return [Integer] Hash code
|
|
181
226
|
def hash
|
|
182
|
-
[name, description, products, webpage_style, email_style].hash
|
|
227
|
+
[name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
183
228
|
end
|
|
184
229
|
|
|
185
230
|
# Builds the object from hash
|
|
@@ -18,10 +18,22 @@ module Tremendous
|
|
|
18
18
|
# The ID of the connected organization.
|
|
19
19
|
attr_accessor :connected_organization_id
|
|
20
20
|
|
|
21
|
+
# The name associated with the user in your systems.
|
|
22
|
+
attr_accessor :external_name
|
|
23
|
+
|
|
24
|
+
# The email associated with the user in your systems.
|
|
25
|
+
attr_accessor :external_email
|
|
26
|
+
|
|
27
|
+
# The role ID to assign to the member within the organization. Only applicable when the connected organization is already linked to an existing Tremendous organization.
|
|
28
|
+
attr_accessor :role
|
|
29
|
+
|
|
21
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
31
|
def self.attribute_map
|
|
23
32
|
{
|
|
24
|
-
:'connected_organization_id' => :'connected_organization_id'
|
|
33
|
+
:'connected_organization_id' => :'connected_organization_id',
|
|
34
|
+
:'external_name' => :'external_name',
|
|
35
|
+
:'external_email' => :'external_email',
|
|
36
|
+
:'role' => :'role'
|
|
25
37
|
}
|
|
26
38
|
end
|
|
27
39
|
|
|
@@ -38,7 +50,10 @@ module Tremendous
|
|
|
38
50
|
# Attribute type mapping.
|
|
39
51
|
def self.openapi_types
|
|
40
52
|
{
|
|
41
|
-
:'connected_organization_id' => :'String'
|
|
53
|
+
:'connected_organization_id' => :'String',
|
|
54
|
+
:'external_name' => :'String',
|
|
55
|
+
:'external_email' => :'String',
|
|
56
|
+
:'role' => :'String'
|
|
42
57
|
}
|
|
43
58
|
end
|
|
44
59
|
|
|
@@ -69,6 +84,18 @@ module Tremendous
|
|
|
69
84
|
else
|
|
70
85
|
self.connected_organization_id = nil
|
|
71
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'external_name')
|
|
89
|
+
self.external_name = attributes[:'external_name']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'external_email')
|
|
93
|
+
self.external_email = attributes[:'external_email']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'role')
|
|
97
|
+
self.role = attributes[:'role']
|
|
98
|
+
end
|
|
72
99
|
end
|
|
73
100
|
|
|
74
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -106,7 +133,10 @@ module Tremendous
|
|
|
106
133
|
def ==(o)
|
|
107
134
|
return true if self.equal?(o)
|
|
108
135
|
self.class == o.class &&
|
|
109
|
-
connected_organization_id == o.connected_organization_id
|
|
136
|
+
connected_organization_id == o.connected_organization_id &&
|
|
137
|
+
external_name == o.external_name &&
|
|
138
|
+
external_email == o.external_email &&
|
|
139
|
+
role == o.role
|
|
110
140
|
end
|
|
111
141
|
|
|
112
142
|
# @see the `==` method
|
|
@@ -118,7 +148,7 @@ module Tremendous
|
|
|
118
148
|
# Calculates hash code according to all attributes.
|
|
119
149
|
# @return [Integer] Hash code
|
|
120
150
|
def hash
|
|
121
|
-
[connected_organization_id].hash
|
|
151
|
+
[connected_organization_id, external_name, external_email, role].hash
|
|
122
152
|
end
|
|
123
153
|
|
|
124
154
|
# Builds the object from hash
|
|
@@ -25,7 +25,7 @@ module Tremendous
|
|
|
25
25
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
26
26
|
attr_accessor :campaign_id
|
|
27
27
|
|
|
28
|
-
# Date the order
|
|
28
|
+
# Date the order was created
|
|
29
29
|
attr_accessor :created_at
|
|
30
30
|
|
|
31
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> <tr> <td> <code> PENDING SETTLEMENT </code> </td> <td> The order has been created but the funds are being held until the settlement window clears. </td> </tr> </tbody> </table>
|