tremendous_ruby 5.6.0 → 5.8.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 +148 -10
- data/lib/tremendous/models/balance_transaction.rb +13 -4
- data/lib/tremendous/models/balance_transaction_order.rb +256 -0
- data/lib/tremendous/models/balance_transaction_order_payment.rb +358 -0
- data/lib/tremendous/models/create_report201_response.rb +231 -0
- data/lib/tremendous/models/create_report201_response_report.rb +291 -0
- data/lib/tremendous/models/create_report_request.rb +295 -0
- data/lib/tremendous/models/create_report_request_filters.rb +216 -0
- data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +340 -0
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +226 -0
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +226 -0
- data/lib/tremendous/models/fraud_review.rb +23 -1
- data/lib/tremendous/models/fraud_review_risk.rb +41 -0
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +23 -1
- data/lib/tremendous/models/get_order200_response.rb +221 -0
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +13 -4
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +256 -0
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +358 -0
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +37 -7
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +225 -0
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +64 -7
- data/lib/tremendous/models/order_base_payment.rb +64 -7
- data/lib/tremendous/models/payment_details.rb +64 -7
- data/lib/tremendous/models/payout.rb +16 -4
- data/lib/tremendous/models/report.rb +291 -0
- data/lib/tremendous/models/resend_reward_request.rb +225 -0
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +16 -1
- metadata +19 -3
@@ -0,0 +1,291 @@
|
|
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 it's 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.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Tremendous
|
17
|
+
# Reports represent a collection of your Tremendous data that can be filtered and downloaded. The report object that is returned has a unique ID, a status, and an predicted time of report generation completion. When the report generation is complete, it will also contain an expiring url where you can retrieve your report.
|
18
|
+
class Report
|
19
|
+
# Tremendous ID of the report, used to retrieve your report
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
# Status of this report <table> <thead> <tr> <th>Status</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>CREATED</code></td> <td>Report has been created</td> </tr> <tr> <td><code>PROCESSING</code></td> <td>Report is currently being generated</td> </tr> <tr> <td><code>READY_FOR_DOWNLOAD</code></td> <td>Report generation is complete and ready for download</td> </tr> <tr> <td><code>FAILED</code></td> <td>Report failed to generate</td> </tr> </tbody> </table>
|
23
|
+
attr_accessor :status
|
24
|
+
|
25
|
+
# Timestamp of when the report was created
|
26
|
+
attr_accessor :created_at
|
27
|
+
|
28
|
+
# Timestamp of when the report is expected to finish generating. If the report if complete, this will return the time the report completed generating at.
|
29
|
+
attr_accessor :expected_completion_at
|
30
|
+
|
31
|
+
# URL to download the report. Only returned when the report generation is complete and report is ready for download. URL is valid for 7 days from generation completion
|
32
|
+
attr_accessor :url
|
33
|
+
|
34
|
+
class EnumAttributeValidator
|
35
|
+
attr_reader :datatype
|
36
|
+
attr_reader :allowable_values
|
37
|
+
|
38
|
+
def initialize(datatype, allowable_values)
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
40
|
+
case datatype.to_s
|
41
|
+
when /Integer/i
|
42
|
+
value.to_i
|
43
|
+
when /Float/i
|
44
|
+
value.to_f
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def valid?(value)
|
52
|
+
!value || allowable_values.include?(value)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'id' => :'id',
|
60
|
+
:'status' => :'status',
|
61
|
+
:'created_at' => :'created_at',
|
62
|
+
:'expected_completion_at' => :'expected_completion_at',
|
63
|
+
:'url' => :'url'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns all the JSON keys this model knows about
|
68
|
+
def self.acceptable_attributes
|
69
|
+
attribute_map.values
|
70
|
+
end
|
71
|
+
|
72
|
+
# Attribute type mapping.
|
73
|
+
def self.openapi_types
|
74
|
+
{
|
75
|
+
:'id' => :'String',
|
76
|
+
:'status' => :'String',
|
77
|
+
:'created_at' => :'Time',
|
78
|
+
:'expected_completion_at' => :'Time',
|
79
|
+
:'url' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# List of attributes with nullable: true
|
84
|
+
def self.openapi_nullable
|
85
|
+
Set.new([
|
86
|
+
:'url'
|
87
|
+
])
|
88
|
+
end
|
89
|
+
|
90
|
+
# Initializes the object
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
def initialize(attributes = {})
|
93
|
+
if (!attributes.is_a?(Hash))
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::Report` initialize method"
|
95
|
+
end
|
96
|
+
|
97
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
99
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::Report`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
101
|
+
end
|
102
|
+
h[k.to_sym] = v
|
103
|
+
}
|
104
|
+
|
105
|
+
if attributes.key?(:'id')
|
106
|
+
self.id = attributes[:'id']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'status')
|
110
|
+
self.status = attributes[:'status']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'created_at')
|
114
|
+
self.created_at = attributes[:'created_at']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'expected_completion_at')
|
118
|
+
self.expected_completion_at = attributes[:'expected_completion_at']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'url')
|
122
|
+
self.url = attributes[:'url']
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
127
|
+
# @return Array for valid properties with the reasons
|
128
|
+
def list_invalid_properties
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
130
|
+
invalid_properties = Array.new
|
131
|
+
invalid_properties
|
132
|
+
end
|
133
|
+
|
134
|
+
# Check to see if the all the properties in the model are valid
|
135
|
+
# @return true if the model is valid
|
136
|
+
def valid?
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
138
|
+
status_validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "READY_FOR_DOWNLOAD", "FAILED"])
|
139
|
+
return false unless status_validator.valid?(@status)
|
140
|
+
true
|
141
|
+
end
|
142
|
+
|
143
|
+
# Custom attribute writer method checking allowed values (enum).
|
144
|
+
# @param [Object] status Object to be assigned
|
145
|
+
def status=(status)
|
146
|
+
validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "READY_FOR_DOWNLOAD", "FAILED"])
|
147
|
+
unless validator.valid?(status)
|
148
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
149
|
+
end
|
150
|
+
@status = status
|
151
|
+
end
|
152
|
+
|
153
|
+
# Checks equality by comparing each attribute.
|
154
|
+
# @param [Object] Object to be compared
|
155
|
+
def ==(o)
|
156
|
+
return true if self.equal?(o)
|
157
|
+
self.class == o.class &&
|
158
|
+
id == o.id &&
|
159
|
+
status == o.status &&
|
160
|
+
created_at == o.created_at &&
|
161
|
+
expected_completion_at == o.expected_completion_at &&
|
162
|
+
url == o.url
|
163
|
+
end
|
164
|
+
|
165
|
+
# @see the `==` method
|
166
|
+
# @param [Object] Object to be compared
|
167
|
+
def eql?(o)
|
168
|
+
self == o
|
169
|
+
end
|
170
|
+
|
171
|
+
# Calculates hash code according to all attributes.
|
172
|
+
# @return [Integer] Hash code
|
173
|
+
def hash
|
174
|
+
[id, status, created_at, expected_completion_at, url].hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Builds the object from hash
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
+
# @return [Object] Returns the model itself
|
180
|
+
def self.build_from_hash(attributes)
|
181
|
+
return nil unless attributes.is_a?(Hash)
|
182
|
+
attributes = attributes.transform_keys(&:to_sym)
|
183
|
+
transformed_hash = {}
|
184
|
+
openapi_types.each_pair do |key, type|
|
185
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
186
|
+
transformed_hash["#{key}"] = nil
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
188
|
+
# check to ensure the input is an array given that the attribute
|
189
|
+
# is documented as an array but the input is not
|
190
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
191
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
192
|
+
end
|
193
|
+
elsif !attributes[attribute_map[key]].nil?
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
195
|
+
end
|
196
|
+
end
|
197
|
+
new(transformed_hash)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Deserializes the data based on type
|
201
|
+
# @param string type Data type
|
202
|
+
# @param string value Value to be deserialized
|
203
|
+
# @return [Object] Deserialized data
|
204
|
+
def self._deserialize(type, value)
|
205
|
+
case type.to_sym
|
206
|
+
when :Time
|
207
|
+
Time.parse(value)
|
208
|
+
when :Date
|
209
|
+
Date.parse(value)
|
210
|
+
when :String
|
211
|
+
value.to_s
|
212
|
+
when :Integer
|
213
|
+
value.to_i
|
214
|
+
when :Float
|
215
|
+
value.to_f
|
216
|
+
when :Boolean
|
217
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
218
|
+
true
|
219
|
+
else
|
220
|
+
false
|
221
|
+
end
|
222
|
+
when :Object
|
223
|
+
# generic object (usually a Hash), return directly
|
224
|
+
value
|
225
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
226
|
+
inner_type = Regexp.last_match[:inner_type]
|
227
|
+
value.map { |v| _deserialize(inner_type, v) }
|
228
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
229
|
+
k_type = Regexp.last_match[:k_type]
|
230
|
+
v_type = Regexp.last_match[:v_type]
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each do |k, v|
|
233
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
else # model
|
237
|
+
# models (e.g. Pet) or oneOf
|
238
|
+
klass = Tremendous.const_get(type)
|
239
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
# Returns the string representation of the object
|
244
|
+
# @return [String] String presentation of the object
|
245
|
+
def to_s
|
246
|
+
to_hash.to_s
|
247
|
+
end
|
248
|
+
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
251
|
+
def to_body
|
252
|
+
to_hash
|
253
|
+
end
|
254
|
+
|
255
|
+
# Returns the object in the form of hash
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
257
|
+
def to_hash
|
258
|
+
hash = {}
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
260
|
+
value = self.send(attr)
|
261
|
+
if value.nil?
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
264
|
+
end
|
265
|
+
|
266
|
+
hash[param] = _to_hash(value)
|
267
|
+
end
|
268
|
+
hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Outputs non-array value in the form of hash
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
273
|
+
# @param [Object] value Any valid value
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
275
|
+
def _to_hash(value)
|
276
|
+
if value.is_a?(Array)
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
278
|
+
elsif value.is_a?(Hash)
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
281
|
+
end
|
282
|
+
elsif value.respond_to? :to_hash
|
283
|
+
value.to_hash
|
284
|
+
else
|
285
|
+
value
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
end
|
290
|
+
|
291
|
+
end
|
@@ -0,0 +1,225 @@
|
|
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 it's 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.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Tremendous
|
17
|
+
class ResendRewardRequest
|
18
|
+
# The new email address of the recipient (only for rewards delivered via email)
|
19
|
+
attr_accessor :updated_email
|
20
|
+
|
21
|
+
# The new phone number of the recipient (only for rewards delivered via SMS)
|
22
|
+
attr_accessor :updated_phone
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'updated_email' => :'updated_email',
|
28
|
+
:'updated_phone' => :'updated_phone'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'updated_email' => :'String',
|
41
|
+
:'updated_phone' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ResendRewardRequest` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ResendRewardRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'updated_email')
|
67
|
+
self.updated_email = attributes[:'updated_email']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'updated_phone')
|
71
|
+
self.updated_phone = attributes[:'updated_phone']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
|
+
invalid_properties = Array.new
|
80
|
+
invalid_properties
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
updated_email == o.updated_email &&
|
96
|
+
updated_phone == o.updated_phone
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[updated_email, updated_phone].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
122
|
+
# check to ensure the input is an array given that the attribute
|
123
|
+
# is documented as an array but the input is not
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
126
|
+
end
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
new(transformed_hash)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def self._deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :Time
|
141
|
+
Time.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :Boolean
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
# models (e.g. Pet) or oneOf
|
172
|
+
klass = Tremendous.const_get(type)
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the string representation of the object
|
178
|
+
# @return [String] String presentation of the object
|
179
|
+
def to_s
|
180
|
+
to_hash.to_s
|
181
|
+
end
|
182
|
+
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_body
|
186
|
+
to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = self.send(attr)
|
195
|
+
if value.nil?
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
|
+
end
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
data/lib/tremendous/version.rb
CHANGED
data/lib/tremendous.rb
CHANGED
@@ -22,6 +22,8 @@ require 'tremendous/models/allow_email1'
|
|
22
22
|
require 'tremendous/models/allow_ip'
|
23
23
|
require 'tremendous/models/allow_ip1'
|
24
24
|
require 'tremendous/models/balance_transaction'
|
25
|
+
require 'tremendous/models/balance_transaction_order'
|
26
|
+
require 'tremendous/models/balance_transaction_order_payment'
|
25
27
|
require 'tremendous/models/base_order_for_create'
|
26
28
|
require 'tremendous/models/campaign'
|
27
29
|
require 'tremendous/models/campaign_base'
|
@@ -38,7 +40,6 @@ require 'tremendous/models/create_order200_response'
|
|
38
40
|
require 'tremendous/models/create_order200_response_order'
|
39
41
|
require 'tremendous/models/create_order200_response_order_rewards_inner'
|
40
42
|
require 'tremendous/models/create_order200_response_order_rewards_inner_delivery'
|
41
|
-
require 'tremendous/models/create_order201_response'
|
42
43
|
require 'tremendous/models/create_order_request'
|
43
44
|
require 'tremendous/models/create_organization'
|
44
45
|
require 'tremendous/models/create_organization200_response'
|
@@ -47,6 +48,13 @@ require 'tremendous/models/create_organization_for_response'
|
|
47
48
|
require 'tremendous/models/create_organization_properties'
|
48
49
|
require 'tremendous/models/create_organization_request'
|
49
50
|
require 'tremendous/models/create_organization_request_copy_settings'
|
51
|
+
require 'tremendous/models/create_report201_response'
|
52
|
+
require 'tremendous/models/create_report201_response_report'
|
53
|
+
require 'tremendous/models/create_report_request'
|
54
|
+
require 'tremendous/models/create_report_request_filters'
|
55
|
+
require 'tremendous/models/create_report_request_filters_digital_rewards'
|
56
|
+
require 'tremendous/models/create_report_request_filters_digital_rewards_amount'
|
57
|
+
require 'tremendous/models/create_report_request_filters_digital_rewards_created_at'
|
50
58
|
require 'tremendous/models/create_webhook200_response'
|
51
59
|
require 'tremendous/models/create_webhook_request'
|
52
60
|
require 'tremendous/models/currency_codes'
|
@@ -72,6 +80,7 @@ require 'tremendous/models/fraud_review_list_item'
|
|
72
80
|
require 'tremendous/models/fraud_review_reason'
|
73
81
|
require 'tremendous/models/fraud_review_redemption_method'
|
74
82
|
require 'tremendous/models/fraud_review_related_rewards'
|
83
|
+
require 'tremendous/models/fraud_review_risk'
|
75
84
|
require 'tremendous/models/fraud_review_status'
|
76
85
|
require 'tremendous/models/fraud_rule200_response'
|
77
86
|
require 'tremendous/models/fraud_rule400_response'
|
@@ -94,12 +103,15 @@ require 'tremendous/models/get_funding_source200_response'
|
|
94
103
|
require 'tremendous/models/get_member200_response'
|
95
104
|
require 'tremendous/models/get_member200_response_member'
|
96
105
|
require 'tremendous/models/get_member200_response_member_events_inner'
|
106
|
+
require 'tremendous/models/get_order200_response'
|
97
107
|
require 'tremendous/models/get_organization200_response'
|
98
108
|
require 'tremendous/models/get_product_response'
|
99
109
|
require 'tremendous/models/get_reward200_response'
|
100
110
|
require 'tremendous/models/invoice'
|
101
111
|
require 'tremendous/models/list_balance_transactions200_response'
|
102
112
|
require 'tremendous/models/list_balance_transactions200_response_transactions_inner'
|
113
|
+
require 'tremendous/models/list_balance_transactions200_response_transactions_inner_order'
|
114
|
+
require 'tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment'
|
103
115
|
require 'tremendous/models/list_campaigns200_response'
|
104
116
|
require 'tremendous/models/list_campaigns200_response_campaigns_inner'
|
105
117
|
require 'tremendous/models/list_campaigns200_response_campaigns_inner_email_style'
|
@@ -114,6 +126,7 @@ require 'tremendous/models/list_fraud_rules200_response_fraud_rules_inner'
|
|
114
126
|
require 'tremendous/models/list_funding_sources200_response'
|
115
127
|
require 'tremendous/models/list_funding_sources200_response_funding_sources_inner'
|
116
128
|
require 'tremendous/models/list_funding_sources200_response_funding_sources_inner_meta'
|
129
|
+
require 'tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details'
|
117
130
|
require 'tremendous/models/list_invoices200_response'
|
118
131
|
require 'tremendous/models/list_invoices200_response_invoices_inner'
|
119
132
|
require 'tremendous/models/list_members200_response'
|
@@ -162,7 +175,9 @@ require 'tremendous/models/payout'
|
|
162
175
|
require 'tremendous/models/product'
|
163
176
|
require 'tremendous/models/recipient'
|
164
177
|
require 'tremendous/models/refund_details'
|
178
|
+
require 'tremendous/models/report'
|
165
179
|
require 'tremendous/models/resend_reward422_response'
|
180
|
+
require 'tremendous/models/resend_reward_request'
|
166
181
|
require 'tremendous/models/review_country'
|
167
182
|
require 'tremendous/models/review_country1'
|
168
183
|
require 'tremendous/models/review_email'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tremendous_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tremendous Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -61,6 +61,8 @@ files:
|
|
61
61
|
- lib/tremendous/models/allow_ip.rb
|
62
62
|
- lib/tremendous/models/allow_ip1.rb
|
63
63
|
- lib/tremendous/models/balance_transaction.rb
|
64
|
+
- lib/tremendous/models/balance_transaction_order.rb
|
65
|
+
- lib/tremendous/models/balance_transaction_order_payment.rb
|
64
66
|
- lib/tremendous/models/base_order_for_create.rb
|
65
67
|
- lib/tremendous/models/campaign.rb
|
66
68
|
- lib/tremendous/models/campaign_base.rb
|
@@ -86,6 +88,13 @@ files:
|
|
86
88
|
- lib/tremendous/models/create_organization_properties.rb
|
87
89
|
- lib/tremendous/models/create_organization_request.rb
|
88
90
|
- lib/tremendous/models/create_organization_request_copy_settings.rb
|
91
|
+
- lib/tremendous/models/create_report201_response.rb
|
92
|
+
- lib/tremendous/models/create_report201_response_report.rb
|
93
|
+
- lib/tremendous/models/create_report_request.rb
|
94
|
+
- lib/tremendous/models/create_report_request_filters.rb
|
95
|
+
- lib/tremendous/models/create_report_request_filters_digital_rewards.rb
|
96
|
+
- lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb
|
97
|
+
- lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb
|
89
98
|
- lib/tremendous/models/create_webhook200_response.rb
|
90
99
|
- lib/tremendous/models/create_webhook_request.rb
|
91
100
|
- lib/tremendous/models/currency_codes.rb
|
@@ -111,6 +120,7 @@ files:
|
|
111
120
|
- lib/tremendous/models/fraud_review_reason.rb
|
112
121
|
- lib/tremendous/models/fraud_review_redemption_method.rb
|
113
122
|
- lib/tremendous/models/fraud_review_related_rewards.rb
|
123
|
+
- lib/tremendous/models/fraud_review_risk.rb
|
114
124
|
- lib/tremendous/models/fraud_review_status.rb
|
115
125
|
- lib/tremendous/models/fraud_rule200_response.rb
|
116
126
|
- lib/tremendous/models/fraud_rule400_response.rb
|
@@ -133,12 +143,15 @@ files:
|
|
133
143
|
- lib/tremendous/models/get_member200_response.rb
|
134
144
|
- lib/tremendous/models/get_member200_response_member.rb
|
135
145
|
- lib/tremendous/models/get_member200_response_member_events_inner.rb
|
146
|
+
- lib/tremendous/models/get_order200_response.rb
|
136
147
|
- lib/tremendous/models/get_organization200_response.rb
|
137
148
|
- lib/tremendous/models/get_product_response.rb
|
138
149
|
- lib/tremendous/models/get_reward200_response.rb
|
139
150
|
- lib/tremendous/models/invoice.rb
|
140
151
|
- lib/tremendous/models/list_balance_transactions200_response.rb
|
141
152
|
- lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb
|
153
|
+
- lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb
|
154
|
+
- lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb
|
142
155
|
- lib/tremendous/models/list_campaigns200_response.rb
|
143
156
|
- lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb
|
144
157
|
- lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb
|
@@ -153,6 +166,7 @@ files:
|
|
153
166
|
- lib/tremendous/models/list_funding_sources200_response.rb
|
154
167
|
- lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb
|
155
168
|
- lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb
|
169
|
+
- lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb
|
156
170
|
- lib/tremendous/models/list_invoices200_response.rb
|
157
171
|
- lib/tremendous/models/list_invoices200_response_invoices_inner.rb
|
158
172
|
- lib/tremendous/models/list_members200_response.rb
|
@@ -201,7 +215,9 @@ files:
|
|
201
215
|
- lib/tremendous/models/product.rb
|
202
216
|
- lib/tremendous/models/recipient.rb
|
203
217
|
- lib/tremendous/models/refund_details.rb
|
218
|
+
- lib/tremendous/models/report.rb
|
204
219
|
- lib/tremendous/models/resend_reward422_response.rb
|
220
|
+
- lib/tremendous/models/resend_reward_request.rb
|
205
221
|
- lib/tremendous/models/review_country.rb
|
206
222
|
- lib/tremendous/models/review_country1.rb
|
207
223
|
- lib/tremendous/models/review_email.rb
|
@@ -261,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
277
|
- !ruby/object:Gem::Version
|
262
278
|
version: '0'
|
263
279
|
requirements: []
|
264
|
-
rubygems_version: 3.5.
|
280
|
+
rubygems_version: 3.5.22
|
265
281
|
signing_key:
|
266
282
|
specification_version: 4
|
267
283
|
summary: Tremendous Ruby API SDK
|