tremendous_ruby 5.14.0 → 5.16.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 +70 -2
- data/lib/tremendous/models/create_field.rb +320 -0
- data/lib/tremendous/models/create_field200_response.rb +237 -0
- data/lib/tremendous/models/create_field_request.rb +320 -0
- data/lib/tremendous/models/create_field_request_data.rb +224 -0
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +12 -1
- data/lib/tremendous/models/currency_codes.rb +1 -2
- data/lib/tremendous/models/field.rb +37 -5
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +37 -5
- data/lib/tremendous/models/list_fields200_response_fields_inner_data.rb +236 -0
- data/lib/tremendous/models/list_products_response_products_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +12 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +2 -2
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +12 -1
- data/lib/tremendous/models/order_without_link_rewards_inner.rb +12 -1
- data/lib/tremendous/models/product.rb +1 -1
- data/lib/tremendous/models/reward.rb +12 -1
- data/lib/tremendous/models/reward_base.rb +12 -1
- data/lib/tremendous/models/reward_for_order_create.rb +12 -1
- data/lib/tremendous/models/reward_value.rb +2 -2
- data/lib/tremendous/models/reward_with_link.rb +12 -1
- data/lib/tremendous/models/reward_without_link.rb +12 -1
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +5 -0
- metadata +6 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API Endpoints
|
|
3
|
+
|
|
4
|
+
#Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2
|
|
7
|
+
Contact: developers@tremendous.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Tremendous
|
|
17
|
+
# Additional configuration for the field. Only used for `Dropdown` and `List` data types.
|
|
18
|
+
class ListFields200ResponseFieldsInnerData
|
|
19
|
+
# List of valid options for `Dropdown` and `List` field types. For `Dropdown`, the user selects one option. For `List`, the user can select multiple options.
|
|
20
|
+
attr_accessor :options
|
|
21
|
+
|
|
22
|
+
# Optional human-readable labels for each option. Keys are the option values, values are the display labels. If not provided, the option values are used as labels.
|
|
23
|
+
attr_accessor :labels
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'options' => :'options',
|
|
29
|
+
:'labels' => :'labels'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'options' => :'Array<String>',
|
|
47
|
+
:'labels' => :'Hash<String, String>'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListFields200ResponseFieldsInnerData` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListFields200ResponseFieldsInnerData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'options')
|
|
74
|
+
if (value = attributes[:'options']).is_a?(Array)
|
|
75
|
+
self.options = value
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'labels')
|
|
80
|
+
if (value = attributes[:'labels']).is_a?(Hash)
|
|
81
|
+
self.labels = value
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
invalid_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
def valid?
|
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Checks equality by comparing each attribute.
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def ==(o)
|
|
104
|
+
return true if self.equal?(o)
|
|
105
|
+
self.class == o.class &&
|
|
106
|
+
options == o.options &&
|
|
107
|
+
labels == o.labels
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @see the `==` method
|
|
111
|
+
# @param [Object] Object to be compared
|
|
112
|
+
def eql?(o)
|
|
113
|
+
self == o
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Calculates hash code according to all attributes.
|
|
117
|
+
# @return [Integer] Hash code
|
|
118
|
+
def hash
|
|
119
|
+
[options, labels].hash
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Builds the object from hash
|
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
124
|
+
# @return [Object] Returns the model itself
|
|
125
|
+
def self.build_from_hash(attributes)
|
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
|
127
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
128
|
+
transformed_hash = {}
|
|
129
|
+
openapi_types.each_pair do |key, type|
|
|
130
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
131
|
+
transformed_hash["#{key}"] = nil
|
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
136
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
139
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
new(transformed_hash)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Deserializes the data based on type
|
|
146
|
+
# @param string type Data type
|
|
147
|
+
# @param string value Value to be deserialized
|
|
148
|
+
# @return [Object] Deserialized data
|
|
149
|
+
def self._deserialize(type, value)
|
|
150
|
+
case type.to_sym
|
|
151
|
+
when :Time
|
|
152
|
+
Time.parse(value)
|
|
153
|
+
when :Date
|
|
154
|
+
Date.parse(value)
|
|
155
|
+
when :String
|
|
156
|
+
value.to_s
|
|
157
|
+
when :Integer
|
|
158
|
+
value.to_i
|
|
159
|
+
when :Float
|
|
160
|
+
value.to_f
|
|
161
|
+
when :Boolean
|
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
163
|
+
true
|
|
164
|
+
else
|
|
165
|
+
false
|
|
166
|
+
end
|
|
167
|
+
when :Object
|
|
168
|
+
# generic object (usually a Hash), return directly
|
|
169
|
+
value
|
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
|
176
|
+
{}.tap do |hash|
|
|
177
|
+
value.each do |k, v|
|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
else # model
|
|
182
|
+
# models (e.g. Pet) or oneOf
|
|
183
|
+
klass = Tremendous.const_get(type)
|
|
184
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the string representation of the object
|
|
189
|
+
# @return [String] String presentation of the object
|
|
190
|
+
def to_s
|
|
191
|
+
to_hash.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
if value.nil?
|
|
207
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
hash[param] = _to_hash(value)
|
|
212
|
+
end
|
|
213
|
+
hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Outputs non-array value in the form of hash
|
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
218
|
+
# @param [Object] value Any valid value
|
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
|
220
|
+
def _to_hash(value)
|
|
221
|
+
if value.is_a?(Array)
|
|
222
|
+
value.compact.map { |v| _to_hash(v) }
|
|
223
|
+
elsif value.is_a?(Hash)
|
|
224
|
+
{}.tap do |hash|
|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
226
|
+
end
|
|
227
|
+
elsif value.respond_to? :to_hash
|
|
228
|
+
value.to_hash
|
|
229
|
+
else
|
|
230
|
+
value
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|
|
@@ -21,7 +21,7 @@ module Tremendous
|
|
|
21
21
|
# Name of the product
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
# Detailed description of the product.
|
|
24
|
+
# Detailed description of the product.
|
|
25
25
|
attr_accessor :description
|
|
26
26
|
|
|
27
27
|
# The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> </tbody> </table>
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
attr_accessor :value
|
|
29
32
|
|
|
30
33
|
attr_accessor :recipient
|
|
@@ -42,6 +45,7 @@ module Tremendous
|
|
|
42
45
|
:'id' => :'id',
|
|
43
46
|
:'order_id' => :'order_id',
|
|
44
47
|
:'created_at' => :'created_at',
|
|
48
|
+
:'expires_at' => :'expires_at',
|
|
45
49
|
:'value' => :'value',
|
|
46
50
|
:'recipient' => :'recipient',
|
|
47
51
|
:'deliver_at' => :'deliver_at',
|
|
@@ -66,6 +70,7 @@ module Tremendous
|
|
|
66
70
|
:'id' => :'String',
|
|
67
71
|
:'order_id' => :'String',
|
|
68
72
|
:'created_at' => :'Time',
|
|
73
|
+
:'expires_at' => :'Time',
|
|
69
74
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
70
75
|
:'recipient' => :'ListRewards200ResponseRewardsInnerRecipient',
|
|
71
76
|
:'deliver_at' => :'Date',
|
|
@@ -77,6 +82,7 @@ module Tremendous
|
|
|
77
82
|
# List of attributes with nullable: true
|
|
78
83
|
def self.openapi_nullable
|
|
79
84
|
Set.new([
|
|
85
|
+
:'expires_at',
|
|
80
86
|
])
|
|
81
87
|
end
|
|
82
88
|
|
|
@@ -108,6 +114,10 @@ module Tremendous
|
|
|
108
114
|
self.created_at = attributes[:'created_at']
|
|
109
115
|
end
|
|
110
116
|
|
|
117
|
+
if attributes.key?(:'expires_at')
|
|
118
|
+
self.expires_at = attributes[:'expires_at']
|
|
119
|
+
end
|
|
120
|
+
|
|
111
121
|
if attributes.key?(:'value')
|
|
112
122
|
self.value = attributes[:'value']
|
|
113
123
|
end
|
|
@@ -196,6 +206,7 @@ module Tremendous
|
|
|
196
206
|
id == o.id &&
|
|
197
207
|
order_id == o.order_id &&
|
|
198
208
|
created_at == o.created_at &&
|
|
209
|
+
expires_at == o.expires_at &&
|
|
199
210
|
value == o.value &&
|
|
200
211
|
recipient == o.recipient &&
|
|
201
212
|
deliver_at == o.deliver_at &&
|
|
@@ -212,7 +223,7 @@ module Tremendous
|
|
|
212
223
|
# Calculates hash code according to all attributes.
|
|
213
224
|
# @return [Integer] Hash code
|
|
214
225
|
def hash
|
|
215
|
-
[id, order_id, created_at, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
226
|
+
[id, order_id, created_at, expires_at, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
216
227
|
end
|
|
217
228
|
|
|
218
229
|
# Builds the object from hash
|
|
@@ -121,7 +121,7 @@ module Tremendous
|
|
|
121
121
|
def valid?
|
|
122
122
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
123
|
return false if @denomination.nil?
|
|
124
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "
|
|
124
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "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"])
|
|
125
125
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
126
126
|
true
|
|
127
127
|
end
|
|
@@ -139,7 +139,7 @@ module Tremendous
|
|
|
139
139
|
# Custom attribute writer method checking allowed values (enum).
|
|
140
140
|
# @param [Object] currency_code Object to be assigned
|
|
141
141
|
def currency_code=(currency_code)
|
|
142
|
-
validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "
|
|
142
|
+
validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "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"])
|
|
143
143
|
unless validator.valid?(currency_code)
|
|
144
144
|
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
145
145
|
end
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
29
32
|
attr_accessor :campaign_id
|
|
30
33
|
|
|
@@ -48,6 +51,7 @@ module Tremendous
|
|
|
48
51
|
:'id' => :'id',
|
|
49
52
|
:'order_id' => :'order_id',
|
|
50
53
|
:'created_at' => :'created_at',
|
|
54
|
+
:'expires_at' => :'expires_at',
|
|
51
55
|
:'campaign_id' => :'campaign_id',
|
|
52
56
|
:'products' => :'products',
|
|
53
57
|
:'value' => :'value',
|
|
@@ -74,6 +78,7 @@ module Tremendous
|
|
|
74
78
|
:'id' => :'String',
|
|
75
79
|
:'order_id' => :'String',
|
|
76
80
|
:'created_at' => :'Time',
|
|
81
|
+
:'expires_at' => :'Time',
|
|
77
82
|
:'campaign_id' => :'String',
|
|
78
83
|
:'products' => :'Array<String>',
|
|
79
84
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
@@ -87,6 +92,7 @@ module Tremendous
|
|
|
87
92
|
# List of attributes with nullable: true
|
|
88
93
|
def self.openapi_nullable
|
|
89
94
|
Set.new([
|
|
95
|
+
:'expires_at',
|
|
90
96
|
:'campaign_id',
|
|
91
97
|
])
|
|
92
98
|
end
|
|
@@ -119,6 +125,10 @@ module Tremendous
|
|
|
119
125
|
self.created_at = attributes[:'created_at']
|
|
120
126
|
end
|
|
121
127
|
|
|
128
|
+
if attributes.key?(:'expires_at')
|
|
129
|
+
self.expires_at = attributes[:'expires_at']
|
|
130
|
+
end
|
|
131
|
+
|
|
122
132
|
if attributes.key?(:'campaign_id')
|
|
123
133
|
self.campaign_id = attributes[:'campaign_id']
|
|
124
134
|
end
|
|
@@ -253,6 +263,7 @@ module Tremendous
|
|
|
253
263
|
id == o.id &&
|
|
254
264
|
order_id == o.order_id &&
|
|
255
265
|
created_at == o.created_at &&
|
|
266
|
+
expires_at == o.expires_at &&
|
|
256
267
|
campaign_id == o.campaign_id &&
|
|
257
268
|
products == o.products &&
|
|
258
269
|
value == o.value &&
|
|
@@ -271,7 +282,7 @@ module Tremendous
|
|
|
271
282
|
# Calculates hash code according to all attributes.
|
|
272
283
|
# @return [Integer] Hash code
|
|
273
284
|
def hash
|
|
274
|
-
[id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
285
|
+
[id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
275
286
|
end
|
|
276
287
|
|
|
277
288
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
29
32
|
attr_accessor :campaign_id
|
|
30
33
|
|
|
@@ -48,6 +51,7 @@ module Tremendous
|
|
|
48
51
|
:'id' => :'id',
|
|
49
52
|
:'order_id' => :'order_id',
|
|
50
53
|
:'created_at' => :'created_at',
|
|
54
|
+
:'expires_at' => :'expires_at',
|
|
51
55
|
:'campaign_id' => :'campaign_id',
|
|
52
56
|
:'products' => :'products',
|
|
53
57
|
:'value' => :'value',
|
|
@@ -74,6 +78,7 @@ module Tremendous
|
|
|
74
78
|
:'id' => :'String',
|
|
75
79
|
:'order_id' => :'String',
|
|
76
80
|
:'created_at' => :'Time',
|
|
81
|
+
:'expires_at' => :'Time',
|
|
77
82
|
:'campaign_id' => :'String',
|
|
78
83
|
:'products' => :'Array<String>',
|
|
79
84
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
@@ -87,6 +92,7 @@ module Tremendous
|
|
|
87
92
|
# List of attributes with nullable: true
|
|
88
93
|
def self.openapi_nullable
|
|
89
94
|
Set.new([
|
|
95
|
+
:'expires_at',
|
|
90
96
|
:'campaign_id',
|
|
91
97
|
])
|
|
92
98
|
end
|
|
@@ -119,6 +125,10 @@ module Tremendous
|
|
|
119
125
|
self.created_at = attributes[:'created_at']
|
|
120
126
|
end
|
|
121
127
|
|
|
128
|
+
if attributes.key?(:'expires_at')
|
|
129
|
+
self.expires_at = attributes[:'expires_at']
|
|
130
|
+
end
|
|
131
|
+
|
|
122
132
|
if attributes.key?(:'campaign_id')
|
|
123
133
|
self.campaign_id = attributes[:'campaign_id']
|
|
124
134
|
end
|
|
@@ -253,6 +263,7 @@ module Tremendous
|
|
|
253
263
|
id == o.id &&
|
|
254
264
|
order_id == o.order_id &&
|
|
255
265
|
created_at == o.created_at &&
|
|
266
|
+
expires_at == o.expires_at &&
|
|
256
267
|
campaign_id == o.campaign_id &&
|
|
257
268
|
products == o.products &&
|
|
258
269
|
value == o.value &&
|
|
@@ -271,7 +282,7 @@ module Tremendous
|
|
|
271
282
|
# Calculates hash code according to all attributes.
|
|
272
283
|
# @return [Integer] Hash code
|
|
273
284
|
def hash
|
|
274
|
-
[id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
285
|
+
[id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
275
286
|
end
|
|
276
287
|
|
|
277
288
|
# Builds the object from hash
|
|
@@ -21,7 +21,7 @@ module Tremendous
|
|
|
21
21
|
# Name of the product
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
# Detailed description of the product.
|
|
24
|
+
# Detailed description of the product.
|
|
25
25
|
attr_accessor :description
|
|
26
26
|
|
|
27
27
|
# The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> </tbody> </table>
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
29
32
|
attr_accessor :campaign_id
|
|
30
33
|
|
|
@@ -48,6 +51,7 @@ module Tremendous
|
|
|
48
51
|
:'id' => :'id',
|
|
49
52
|
:'order_id' => :'order_id',
|
|
50
53
|
:'created_at' => :'created_at',
|
|
54
|
+
:'expires_at' => :'expires_at',
|
|
51
55
|
:'campaign_id' => :'campaign_id',
|
|
52
56
|
:'products' => :'products',
|
|
53
57
|
:'value' => :'value',
|
|
@@ -74,6 +78,7 @@ module Tremendous
|
|
|
74
78
|
:'id' => :'String',
|
|
75
79
|
:'order_id' => :'String',
|
|
76
80
|
:'created_at' => :'Time',
|
|
81
|
+
:'expires_at' => :'Time',
|
|
77
82
|
:'campaign_id' => :'String',
|
|
78
83
|
:'products' => :'Array<String>',
|
|
79
84
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
@@ -87,6 +92,7 @@ module Tremendous
|
|
|
87
92
|
# List of attributes with nullable: true
|
|
88
93
|
def self.openapi_nullable
|
|
89
94
|
Set.new([
|
|
95
|
+
:'expires_at',
|
|
90
96
|
:'campaign_id',
|
|
91
97
|
])
|
|
92
98
|
end
|
|
@@ -119,6 +125,10 @@ module Tremendous
|
|
|
119
125
|
self.created_at = attributes[:'created_at']
|
|
120
126
|
end
|
|
121
127
|
|
|
128
|
+
if attributes.key?(:'expires_at')
|
|
129
|
+
self.expires_at = attributes[:'expires_at']
|
|
130
|
+
end
|
|
131
|
+
|
|
122
132
|
if attributes.key?(:'campaign_id')
|
|
123
133
|
self.campaign_id = attributes[:'campaign_id']
|
|
124
134
|
end
|
|
@@ -253,6 +263,7 @@ module Tremendous
|
|
|
253
263
|
id == o.id &&
|
|
254
264
|
order_id == o.order_id &&
|
|
255
265
|
created_at == o.created_at &&
|
|
266
|
+
expires_at == o.expires_at &&
|
|
256
267
|
campaign_id == o.campaign_id &&
|
|
257
268
|
products == o.products &&
|
|
258
269
|
value == o.value &&
|
|
@@ -271,7 +282,7 @@ module Tremendous
|
|
|
271
282
|
# Calculates hash code according to all attributes.
|
|
272
283
|
# @return [Integer] Hash code
|
|
273
284
|
def hash
|
|
274
|
-
[id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
285
|
+
[id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, delivery].hash
|
|
275
286
|
end
|
|
276
287
|
|
|
277
288
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
29
32
|
attr_accessor :campaign_id
|
|
30
33
|
|
|
@@ -46,6 +49,7 @@ module Tremendous
|
|
|
46
49
|
:'id' => :'id',
|
|
47
50
|
:'order_id' => :'order_id',
|
|
48
51
|
:'created_at' => :'created_at',
|
|
52
|
+
:'expires_at' => :'expires_at',
|
|
49
53
|
:'campaign_id' => :'campaign_id',
|
|
50
54
|
:'products' => :'products',
|
|
51
55
|
:'value' => :'value',
|
|
@@ -71,6 +75,7 @@ module Tremendous
|
|
|
71
75
|
:'id' => :'String',
|
|
72
76
|
:'order_id' => :'String',
|
|
73
77
|
:'created_at' => :'Time',
|
|
78
|
+
:'expires_at' => :'Time',
|
|
74
79
|
:'campaign_id' => :'String',
|
|
75
80
|
:'products' => :'Array<String>',
|
|
76
81
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
@@ -83,6 +88,7 @@ module Tremendous
|
|
|
83
88
|
# List of attributes with nullable: true
|
|
84
89
|
def self.openapi_nullable
|
|
85
90
|
Set.new([
|
|
91
|
+
:'expires_at',
|
|
86
92
|
:'campaign_id',
|
|
87
93
|
])
|
|
88
94
|
end
|
|
@@ -115,6 +121,10 @@ module Tremendous
|
|
|
115
121
|
self.created_at = attributes[:'created_at']
|
|
116
122
|
end
|
|
117
123
|
|
|
124
|
+
if attributes.key?(:'expires_at')
|
|
125
|
+
self.expires_at = attributes[:'expires_at']
|
|
126
|
+
end
|
|
127
|
+
|
|
118
128
|
if attributes.key?(:'campaign_id')
|
|
119
129
|
self.campaign_id = attributes[:'campaign_id']
|
|
120
130
|
end
|
|
@@ -245,6 +255,7 @@ module Tremendous
|
|
|
245
255
|
id == o.id &&
|
|
246
256
|
order_id == o.order_id &&
|
|
247
257
|
created_at == o.created_at &&
|
|
258
|
+
expires_at == o.expires_at &&
|
|
248
259
|
campaign_id == o.campaign_id &&
|
|
249
260
|
products == o.products &&
|
|
250
261
|
value == o.value &&
|
|
@@ -262,7 +273,7 @@ module Tremendous
|
|
|
262
273
|
# Calculates hash code according to all attributes.
|
|
263
274
|
# @return [Integer] Hash code
|
|
264
275
|
def hash
|
|
265
|
-
[id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields].hash
|
|
276
|
+
[id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields].hash
|
|
266
277
|
end
|
|
267
278
|
|
|
268
279
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Tremendous
|
|
|
25
25
|
# Date the reward was created
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# Expiration date of the reward. If null, the reward does not expire.
|
|
29
|
+
attr_accessor :expires_at
|
|
30
|
+
|
|
28
31
|
# ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.
|
|
29
32
|
attr_accessor :campaign_id
|
|
30
33
|
|
|
@@ -51,6 +54,7 @@ module Tremendous
|
|
|
51
54
|
:'id' => :'id',
|
|
52
55
|
:'order_id' => :'order_id',
|
|
53
56
|
:'created_at' => :'created_at',
|
|
57
|
+
:'expires_at' => :'expires_at',
|
|
54
58
|
:'campaign_id' => :'campaign_id',
|
|
55
59
|
:'products' => :'products',
|
|
56
60
|
:'value' => :'value',
|
|
@@ -78,6 +82,7 @@ module Tremendous
|
|
|
78
82
|
:'id' => :'String',
|
|
79
83
|
:'order_id' => :'String',
|
|
80
84
|
:'created_at' => :'Time',
|
|
85
|
+
:'expires_at' => :'Time',
|
|
81
86
|
:'campaign_id' => :'String',
|
|
82
87
|
:'products' => :'Array<String>',
|
|
83
88
|
:'value' => :'ListRewards200ResponseRewardsInnerValue',
|
|
@@ -92,6 +97,7 @@ module Tremendous
|
|
|
92
97
|
# List of attributes with nullable: true
|
|
93
98
|
def self.openapi_nullable
|
|
94
99
|
Set.new([
|
|
100
|
+
:'expires_at',
|
|
95
101
|
:'campaign_id',
|
|
96
102
|
])
|
|
97
103
|
end
|
|
@@ -124,6 +130,10 @@ module Tremendous
|
|
|
124
130
|
self.created_at = attributes[:'created_at']
|
|
125
131
|
end
|
|
126
132
|
|
|
133
|
+
if attributes.key?(:'expires_at')
|
|
134
|
+
self.expires_at = attributes[:'expires_at']
|
|
135
|
+
end
|
|
136
|
+
|
|
127
137
|
if attributes.key?(:'campaign_id')
|
|
128
138
|
self.campaign_id = attributes[:'campaign_id']
|
|
129
139
|
end
|
|
@@ -262,6 +272,7 @@ module Tremendous
|
|
|
262
272
|
id == o.id &&
|
|
263
273
|
order_id == o.order_id &&
|
|
264
274
|
created_at == o.created_at &&
|
|
275
|
+
expires_at == o.expires_at &&
|
|
265
276
|
campaign_id == o.campaign_id &&
|
|
266
277
|
products == o.products &&
|
|
267
278
|
value == o.value &&
|
|
@@ -281,7 +292,7 @@ module Tremendous
|
|
|
281
292
|
# Calculates hash code according to all attributes.
|
|
282
293
|
# @return [Integer] Hash code
|
|
283
294
|
def hash
|
|
284
|
-
[id, order_id, created_at, campaign_id, products, value, recipient, deliver_at, custom_fields, language, delivery].hash
|
|
295
|
+
[id, order_id, created_at, expires_at, campaign_id, products, value, recipient, deliver_at, custom_fields, language, delivery].hash
|
|
285
296
|
end
|
|
286
297
|
|
|
287
298
|
# Builds the object from hash
|