tremendous_ruby 5.6.0 → 5.7.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.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tremendous
2
- VERSION = "5.6.0"
2
+ VERSION = "5.7.0"
3
3
  end
data/lib/tremendous.rb CHANGED
@@ -47,6 +47,13 @@ require 'tremendous/models/create_organization_for_response'
47
47
  require 'tremendous/models/create_organization_properties'
48
48
  require 'tremendous/models/create_organization_request'
49
49
  require 'tremendous/models/create_organization_request_copy_settings'
50
+ require 'tremendous/models/create_report201_response'
51
+ require 'tremendous/models/create_report201_response_report'
52
+ require 'tremendous/models/create_report_request'
53
+ require 'tremendous/models/create_report_request_filters'
54
+ require 'tremendous/models/create_report_request_filters_digital_rewards'
55
+ require 'tremendous/models/create_report_request_filters_digital_rewards_amount'
56
+ require 'tremendous/models/create_report_request_filters_digital_rewards_created_at'
50
57
  require 'tremendous/models/create_webhook200_response'
51
58
  require 'tremendous/models/create_webhook_request'
52
59
  require 'tremendous/models/currency_codes'
@@ -114,6 +121,7 @@ require 'tremendous/models/list_fraud_rules200_response_fraud_rules_inner'
114
121
  require 'tremendous/models/list_funding_sources200_response'
115
122
  require 'tremendous/models/list_funding_sources200_response_funding_sources_inner'
116
123
  require 'tremendous/models/list_funding_sources200_response_funding_sources_inner_meta'
124
+ require 'tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details'
117
125
  require 'tremendous/models/list_invoices200_response'
118
126
  require 'tremendous/models/list_invoices200_response_invoices_inner'
119
127
  require 'tremendous/models/list_members200_response'
@@ -162,7 +170,9 @@ require 'tremendous/models/payout'
162
170
  require 'tremendous/models/product'
163
171
  require 'tremendous/models/recipient'
164
172
  require 'tremendous/models/refund_details'
173
+ require 'tremendous/models/report'
165
174
  require 'tremendous/models/resend_reward422_response'
175
+ require 'tremendous/models/resend_reward_request'
166
176
  require 'tremendous/models/review_country'
167
177
  require 'tremendous/models/review_country1'
168
178
  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.6.0
4
+ version: 5.7.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-09-30 00:00:00.000000000 Z
11
+ date: 2024-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -86,6 +86,13 @@ files:
86
86
  - lib/tremendous/models/create_organization_properties.rb
87
87
  - lib/tremendous/models/create_organization_request.rb
88
88
  - lib/tremendous/models/create_organization_request_copy_settings.rb
89
+ - lib/tremendous/models/create_report201_response.rb
90
+ - lib/tremendous/models/create_report201_response_report.rb
91
+ - lib/tremendous/models/create_report_request.rb
92
+ - lib/tremendous/models/create_report_request_filters.rb
93
+ - lib/tremendous/models/create_report_request_filters_digital_rewards.rb
94
+ - lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb
95
+ - lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb
89
96
  - lib/tremendous/models/create_webhook200_response.rb
90
97
  - lib/tremendous/models/create_webhook_request.rb
91
98
  - lib/tremendous/models/currency_codes.rb
@@ -153,6 +160,7 @@ files:
153
160
  - lib/tremendous/models/list_funding_sources200_response.rb
154
161
  - lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb
155
162
  - lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb
163
+ - lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb
156
164
  - lib/tremendous/models/list_invoices200_response.rb
157
165
  - lib/tremendous/models/list_invoices200_response_invoices_inner.rb
158
166
  - lib/tremendous/models/list_members200_response.rb
@@ -201,7 +209,9 @@ files:
201
209
  - lib/tremendous/models/product.rb
202
210
  - lib/tremendous/models/recipient.rb
203
211
  - lib/tremendous/models/refund_details.rb
212
+ - lib/tremendous/models/report.rb
204
213
  - lib/tremendous/models/resend_reward422_response.rb
214
+ - lib/tremendous/models/resend_reward_request.rb
205
215
  - lib/tremendous/models/review_country.rb
206
216
  - lib/tremendous/models/review_country1.rb
207
217
  - lib/tremendous/models/review_email.rb