tremendous_ruby 5.24.0 → 5.28.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 +163 -9
- data/lib/tremendous/api_client.rb +3 -2
- data/lib/tremendous/configuration.rb +10 -0
- data/lib/tremendous/models/campaign.rb +14 -6
- data/lib/tremendous/models/campaign_base.rb +14 -6
- data/lib/tremendous/models/connected_organization_member_member.rb +6 -4
- data/lib/tremendous/models/connected_organization_member_session.rb +27 -1
- data/lib/tremendous/models/connected_organization_organization.rb +3 -5
- data/lib/tremendous/models/{generate_reward_token200_response_reward.rb → create_api_key_request.rb} +51 -53
- data/lib/tremendous/models/create_campaign_request.rb +14 -6
- data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +27 -1
- data/lib/tremendous/models/create_connected_organization_member_session_request.rb +33 -4
- data/lib/tremendous/models/create_connected_organization_request.rb +13 -4
- data/lib/tremendous/models/{create_report201_response_report.rb → create_connected_organization_request_kyb_prefill.rb} +102 -81
- data/lib/tremendous/models/create_field.rb +6 -4
- data/lib/tremendous/models/create_field_request.rb +6 -4
- data/lib/tremendous/models/create_invoice_request.rb +6 -10
- data/lib/tremendous/models/create_order200_response_order.rb +9 -9
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +13 -9
- data/lib/tremendous/models/create_report200_response_report.rb +3 -5
- data/lib/tremendous/models/create_report_request.rb +12 -8
- data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +6 -10
- data/lib/tremendous/models/delivery_details.rb +7 -11
- data/lib/tremendous/models/delivery_details_with_link.rb +13 -9
- data/lib/tremendous/models/field.rb +3 -5
- data/lib/tremendous/models/fraud_config_country.rb +6 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +6 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +6 -4
- data/lib/tremendous/models/{create_campaign201_response.rb → fraud_config_review_vpn.rb} +21 -19
- data/lib/tremendous/models/fraud_review.rb +10 -16
- data/lib/tremendous/models/fraud_review_base.rb +7 -11
- data/lib/tremendous/models/fraud_review_list_item.rb +7 -11
- data/lib/tremendous/models/fraud_review_reason.rb +2 -1
- data/lib/tremendous/models/fraud_rule_request_config.rb +2 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +4 -6
- data/lib/tremendous/models/funding_source.rb +12 -14
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +10 -16
- data/lib/tremendous/models/get_member200_response_member.rb +6 -4
- data/lib/tremendous/models/get_member200_response_member_events_inner.rb +3 -5
- data/lib/tremendous/models/invoice.rb +12 -14
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +14 -6
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +301 -0
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +6 -4
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +3 -5
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +3 -5
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +7 -11
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +4 -6
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +12 -14
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +6 -10
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +12 -14
- data/lib/tremendous/models/list_members200_response_members_inner.rb +6 -4
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +9 -9
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +3 -5
- data/lib/tremendous/models/list_products_response_products_inner.rb +11 -11
- data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +6 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +7 -11
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +3 -5
- data/lib/tremendous/models/member.rb +6 -4
- data/lib/tremendous/models/member_base.rb +6 -4
- data/lib/tremendous/models/member_with_events.rb +6 -4
- data/lib/tremendous/models/member_without_events.rb +6 -4
- data/lib/tremendous/models/order.rb +9 -9
- data/lib/tremendous/models/order_base.rb +9 -9
- data/lib/tremendous/models/order_with_link.rb +9 -9
- data/lib/tremendous/models/order_without_link.rb +9 -9
- data/lib/tremendous/models/organization.rb +3 -5
- data/lib/tremendous/models/payout.rb +3 -5
- data/lib/tremendous/models/product.rb +11 -11
- data/lib/tremendous/models/report.rb +3 -5
- data/lib/tremendous/models/review_country.rb +6 -4
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +6 -4
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +6 -4
- data/lib/tremendous/models/{generate_reward_token200_response.rb → review_vpn.rb} +22 -19
- data/lib/tremendous/models/reward_value.rb +3 -5
- data/lib/tremendous/models/reward_with_link_delivery.rb +13 -9
- data/lib/tremendous/models/reward_without_link_delivery.rb +7 -11
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +4 -6
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +9 -9
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +9 -9
- data/lib/tremendous/models/update_campaign.rb +14 -6
- data/lib/tremendous/models/update_campaign_request.rb +14 -6
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +6 -4
- data/lib/tremendous/models/{get_fraud_review200_response_fraud_review_geo.rb → update_member.rb} +28 -32
- data/lib/tremendous/models/{create_report201_response.rb → update_member_request.rb} +34 -27
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +7 -0
- metadata +22 -8
- data/lib/tremendous/models/create_order201_response.rb +0 -221
|
@@ -151,13 +151,15 @@ module Tremendous
|
|
|
151
151
|
@amount = amount
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
-
# Custom attribute writer method
|
|
154
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
155
|
+
# so that enum values added to the API don't break deserialization on
|
|
156
|
+
# older versions of this gem.
|
|
155
157
|
# @param [Object] period Object to be assigned
|
|
156
158
|
def period=(period)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
fail ArgumentError, "invalid value for \"period\", must be one of #{validator.allowable_values}."
|
|
159
|
+
if period.nil?
|
|
160
|
+
fail ArgumentError, 'period cannot be nil'
|
|
160
161
|
end
|
|
162
|
+
|
|
161
163
|
@period = period
|
|
162
164
|
end
|
|
163
165
|
|
|
@@ -151,13 +151,15 @@ module Tremendous
|
|
|
151
151
|
@amount = amount
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
-
# Custom attribute writer method
|
|
154
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
155
|
+
# so that enum values added to the API don't break deserialization on
|
|
156
|
+
# older versions of this gem.
|
|
155
157
|
# @param [Object] period Object to be assigned
|
|
156
158
|
def period=(period)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
fail ArgumentError, "invalid value for \"period\", must be one of #{validator.allowable_values}."
|
|
159
|
+
if period.nil?
|
|
160
|
+
fail ArgumentError, 'period cannot be nil'
|
|
160
161
|
end
|
|
162
|
+
|
|
161
163
|
@period = period
|
|
162
164
|
end
|
|
163
165
|
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,25 +14,32 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# Flag rewards redeemed through VPN or proxy traffic. By default, Apple Private Relay traffic is flagged; set `skip_apple_private_relay` to true to exclude it.
|
|
18
|
+
class ReviewVpn
|
|
19
|
+
# Whether Apple Private Relay traffic should be excluded from VPN fraud review. When omitted or false, Apple Private Relay traffic is flagged with other VPN and proxy traffic.
|
|
20
|
+
attr_accessor :skip_apple_private_relay
|
|
19
21
|
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
23
|
def self.attribute_map
|
|
22
24
|
{
|
|
23
|
-
:'
|
|
25
|
+
:'skip_apple_private_relay' => :'skip_apple_private_relay'
|
|
24
26
|
}
|
|
25
27
|
end
|
|
26
28
|
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
27
34
|
# Returns all the JSON keys this model knows about
|
|
28
35
|
def self.acceptable_attributes
|
|
29
|
-
|
|
36
|
+
acceptable_attribute_map.values
|
|
30
37
|
end
|
|
31
38
|
|
|
32
39
|
# Attribute type mapping.
|
|
33
40
|
def self.openapi_types
|
|
34
41
|
{
|
|
35
|
-
:'
|
|
42
|
+
:'skip_apple_private_relay' => :'Boolean'
|
|
36
43
|
}
|
|
37
44
|
end
|
|
38
45
|
|
|
@@ -46,21 +53,22 @@ module Tremendous
|
|
|
46
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
54
|
def initialize(attributes = {})
|
|
48
55
|
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ReviewVpn` initialize method"
|
|
50
57
|
end
|
|
51
58
|
|
|
52
59
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
53
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
-
if (!
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ReviewVpn`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
56
64
|
end
|
|
57
65
|
h[k.to_sym] = v
|
|
58
66
|
}
|
|
59
67
|
|
|
60
|
-
if attributes.key?(:'
|
|
61
|
-
self.
|
|
68
|
+
if attributes.key?(:'skip_apple_private_relay')
|
|
69
|
+
self.skip_apple_private_relay = attributes[:'skip_apple_private_relay']
|
|
62
70
|
else
|
|
63
|
-
self.
|
|
71
|
+
self.skip_apple_private_relay = false
|
|
64
72
|
end
|
|
65
73
|
end
|
|
66
74
|
|
|
@@ -69,10 +77,6 @@ module Tremendous
|
|
|
69
77
|
def list_invalid_properties
|
|
70
78
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
71
79
|
invalid_properties = Array.new
|
|
72
|
-
if @reward.nil?
|
|
73
|
-
invalid_properties.push('invalid value for "reward", reward cannot be nil.')
|
|
74
|
-
end
|
|
75
|
-
|
|
76
80
|
invalid_properties
|
|
77
81
|
end
|
|
78
82
|
|
|
@@ -80,7 +84,6 @@ module Tremendous
|
|
|
80
84
|
# @return true if the model is valid
|
|
81
85
|
def valid?
|
|
82
86
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
-
return false if @reward.nil?
|
|
84
87
|
true
|
|
85
88
|
end
|
|
86
89
|
|
|
@@ -89,7 +92,7 @@ module Tremendous
|
|
|
89
92
|
def ==(o)
|
|
90
93
|
return true if self.equal?(o)
|
|
91
94
|
self.class == o.class &&
|
|
92
|
-
|
|
95
|
+
skip_apple_private_relay == o.skip_apple_private_relay
|
|
93
96
|
end
|
|
94
97
|
|
|
95
98
|
# @see the `==` method
|
|
@@ -101,7 +104,7 @@ module Tremendous
|
|
|
101
104
|
# Calculates hash code according to all attributes.
|
|
102
105
|
# @return [Integer] Hash code
|
|
103
106
|
def hash
|
|
104
|
-
[
|
|
107
|
+
[skip_apple_private_relay].hash
|
|
105
108
|
end
|
|
106
109
|
|
|
107
110
|
# Builds the object from hash
|
|
@@ -134,13 +134,11 @@ module Tremendous
|
|
|
134
134
|
@denomination = denomination
|
|
135
135
|
end
|
|
136
136
|
|
|
137
|
-
# Custom attribute writer method
|
|
137
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
138
|
+
# so that enum values added to the API don't break deserialization on
|
|
139
|
+
# older versions of this gem.
|
|
138
140
|
# @param [Object] currency_code Object to be assigned
|
|
139
141
|
def currency_code=(currency_code)
|
|
140
|
-
validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "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", "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"])
|
|
141
|
-
unless validator.valid?(currency_code)
|
|
142
|
-
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
143
|
-
end
|
|
144
142
|
@currency_code = currency_code
|
|
145
143
|
end
|
|
146
144
|
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class RewardWithLinkDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The
|
|
19
|
+
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -143,23 +143,27 @@ module Tremendous
|
|
|
143
143
|
true
|
|
144
144
|
end
|
|
145
145
|
|
|
146
|
-
# Custom attribute writer method
|
|
146
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
147
|
+
# so that enum values added to the API don't break deserialization on
|
|
148
|
+
# older versions of this gem.
|
|
147
149
|
# @param [Object] method Object to be assigned
|
|
148
150
|
def method=(method)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
151
|
+
if method.nil?
|
|
152
|
+
fail ArgumentError, 'method cannot be nil'
|
|
152
153
|
end
|
|
154
|
+
|
|
153
155
|
@method = method
|
|
154
156
|
end
|
|
155
157
|
|
|
156
|
-
# Custom attribute writer method
|
|
158
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
159
|
+
# so that enum values added to the API don't break deserialization on
|
|
160
|
+
# older versions of this gem.
|
|
157
161
|
# @param [Object] status Object to be assigned
|
|
158
162
|
def status=(status)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
163
|
+
if status.nil?
|
|
164
|
+
fail ArgumentError, 'status cannot be nil'
|
|
162
165
|
end
|
|
166
|
+
|
|
163
167
|
@status = status
|
|
164
168
|
end
|
|
165
169
|
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class RewardWithoutLinkDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The
|
|
19
|
+
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -120,23 +120,19 @@ module Tremendous
|
|
|
120
120
|
true
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
-
# Custom attribute writer method
|
|
123
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
124
|
+
# so that enum values added to the API don't break deserialization on
|
|
125
|
+
# older versions of this gem.
|
|
124
126
|
# @param [Object] method Object to be assigned
|
|
125
127
|
def method=(method)
|
|
126
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL", "LINK", "PHONE"])
|
|
127
|
-
unless validator.valid?(method)
|
|
128
|
-
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
129
|
-
end
|
|
130
128
|
@method = method
|
|
131
129
|
end
|
|
132
130
|
|
|
133
|
-
# Custom attribute writer method
|
|
131
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
132
|
+
# so that enum values added to the API don't break deserialization on
|
|
133
|
+
# older versions of this gem.
|
|
134
134
|
# @param [Object] status Object to be assigned
|
|
135
135
|
def status=(status)
|
|
136
|
-
validator = EnumAttributeValidator.new('String', ["SCHEDULED", "FAILED", "SUCCEEDED", "PENDING"])
|
|
137
|
-
unless validator.valid?(status)
|
|
138
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
139
|
-
end
|
|
140
136
|
@status = status
|
|
141
137
|
end
|
|
142
138
|
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class SingleRewardOrderRewardDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The
|
|
19
|
+
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
attr_accessor :meta
|
|
@@ -117,13 +117,11 @@ module Tremendous
|
|
|
117
117
|
true
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
# Custom attribute writer method
|
|
120
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
121
|
+
# so that enum values added to the API don't break deserialization on
|
|
122
|
+
# older versions of this gem.
|
|
121
123
|
# @param [Object] method Object to be assigned
|
|
122
124
|
def method=(method)
|
|
123
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL", "LINK", "PHONE"])
|
|
124
|
-
unless validator.valid?(method)
|
|
125
|
-
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
126
|
-
end
|
|
127
125
|
@method = method
|
|
128
126
|
end
|
|
129
127
|
|
|
@@ -254,23 +254,23 @@ module Tremendous
|
|
|
254
254
|
@created_at = created_at
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
# Custom attribute writer method
|
|
257
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
258
|
+
# so that enum values added to the API don't break deserialization on
|
|
259
|
+
# older versions of this gem.
|
|
258
260
|
# @param [Object] status Object to be assigned
|
|
259
261
|
def status=(status)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
262
|
+
if status.nil?
|
|
263
|
+
fail ArgumentError, 'status cannot be nil'
|
|
263
264
|
end
|
|
265
|
+
|
|
264
266
|
@status = status
|
|
265
267
|
end
|
|
266
268
|
|
|
267
|
-
# Custom attribute writer method
|
|
269
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
270
|
+
# so that enum values added to the API don't break deserialization on
|
|
271
|
+
# older versions of this gem.
|
|
268
272
|
# @param [Object] channel Object to be assigned
|
|
269
273
|
def channel=(channel)
|
|
270
|
-
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
|
|
271
|
-
unless validator.valid?(channel)
|
|
272
|
-
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
273
|
-
end
|
|
274
274
|
@channel = channel
|
|
275
275
|
end
|
|
276
276
|
|
|
@@ -254,23 +254,23 @@ module Tremendous
|
|
|
254
254
|
@created_at = created_at
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
# Custom attribute writer method
|
|
257
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
258
|
+
# so that enum values added to the API don't break deserialization on
|
|
259
|
+
# older versions of this gem.
|
|
258
260
|
# @param [Object] status Object to be assigned
|
|
259
261
|
def status=(status)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
262
|
+
if status.nil?
|
|
263
|
+
fail ArgumentError, 'status cannot be nil'
|
|
263
264
|
end
|
|
265
|
+
|
|
264
266
|
@status = status
|
|
265
267
|
end
|
|
266
268
|
|
|
267
|
-
# Custom attribute writer method
|
|
269
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
270
|
+
# so that enum values added to the API don't break deserialization on
|
|
271
|
+
# older versions of this gem.
|
|
268
272
|
# @param [Object] channel Object to be assigned
|
|
269
273
|
def channel=(channel)
|
|
270
|
-
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
|
|
271
|
-
unless validator.valid?(channel)
|
|
272
|
-
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
273
|
-
end
|
|
274
274
|
@channel = channel
|
|
275
275
|
end
|
|
276
276
|
|
|
@@ -30,6 +30,8 @@ module Tremendous
|
|
|
30
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
31
|
attr_accessor :fee_charged_to
|
|
32
32
|
|
|
33
|
+
attr_accessor :auto_add_product_rule
|
|
34
|
+
|
|
33
35
|
attr_accessor :webpage_style
|
|
34
36
|
|
|
35
37
|
attr_accessor :email_style
|
|
@@ -64,6 +66,7 @@ module Tremendous
|
|
|
64
66
|
:'description' => :'description',
|
|
65
67
|
:'products' => :'products',
|
|
66
68
|
:'fee_charged_to' => :'fee_charged_to',
|
|
69
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
67
70
|
:'webpage_style' => :'webpage_style',
|
|
68
71
|
:'email_style' => :'email_style'
|
|
69
72
|
}
|
|
@@ -87,6 +90,7 @@ module Tremendous
|
|
|
87
90
|
:'description' => :'String',
|
|
88
91
|
:'products' => :'Array<String>',
|
|
89
92
|
:'fee_charged_to' => :'String',
|
|
93
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
90
94
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
91
95
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
92
96
|
}
|
|
@@ -97,6 +101,7 @@ module Tremendous
|
|
|
97
101
|
Set.new([
|
|
98
102
|
:'description',
|
|
99
103
|
:'fee_charged_to',
|
|
104
|
+
:'auto_add_product_rule',
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -138,6 +143,10 @@ module Tremendous
|
|
|
138
143
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
147
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.key?(:'webpage_style')
|
|
142
151
|
self.webpage_style = attributes[:'webpage_style']
|
|
143
152
|
end
|
|
@@ -185,13 +194,11 @@ module Tremendous
|
|
|
185
194
|
@id = id
|
|
186
195
|
end
|
|
187
196
|
|
|
188
|
-
# Custom attribute writer method
|
|
197
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
198
|
+
# so that enum values added to the API don't break deserialization on
|
|
199
|
+
# older versions of this gem.
|
|
189
200
|
# @param [Object] fee_charged_to Object to be assigned
|
|
190
201
|
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
202
|
@fee_charged_to = fee_charged_to
|
|
196
203
|
end
|
|
197
204
|
|
|
@@ -205,6 +212,7 @@ module Tremendous
|
|
|
205
212
|
description == o.description &&
|
|
206
213
|
products == o.products &&
|
|
207
214
|
fee_charged_to == o.fee_charged_to &&
|
|
215
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
208
216
|
webpage_style == o.webpage_style &&
|
|
209
217
|
email_style == o.email_style
|
|
210
218
|
end
|
|
@@ -218,7 +226,7 @@ module Tremendous
|
|
|
218
226
|
# Calculates hash code according to all attributes.
|
|
219
227
|
# @return [Integer] Hash code
|
|
220
228
|
def hash
|
|
221
|
-
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
229
|
+
[id, name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
222
230
|
end
|
|
223
231
|
|
|
224
232
|
# Builds the object from hash
|
|
@@ -28,6 +28,8 @@ module Tremendous
|
|
|
28
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
29
|
attr_accessor :fee_charged_to
|
|
30
30
|
|
|
31
|
+
attr_accessor :auto_add_product_rule
|
|
32
|
+
|
|
31
33
|
attr_accessor :webpage_style
|
|
32
34
|
|
|
33
35
|
attr_accessor :email_style
|
|
@@ -61,6 +63,7 @@ module Tremendous
|
|
|
61
63
|
:'description' => :'description',
|
|
62
64
|
:'products' => :'products',
|
|
63
65
|
:'fee_charged_to' => :'fee_charged_to',
|
|
66
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
64
67
|
:'webpage_style' => :'webpage_style',
|
|
65
68
|
:'email_style' => :'email_style'
|
|
66
69
|
}
|
|
@@ -83,6 +86,7 @@ module Tremendous
|
|
|
83
86
|
:'description' => :'String',
|
|
84
87
|
:'products' => :'Array<String>',
|
|
85
88
|
:'fee_charged_to' => :'String',
|
|
89
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
86
90
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
87
91
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
88
92
|
}
|
|
@@ -93,6 +97,7 @@ module Tremendous
|
|
|
93
97
|
Set.new([
|
|
94
98
|
:'description',
|
|
95
99
|
:'fee_charged_to',
|
|
100
|
+
:'auto_add_product_rule',
|
|
96
101
|
])
|
|
97
102
|
end
|
|
98
103
|
|
|
@@ -130,6 +135,10 @@ module Tremendous
|
|
|
130
135
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
139
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
140
|
+
end
|
|
141
|
+
|
|
133
142
|
if attributes.key?(:'webpage_style')
|
|
134
143
|
self.webpage_style = attributes[:'webpage_style']
|
|
135
144
|
end
|
|
@@ -156,13 +165,11 @@ module Tremendous
|
|
|
156
165
|
true
|
|
157
166
|
end
|
|
158
167
|
|
|
159
|
-
# Custom attribute writer method
|
|
168
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
169
|
+
# so that enum values added to the API don't break deserialization on
|
|
170
|
+
# older versions of this gem.
|
|
160
171
|
# @param [Object] fee_charged_to Object to be assigned
|
|
161
172
|
def fee_charged_to=(fee_charged_to)
|
|
162
|
-
validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
163
|
-
unless validator.valid?(fee_charged_to)
|
|
164
|
-
fail ArgumentError, "invalid value for \"fee_charged_to\", must be one of #{validator.allowable_values}."
|
|
165
|
-
end
|
|
166
173
|
@fee_charged_to = fee_charged_to
|
|
167
174
|
end
|
|
168
175
|
|
|
@@ -175,6 +182,7 @@ module Tremendous
|
|
|
175
182
|
description == o.description &&
|
|
176
183
|
products == o.products &&
|
|
177
184
|
fee_charged_to == o.fee_charged_to &&
|
|
185
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
178
186
|
webpage_style == o.webpage_style &&
|
|
179
187
|
email_style == o.email_style
|
|
180
188
|
end
|
|
@@ -188,7 +196,7 @@ module Tremendous
|
|
|
188
196
|
# Calculates hash code according to all attributes.
|
|
189
197
|
# @return [Integer] Hash code
|
|
190
198
|
def hash
|
|
191
|
-
[name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
199
|
+
[name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
192
200
|
end
|
|
193
201
|
|
|
194
202
|
# Builds the object from hash
|
|
@@ -130,13 +130,15 @@ module Tremendous
|
|
|
130
130
|
true
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
# Custom attribute writer method
|
|
133
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
134
|
+
# so that enum values added to the API don't break deserialization on
|
|
135
|
+
# older versions of this gem.
|
|
134
136
|
# @param [Object] operation Object to be assigned
|
|
135
137
|
def operation=(operation)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}."
|
|
138
|
+
if operation.nil?
|
|
139
|
+
fail ArgumentError, 'operation cannot be nil'
|
|
139
140
|
end
|
|
141
|
+
|
|
140
142
|
@operation = operation
|
|
141
143
|
end
|
|
142
144
|
|