tremendous_ruby 5.3.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 +618 -56
- 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 +225 -0
- data/lib/tremendous/models/allow_email1.rb +225 -0
- data/lib/tremendous/models/allow_ip.rb +225 -0
- data/lib/tremendous/models/allow_ip1.rb +225 -0
- data/lib/tremendous/models/balance_transaction.rb +37 -2
- data/lib/tremendous/models/base_order_for_create.rb +232 -0
- 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 +2 -2
- data/lib/tremendous/models/create_order_request.rb +74 -218
- 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 +222 -0
- 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 +224 -0
- data/lib/tremendous/models/fraud_config_country.rb +275 -0
- data/lib/tremendous/models/fraud_config_country_update_list.rb +224 -0
- data/lib/tremendous/models/fraud_config_ip.rb +224 -0
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +292 -0
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +292 -0
- data/lib/tremendous/models/fraud_config_review_email.rb +229 -0
- data/lib/tremendous/models/fraud_generic_response.rb +222 -0
- data/lib/tremendous/models/fraud_review.rb +351 -0
- data/lib/tremendous/models/fraud_review_geo.rb +235 -0
- data/lib/tremendous/models/{reward_with_link_delivery.rb → fraud_review_list_item.rb} +27 -52
- data/lib/tremendous/models/fraud_review_reason.rb +58 -0
- data/lib/tremendous/models/fraud_review_redemption_method.rb +44 -0
- data/lib/tremendous/models/fraud_review_related_rewards.rb +304 -0
- data/lib/tremendous/models/fraud_review_status.rb +41 -0
- data/lib/tremendous/models/fraud_rule200_response.rb +222 -0
- data/lib/tremendous/models/fraud_rule400_response.rb +221 -0
- data/lib/tremendous/models/fraud_rule422_response.rb +221 -0
- data/lib/tremendous/models/fraud_rule_request.rb +214 -0
- data/lib/tremendous/models/fraud_rule_request_config.rb +110 -0
- data/lib/tremendous/models/fraud_rule_type.rb +49 -0
- data/lib/tremendous/models/fraud_rules_list_item.rb +261 -0
- 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 +221 -0
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +351 -0
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +236 -0
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +305 -0
- 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 +3 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +2 -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 +223 -0
- data/lib/tremendous/models/{delivery_details_with_link.rb → list_fraud_reviews200_response_fraud_reviews_inner.rb} +27 -52
- data/lib/tremendous/models/list_fraud_rules200_response.rb +223 -0
- data/lib/tremendous/models/{create_order200_response_order_rewards_inner_delivery.rb → list_fraud_rules200_response_fraud_rules_inner.rb} +29 -64
- 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 -22
- 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 +2 -7
- 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 -25
- 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 +2 -2
- data/lib/tremendous/models/public_keys_response.rb +1 -1
- data/lib/tremendous/models/public_keys_response_public_keys_inner.rb +2 -2
- 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 +276 -0
- data/lib/tremendous/models/review_country1.rb +225 -0
- data/lib/tremendous/models/review_email.rb +230 -0
- data/lib/tremendous/models/review_email1.rb +230 -0
- data/lib/tremendous/models/review_ip.rb +225 -0
- data/lib/tremendous/models/review_ip1.rb +225 -0
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +293 -0
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +293 -0
- data/lib/tremendous/models/reward.rb +1 -22
- data/lib/tremendous/models/reward_base.rb +1 -22
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/reward_for_order_create.rb +2 -23
- 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 +2 -7
- data/lib/tremendous/models/reward_without_link.rb +1 -22
- 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/{order_for_create.rb → single_reward_order.rb} +7 -13
- data/lib/tremendous/models/single_reward_order1.rb +242 -0
- data/lib/tremendous/models/{create_order_request_payment.rb → single_reward_order1_payment.rb} +4 -4
- data/lib/tremendous/models/{create_order_request_reward.rb → single_reward_order1_reward.rb} +6 -27
- data/lib/tremendous/models/{create_order_request_reward_custom_fields_inner.rb → single_reward_order1_reward_custom_fields_inner.rb} +4 -4
- data/lib/tremendous/models/{create_order_request_reward_delivery.rb → single_reward_order1_reward_delivery.rb} +4 -4
- data/lib/tremendous/models/{order_for_create_reward.rb → single_reward_order_reward.rb} +5 -26
- data/lib/tremendous/models/{create_order201_response.rb → single_reward_order_without_link.rb} +5 -5
- data/lib/tremendous/models/{order_with_link.rb → single_reward_order_without_link_order.rb} +25 -22
- 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 +222 -0
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +272 -0
- data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +108 -0
- 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 +60 -18
- metadata +62 -20
- data/lib/tremendous/models/create_order200_response_order.rb +0 -400
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +0 -347
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +0 -406
- data/lib/tremendous/models/reward_with_link.rb +0 -406
|
@@ -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
|
|
|
@@ -140,11 +140,6 @@ module Tremendous
|
|
|
140
140
|
invalid_properties.push("invalid value for \"order_id\", must conform to the pattern #{pattern}.")
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
pattern = Regexp.new(/YYYY-MM-DD/)
|
|
144
|
-
if !@deliver_at.nil? && @deliver_at !~ pattern
|
|
145
|
-
invalid_properties.push("invalid value for \"deliver_at\", must conform to the pattern #{pattern}.")
|
|
146
|
-
end
|
|
147
|
-
|
|
148
143
|
invalid_properties
|
|
149
144
|
end
|
|
150
145
|
|
|
@@ -154,7 +149,6 @@ module Tremendous
|
|
|
154
149
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
155
150
|
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
156
151
|
return false if !@order_id.nil? && @order_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
157
|
-
return false if !@deliver_at.nil? && @deliver_at !~ Regexp.new(/YYYY-MM-DD/)
|
|
158
152
|
true
|
|
159
153
|
end
|
|
160
154
|
|
|
@@ -188,21 +182,6 @@ module Tremendous
|
|
|
188
182
|
@order_id = order_id
|
|
189
183
|
end
|
|
190
184
|
|
|
191
|
-
# Custom attribute writer method with validation
|
|
192
|
-
# @param [Object] deliver_at Value to be assigned
|
|
193
|
-
def deliver_at=(deliver_at)
|
|
194
|
-
if deliver_at.nil?
|
|
195
|
-
fail ArgumentError, 'deliver_at cannot be nil'
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
pattern = Regexp.new(/YYYY-MM-DD/)
|
|
199
|
-
if deliver_at !~ pattern
|
|
200
|
-
fail ArgumentError, "invalid value for \"deliver_at\", must conform to the pattern #{pattern}."
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
@deliver_at = deliver_at
|
|
204
|
-
end
|
|
205
|
-
|
|
206
185
|
# Checks equality by comparing each attribute.
|
|
207
186
|
# @param [Object] Object to be compared
|
|
208
187
|
def ==(o)
|
|
@@ -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
|
|
|
@@ -94,7 +94,7 @@ module Tremendous
|
|
|
94
94
|
if attributes.key?(:'currency_code')
|
|
95
95
|
self.currency_code = attributes[:'currency_code']
|
|
96
96
|
else
|
|
97
|
-
self.currency_code =
|
|
97
|
+
self.currency_code = 'USD'
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -107,10 +107,6 @@ module Tremendous
|
|
|
107
107
|
invalid_properties.push('invalid value for "denomination", denomination cannot be nil.')
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
if @currency_code.nil?
|
|
111
|
-
invalid_properties.push('invalid value for "currency_code", currency_code cannot be nil.')
|
|
112
|
-
end
|
|
113
|
-
|
|
114
110
|
invalid_properties
|
|
115
111
|
end
|
|
116
112
|
|
|
@@ -119,7 +115,6 @@ module Tremendous
|
|
|
119
115
|
def valid?
|
|
120
116
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
117
|
return false if @denomination.nil?
|
|
122
|
-
return false if @currency_code.nil?
|
|
123
118
|
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
119
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
125
120
|
true
|
|
@@ -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
|
|
@@ -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,6 +31,9 @@ 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
|
|
@@ -66,6 +69,7 @@ module Tremendous
|
|
|
66
69
|
:'campaign_id' => :'campaign_id',
|
|
67
70
|
:'created_at' => :'created_at',
|
|
68
71
|
:'status' => :'status',
|
|
72
|
+
:'channel' => :'channel',
|
|
69
73
|
:'payment' => :'payment',
|
|
70
74
|
:'invoice_id' => :'invoice_id'
|
|
71
75
|
}
|
|
@@ -84,6 +88,7 @@ module Tremendous
|
|
|
84
88
|
:'campaign_id' => :'String',
|
|
85
89
|
:'created_at' => :'Time',
|
|
86
90
|
:'status' => :'String',
|
|
91
|
+
:'channel' => :'String',
|
|
87
92
|
:'payment' => :'OrderBasePayment',
|
|
88
93
|
:'invoice_id' => :'String'
|
|
89
94
|
}
|
|
@@ -138,6 +143,10 @@ module Tremendous
|
|
|
138
143
|
self.status = nil
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.key?(:'channel')
|
|
147
|
+
self.channel = attributes[:'channel']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.key?(:'payment')
|
|
142
151
|
self.payment = attributes[:'payment']
|
|
143
152
|
end
|
|
@@ -188,6 +197,8 @@ module Tremendous
|
|
|
188
197
|
return false if @status.nil?
|
|
189
198
|
status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
|
|
190
199
|
return false unless status_validator.valid?(@status)
|
|
200
|
+
channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
201
|
+
return false unless channel_validator.valid?(@channel)
|
|
191
202
|
true
|
|
192
203
|
end
|
|
193
204
|
|
|
@@ -227,6 +238,16 @@ module Tremendous
|
|
|
227
238
|
@status = status
|
|
228
239
|
end
|
|
229
240
|
|
|
241
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
242
|
+
# @param [Object] channel Object to be assigned
|
|
243
|
+
def channel=(channel)
|
|
244
|
+
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
|
245
|
+
unless validator.valid?(channel)
|
|
246
|
+
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
247
|
+
end
|
|
248
|
+
@channel = channel
|
|
249
|
+
end
|
|
250
|
+
|
|
230
251
|
# Checks equality by comparing each attribute.
|
|
231
252
|
# @param [Object] Object to be compared
|
|
232
253
|
def ==(o)
|
|
@@ -237,6 +258,7 @@ module Tremendous
|
|
|
237
258
|
campaign_id == o.campaign_id &&
|
|
238
259
|
created_at == o.created_at &&
|
|
239
260
|
status == o.status &&
|
|
261
|
+
channel == o.channel &&
|
|
240
262
|
payment == o.payment &&
|
|
241
263
|
invoice_id == o.invoice_id
|
|
242
264
|
end
|
|
@@ -250,7 +272,7 @@ module Tremendous
|
|
|
250
272
|
# Calculates hash code according to all attributes.
|
|
251
273
|
# @return [Integer] Hash code
|
|
252
274
|
def hash
|
|
253
|
-
[id, external_id, campaign_id, created_at, status, payment, invoice_id].hash
|
|
275
|
+
[id, external_id, campaign_id, created_at, status, channel, payment, invoice_id].hash
|
|
254
276
|
end
|
|
255
277
|
|
|
256
278
|
# Builds the object from hash
|
|
@@ -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
|