tremendous_ruby 5.4.0 → 5.5.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/api/tremendous_api.rb +55 -55
- data/lib/tremendous/api_client.rb +31 -26
- data/lib/tremendous/api_error.rb +1 -1
- data/lib/tremendous/configuration.rb +2 -2
- data/lib/tremendous/models/allow_email.rb +1 -1
- data/lib/tremendous/models/allow_email1.rb +1 -1
- data/lib/tremendous/models/allow_ip.rb +1 -1
- data/lib/tremendous/models/allow_ip1.rb +1 -1
- data/lib/tremendous/models/balance_transaction.rb +37 -2
- data/lib/tremendous/models/base_order_for_create.rb +1 -1
- data/lib/tremendous/models/campaign.rb +1 -1
- data/lib/tremendous/models/campaign_base.rb +1 -1
- data/lib/tremendous/models/channel.rb +45 -0
- data/lib/tremendous/models/create_api_key200_response.rb +1 -1
- data/lib/tremendous/models/create_campaign201_response.rb +1 -1
- data/lib/tremendous/models/create_campaign_request.rb +1 -1
- data/lib/tremendous/models/create_invoice.rb +1 -1
- data/lib/tremendous/models/create_invoice200_response.rb +1 -1
- data/lib/tremendous/models/create_invoice_request.rb +1 -1
- data/lib/tremendous/models/create_member.rb +1 -1
- data/lib/tremendous/models/create_member200_response.rb +1 -1
- data/lib/tremendous/models/create_member_request.rb +1 -1
- data/lib/tremendous/models/create_order200_response.rb +1 -1
- data/lib/tremendous/models/create_order_request.rb +1 -1
- data/lib/tremendous/models/create_organization.rb +1 -1
- data/lib/tremendous/models/create_organization200_response.rb +1 -1
- data/lib/tremendous/models/create_organization200_response_organization.rb +1 -1
- data/lib/tremendous/models/create_organization_request.rb +1 -1
- data/lib/tremendous/models/create_organization_request_copy_settings.rb +1 -1
- data/lib/tremendous/models/create_public_key.rb +1 -1
- data/lib/tremendous/models/create_public_key200_response.rb +1 -1
- data/lib/tremendous/models/create_public_key_request.rb +1 -1
- data/lib/tremendous/models/create_webhook200_response.rb +1 -1
- data/lib/tremendous/models/create_webhook_request.rb +1 -1
- data/lib/tremendous/models/currency_codes.rb +1 -1
- data/lib/tremendous/models/custom_field.rb +1 -1
- data/lib/tremendous/models/delete_fraud_rule200_response.rb +1 -1
- data/lib/tremendous/models/delivery_details.rb +1 -1
- data/lib/tremendous/models/delivery_method.rb +1 -1
- data/lib/tremendous/models/delivery_status.rb +1 -1
- data/lib/tremendous/models/error_model.rb +1 -1
- data/lib/tremendous/models/field.rb +1 -1
- data/lib/tremendous/models/fraud_config_allow_email.rb +1 -1
- data/lib/tremendous/models/fraud_config_country.rb +1 -1
- data/lib/tremendous/models/fraud_config_country_update_list.rb +1 -1
- data/lib/tremendous/models/fraud_config_ip.rb +1 -1
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +1 -1
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +1 -1
- data/lib/tremendous/models/fraud_config_review_email.rb +1 -1
- data/lib/tremendous/models/fraud_generic_response.rb +1 -1
- data/lib/tremendous/models/fraud_review.rb +2 -2
- data/lib/tremendous/models/fraud_review_geo.rb +1 -1
- data/lib/tremendous/models/fraud_review_list_item.rb +2 -2
- data/lib/tremendous/models/fraud_review_reason.rb +1 -1
- data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
- data/lib/tremendous/models/fraud_review_related_rewards.rb +1 -1
- data/lib/tremendous/models/fraud_review_status.rb +1 -1
- data/lib/tremendous/models/fraud_rule200_response.rb +1 -1
- data/lib/tremendous/models/fraud_rule400_response.rb +1 -1
- data/lib/tremendous/models/fraud_rule422_response.rb +1 -1
- data/lib/tremendous/models/fraud_rule_request.rb +1 -1
- data/lib/tremendous/models/fraud_rule_request_config.rb +1 -1
- data/lib/tremendous/models/fraud_rule_type.rb +1 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +1 -1
- data/lib/tremendous/models/funding_source.rb +1 -1
- data/lib/tremendous/models/generate_reward_link200_response.rb +1 -1
- data/lib/tremendous/models/generate_reward_link200_response_reward.rb +1 -1
- data/lib/tremendous/models/generate_reward_link403_response.rb +1 -1
- data/lib/tremendous/models/generate_reward_token200_response.rb +1 -1
- data/lib/tremendous/models/generate_reward_token200_response_reward.rb +1 -1
- data/lib/tremendous/models/get_fraud_review200_response.rb +1 -1
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +1 -1
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +1 -1
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +1 -1
- data/lib/tremendous/models/get_funding_source200_response.rb +1 -1
- data/lib/tremendous/models/get_member200_response.rb +1 -1
- data/lib/tremendous/models/get_member200_response_member.rb +1 -1
- data/lib/tremendous/models/get_member200_response_member_events_inner.rb +1 -1
- data/lib/tremendous/models/get_organization200_response.rb +1 -1
- data/lib/tremendous/models/get_product_response.rb +1 -1
- data/lib/tremendous/models/get_reward200_response.rb +1 -1
- data/lib/tremendous/models/invoice.rb +1 -1
- data/lib/tremendous/models/list_balance_transactions200_response.rb +16 -9
- data/lib/tremendous/models/{list_balance_transactions200_response_invoices_inner.rb → list_balance_transactions200_response_transactions_inner.rb} +40 -5
- data/lib/tremendous/models/list_campaigns200_response.rb +1 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +1 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +1 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +1 -1
- data/lib/tremendous/models/list_fields200_response.rb +1 -1
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +1 -1
- data/lib/tremendous/models/list_forex_response.rb +1 -1
- data/lib/tremendous/models/list_fraud_reviews200_response.rb +1 -1
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +1 -1
- data/lib/tremendous/models/list_fraud_rules200_response.rb +1 -1
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +1 -1
- data/lib/tremendous/models/list_funding_sources200_response.rb +1 -1
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +1 -1
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +1 -1
- data/lib/tremendous/models/list_invoices200_response.rb +1 -1
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +1 -1
- data/lib/tremendous/models/list_members200_response.rb +1 -1
- data/lib/tremendous/models/list_members200_response_members_inner.rb +1 -1
- data/lib/tremendous/models/list_orders200_response.rb +1 -1
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +32 -8
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +1 -1
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +1 -1
- data/lib/tremendous/models/list_organizations200_response.rb +1 -1
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +1 -1
- data/lib/tremendous/models/list_products_response.rb +1 -1
- data/lib/tremendous/models/list_products_response_products_inner.rb +1 -1
- data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +1 -1
- data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +1 -1
- data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +1 -1
- data/lib/tremendous/models/list_rewards401_response.rb +1 -1
- data/lib/tremendous/models/list_rewards401_response_errors.rb +1 -1
- data/lib/tremendous/models/list_rewards429_response.rb +1 -1
- data/lib/tremendous/models/list_roles200_response.rb +1 -1
- data/lib/tremendous/models/list_roles200_response_roles_inner.rb +1 -1
- data/lib/tremendous/models/list_webhook_events200_response.rb +1 -1
- data/lib/tremendous/models/list_webhooks200_response.rb +1 -1
- data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +1 -1
- data/lib/tremendous/models/member.rb +1 -1
- data/lib/tremendous/models/member_base.rb +1 -1
- data/lib/tremendous/models/member_with_events.rb +1 -1
- data/lib/tremendous/models/member_without_events.rb +1 -1
- data/lib/tremendous/models/order.rb +32 -8
- data/lib/tremendous/models/order_base.rb +24 -2
- data/lib/tremendous/models/order_base_payment.rb +1 -1
- data/lib/tremendous/models/order_status.rb +1 -1
- data/lib/tremendous/models/order_without_link.rb +32 -8
- data/lib/tremendous/models/{order_without_link_reward.rb → order_without_link_rewards_inner.rb} +4 -4
- data/lib/tremendous/models/organization.rb +1 -1
- data/lib/tremendous/models/payment_details.rb +1 -1
- data/lib/tremendous/models/payment_details_refund.rb +1 -1
- data/lib/tremendous/models/product.rb +1 -1
- data/lib/tremendous/models/public_key.rb +1 -1
- data/lib/tremendous/models/public_keys_response.rb +1 -1
- data/lib/tremendous/models/public_keys_response_public_keys_inner.rb +1 -1
- data/lib/tremendous/models/recipient.rb +1 -1
- data/lib/tremendous/models/refund_details.rb +1 -1
- data/lib/tremendous/models/resend_reward422_response.rb +1 -1
- data/lib/tremendous/models/review_country.rb +1 -1
- data/lib/tremendous/models/review_country1.rb +1 -1
- data/lib/tremendous/models/review_email.rb +1 -1
- data/lib/tremendous/models/review_email1.rb +1 -1
- data/lib/tremendous/models/review_ip.rb +1 -1
- data/lib/tremendous/models/review_ip1.rb +1 -1
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +1 -1
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +1 -1
- data/lib/tremendous/models/reward.rb +1 -1
- data/lib/tremendous/models/reward_base.rb +1 -1
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/reward_for_order_create.rb +1 -1
- data/lib/tremendous/models/reward_link.rb +1 -1
- data/lib/tremendous/models/reward_token.rb +1 -1
- data/lib/tremendous/models/reward_value.rb +1 -1
- data/lib/tremendous/models/reward_without_link.rb +1 -1
- data/lib/tremendous/models/reward_without_link_delivery.rb +1 -1
- data/lib/tremendous/models/role.rb +1 -1
- data/lib/tremendous/models/simulate_webhook_request.rb +1 -1
- data/lib/tremendous/models/single_reward_order.rb +1 -1
- data/lib/tremendous/models/single_reward_order1.rb +1 -1
- data/lib/tremendous/models/single_reward_order1_payment.rb +1 -1
- data/lib/tremendous/models/single_reward_order1_reward.rb +1 -1
- data/lib/tremendous/models/single_reward_order1_reward_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/single_reward_order1_reward_delivery.rb +1 -1
- data/lib/tremendous/models/single_reward_order_reward.rb +1 -1
- data/lib/tremendous/models/single_reward_order_without_link.rb +1 -1
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +32 -8
- data/lib/tremendous/models/test_public_key.rb +1 -1
- data/lib/tremendous/models/test_public_key_request.rb +1 -1
- data/lib/tremendous/models/update_campaign.rb +1 -1
- data/lib/tremendous/models/update_campaign_request.rb +1 -1
- data/lib/tremendous/models/update_fraud_rule_list200_response.rb +1 -1
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +1 -1
- data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +1 -1
- data/lib/tremendous/models/webhook.rb +1 -1
- data/lib/tremendous/models/webhook_post.rb +1 -1
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +4 -3
- metadata +5 -4
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.8.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -31,12 +31,15 @@ module Tremendous
|
|
|
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> 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>
|
|
32
32
|
attr_accessor :status
|
|
33
33
|
|
|
34
|
+
# Name of the channel in which the order was created
|
|
35
|
+
attr_accessor :channel
|
|
36
|
+
|
|
34
37
|
attr_accessor :payment
|
|
35
38
|
|
|
36
39
|
# The ID for the invoice associated with this order
|
|
37
40
|
attr_accessor :invoice_id
|
|
38
41
|
|
|
39
|
-
attr_accessor :
|
|
42
|
+
attr_accessor :rewards
|
|
40
43
|
|
|
41
44
|
class EnumAttributeValidator
|
|
42
45
|
attr_reader :datatype
|
|
@@ -68,9 +71,10 @@ module Tremendous
|
|
|
68
71
|
:'campaign_id' => :'campaign_id',
|
|
69
72
|
:'created_at' => :'created_at',
|
|
70
73
|
:'status' => :'status',
|
|
74
|
+
:'channel' => :'channel',
|
|
71
75
|
:'payment' => :'payment',
|
|
72
76
|
:'invoice_id' => :'invoice_id',
|
|
73
|
-
:'
|
|
77
|
+
:'rewards' => :'rewards'
|
|
74
78
|
}
|
|
75
79
|
end
|
|
76
80
|
|
|
@@ -87,9 +91,10 @@ module Tremendous
|
|
|
87
91
|
:'campaign_id' => :'String',
|
|
88
92
|
:'created_at' => :'Time',
|
|
89
93
|
:'status' => :'String',
|
|
94
|
+
:'channel' => :'String',
|
|
90
95
|
:'payment' => :'OrderBasePayment',
|
|
91
96
|
:'invoice_id' => :'String',
|
|
92
|
-
:'
|
|
97
|
+
:'rewards' => :'Array<OrderWithoutLinkRewardsInner>'
|
|
93
98
|
}
|
|
94
99
|
end
|
|
95
100
|
|
|
@@ -142,6 +147,10 @@ module Tremendous
|
|
|
142
147
|
self.status = nil
|
|
143
148
|
end
|
|
144
149
|
|
|
150
|
+
if attributes.key?(:'channel')
|
|
151
|
+
self.channel = attributes[:'channel']
|
|
152
|
+
end
|
|
153
|
+
|
|
145
154
|
if attributes.key?(:'payment')
|
|
146
155
|
self.payment = attributes[:'payment']
|
|
147
156
|
end
|
|
@@ -150,8 +159,10 @@ module Tremendous
|
|
|
150
159
|
self.invoice_id = attributes[:'invoice_id']
|
|
151
160
|
end
|
|
152
161
|
|
|
153
|
-
if attributes.key?(:'
|
|
154
|
-
|
|
162
|
+
if attributes.key?(:'rewards')
|
|
163
|
+
if (value = attributes[:'rewards']).is_a?(Array)
|
|
164
|
+
self.rewards = value
|
|
165
|
+
end
|
|
155
166
|
end
|
|
156
167
|
end
|
|
157
168
|
|
|
@@ -196,6 +207,8 @@ module Tremendous
|
|
|
196
207
|
return false if @status.nil?
|
|
197
208
|
status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
|
|
198
209
|
return false unless status_validator.valid?(@status)
|
|
210
|
+
channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
211
|
+
return false unless channel_validator.valid?(@channel)
|
|
199
212
|
true
|
|
200
213
|
end
|
|
201
214
|
|
|
@@ -235,6 +248,16 @@ module Tremendous
|
|
|
235
248
|
@status = status
|
|
236
249
|
end
|
|
237
250
|
|
|
251
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
252
|
+
# @param [Object] channel Object to be assigned
|
|
253
|
+
def channel=(channel)
|
|
254
|
+
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
255
|
+
unless validator.valid?(channel)
|
|
256
|
+
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
257
|
+
end
|
|
258
|
+
@channel = channel
|
|
259
|
+
end
|
|
260
|
+
|
|
238
261
|
# Checks equality by comparing each attribute.
|
|
239
262
|
# @param [Object] Object to be compared
|
|
240
263
|
def ==(o)
|
|
@@ -245,9 +268,10 @@ module Tremendous
|
|
|
245
268
|
campaign_id == o.campaign_id &&
|
|
246
269
|
created_at == o.created_at &&
|
|
247
270
|
status == o.status &&
|
|
271
|
+
channel == o.channel &&
|
|
248
272
|
payment == o.payment &&
|
|
249
273
|
invoice_id == o.invoice_id &&
|
|
250
|
-
|
|
274
|
+
rewards == o.rewards
|
|
251
275
|
end
|
|
252
276
|
|
|
253
277
|
# @see the `==` method
|
|
@@ -259,7 +283,7 @@ module Tremendous
|
|
|
259
283
|
# Calculates hash code according to all attributes.
|
|
260
284
|
# @return [Integer] Hash code
|
|
261
285
|
def hash
|
|
262
|
-
[id, external_id, campaign_id, created_at, status, payment, invoice_id,
|
|
286
|
+
[id, external_id, campaign_id, created_at, status, channel, payment, invoice_id, rewards].hash
|
|
263
287
|
end
|
|
264
288
|
|
|
265
289
|
# Builds the object from hash
|
data/lib/tremendous/models/{order_without_link_reward.rb → order_without_link_rewards_inner.rb}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.8.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified.
|
|
18
|
-
class
|
|
18
|
+
class OrderWithoutLinkRewardsInner
|
|
19
19
|
# Tremendous ID of the reward
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
@@ -90,13 +90,13 @@ module Tremendous
|
|
|
90
90
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
91
|
def initialize(attributes = {})
|
|
92
92
|
if (!attributes.is_a?(Hash))
|
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::OrderWithoutLinkRewardsInner` initialize method"
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
97
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
98
98
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
99
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::OrderWithoutLinkRewardsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
100
100
|
end
|
|
101
101
|
h[k.to_sym] = v
|
|
102
102
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.8.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -31,12 +31,15 @@ module Tremendous
|
|
|
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> 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>
|
|
32
32
|
attr_accessor :status
|
|
33
33
|
|
|
34
|
+
# Name of the channel in which the order was created
|
|
35
|
+
attr_accessor :channel
|
|
36
|
+
|
|
34
37
|
attr_accessor :payment
|
|
35
38
|
|
|
36
39
|
# The ID for the invoice associated with this order
|
|
37
40
|
attr_accessor :invoice_id
|
|
38
41
|
|
|
39
|
-
attr_accessor :
|
|
42
|
+
attr_accessor :rewards
|
|
40
43
|
|
|
41
44
|
class EnumAttributeValidator
|
|
42
45
|
attr_reader :datatype
|
|
@@ -68,9 +71,10 @@ module Tremendous
|
|
|
68
71
|
:'campaign_id' => :'campaign_id',
|
|
69
72
|
:'created_at' => :'created_at',
|
|
70
73
|
:'status' => :'status',
|
|
74
|
+
:'channel' => :'channel',
|
|
71
75
|
:'payment' => :'payment',
|
|
72
76
|
:'invoice_id' => :'invoice_id',
|
|
73
|
-
:'
|
|
77
|
+
:'rewards' => :'rewards'
|
|
74
78
|
}
|
|
75
79
|
end
|
|
76
80
|
|
|
@@ -87,9 +91,10 @@ module Tremendous
|
|
|
87
91
|
:'campaign_id' => :'String',
|
|
88
92
|
:'created_at' => :'Time',
|
|
89
93
|
:'status' => :'String',
|
|
94
|
+
:'channel' => :'String',
|
|
90
95
|
:'payment' => :'OrderBasePayment',
|
|
91
96
|
:'invoice_id' => :'String',
|
|
92
|
-
:'
|
|
97
|
+
:'rewards' => :'Array<OrderWithoutLinkRewardsInner>'
|
|
93
98
|
}
|
|
94
99
|
end
|
|
95
100
|
|
|
@@ -142,6 +147,10 @@ module Tremendous
|
|
|
142
147
|
self.status = nil
|
|
143
148
|
end
|
|
144
149
|
|
|
150
|
+
if attributes.key?(:'channel')
|
|
151
|
+
self.channel = attributes[:'channel']
|
|
152
|
+
end
|
|
153
|
+
|
|
145
154
|
if attributes.key?(:'payment')
|
|
146
155
|
self.payment = attributes[:'payment']
|
|
147
156
|
end
|
|
@@ -150,8 +159,10 @@ module Tremendous
|
|
|
150
159
|
self.invoice_id = attributes[:'invoice_id']
|
|
151
160
|
end
|
|
152
161
|
|
|
153
|
-
if attributes.key?(:'
|
|
154
|
-
|
|
162
|
+
if attributes.key?(:'rewards')
|
|
163
|
+
if (value = attributes[:'rewards']).is_a?(Array)
|
|
164
|
+
self.rewards = value
|
|
165
|
+
end
|
|
155
166
|
end
|
|
156
167
|
end
|
|
157
168
|
|
|
@@ -196,6 +207,8 @@ module Tremendous
|
|
|
196
207
|
return false if @status.nil?
|
|
197
208
|
status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
|
|
198
209
|
return false unless status_validator.valid?(@status)
|
|
210
|
+
channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
211
|
+
return false unless channel_validator.valid?(@channel)
|
|
199
212
|
true
|
|
200
213
|
end
|
|
201
214
|
|
|
@@ -235,6 +248,16 @@ module Tremendous
|
|
|
235
248
|
@status = status
|
|
236
249
|
end
|
|
237
250
|
|
|
251
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
252
|
+
# @param [Object] channel Object to be assigned
|
|
253
|
+
def channel=(channel)
|
|
254
|
+
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
255
|
+
unless validator.valid?(channel)
|
|
256
|
+
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
257
|
+
end
|
|
258
|
+
@channel = channel
|
|
259
|
+
end
|
|
260
|
+
|
|
238
261
|
# Checks equality by comparing each attribute.
|
|
239
262
|
# @param [Object] Object to be compared
|
|
240
263
|
def ==(o)
|
|
@@ -245,9 +268,10 @@ module Tremendous
|
|
|
245
268
|
campaign_id == o.campaign_id &&
|
|
246
269
|
created_at == o.created_at &&
|
|
247
270
|
status == o.status &&
|
|
271
|
+
channel == o.channel &&
|
|
248
272
|
payment == o.payment &&
|
|
249
273
|
invoice_id == o.invoice_id &&
|
|
250
|
-
|
|
274
|
+
rewards == o.rewards
|
|
251
275
|
end
|
|
252
276
|
|
|
253
277
|
# @see the `==` method
|
|
@@ -259,7 +283,7 @@ module Tremendous
|
|
|
259
283
|
# Calculates hash code according to all attributes.
|
|
260
284
|
# @return [Integer] Hash code
|
|
261
285
|
def hash
|
|
262
|
-
[id, external_id, campaign_id, created_at, status, payment, invoice_id,
|
|
286
|
+
[id, external_id, campaign_id, created_at, status, channel, payment, invoice_id, rewards].hash
|
|
263
287
|
end
|
|
264
288
|
|
|
265
289
|
# Builds the object from hash
|