tremendous_ruby 5.0.1 → 5.3.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +677 -9
  3. data/lib/tremendous/models/campaign.rb +25 -14
  4. data/lib/tremendous/models/campaign_base.rb +287 -0
  5. data/lib/tremendous/models/{get_campaign200_response.rb → create_campaign201_response.rb} +3 -3
  6. data/lib/tremendous/models/create_campaign_request.rb +273 -0
  7. data/lib/tremendous/models/create_member.rb +2 -53
  8. data/lib/tremendous/models/create_member_request.rb +2 -53
  9. data/lib/tremendous/models/create_order_request_reward.rb +1 -1
  10. data/lib/tremendous/models/create_order_request_reward_custom_fields_inner.rb +248 -0
  11. data/lib/tremendous/models/create_organization_request_copy_settings.rb +29 -5
  12. data/lib/tremendous/models/{list_products200_response_products_inner_countries_inner.rb → create_public_key.rb} +15 -15
  13. data/lib/tremendous/models/create_public_key200_response.rb +221 -0
  14. data/lib/tremendous/models/create_public_key_request.rb +222 -0
  15. data/lib/tremendous/models/custom_field.rb +15 -5
  16. data/lib/tremendous/models/get_member200_response_member.rb +13 -21
  17. data/lib/tremendous/models/invoice.rb +2 -2
  18. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +25 -14
  19. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +270 -0
  20. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +270 -0
  21. data/lib/tremendous/models/{get_product200_response.rb → list_forex_response.rb} +16 -14
  22. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +2 -2
  23. data/lib/tremendous/models/list_members200_response_members_inner.rb +13 -21
  24. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +15 -5
  25. data/lib/tremendous/models/{list_products200_response.rb → list_roles200_response.rb} +15 -15
  26. data/lib/tremendous/models/{list_products200_response_products_inner_images_inner.rb → list_roles200_response_roles_inner.rb} +59 -57
  27. data/lib/tremendous/models/member.rb +13 -21
  28. data/lib/tremendous/models/member_base.rb +13 -21
  29. data/lib/tremendous/models/member_with_events.rb +13 -21
  30. data/lib/tremendous/models/member_without_events.rb +13 -21
  31. data/lib/tremendous/models/public_key.rb +257 -0
  32. data/lib/tremendous/models/public_keys_response.rb +223 -0
  33. data/lib/tremendous/models/public_keys_response_public_keys_inner.rb +257 -0
  34. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +15 -5
  35. data/lib/tremendous/models/{list_products200_response_products_inner_skus_inner.rb → role.rb} +51 -53
  36. data/lib/tremendous/models/test_public_key.rb +222 -0
  37. data/lib/tremendous/models/test_public_key_request.rb +222 -0
  38. data/lib/tremendous/models/update_campaign.rb +287 -0
  39. data/lib/tremendous/models/update_campaign_request.rb +257 -0
  40. data/lib/tremendous/version.rb +1 -1
  41. data/lib/tremendous.rb +20 -1
  42. metadata +23 -10
  43. data/lib/tremendous/models/list_products200_response_products_inner.rb +0 -457
@@ -0,0 +1,221 @@
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
+ OpenAPI Generator version: 7.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Tremendous
17
+ class CreatePublicKey200Response
18
+ attr_accessor :public_key
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'public_key' => :'public_key'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'public_key' => :'PublicKeysResponsePublicKeysInner'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreatePublicKey200Response` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreatePublicKey200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'public_key')
61
+ self.public_key = attributes[:'public_key']
62
+ else
63
+ self.public_key = nil
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
+ invalid_properties = Array.new
72
+ if @public_key.nil?
73
+ invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
74
+ end
75
+
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ return false if @public_key.nil?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ public_key == o.public_key
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [public_key].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = Tremendous.const_get(type)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -0,0 +1,222 @@
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
+ OpenAPI Generator version: 7.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Tremendous
17
+ class CreatePublicKeyRequest
18
+ # Base64 encoded (public) PEM file
19
+ attr_accessor :public_key
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'public_key' => :'public_key'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'public_key' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreatePublicKeyRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreatePublicKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'public_key')
62
+ self.public_key = attributes[:'public_key']
63
+ else
64
+ self.public_key = nil
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ if @public_key.nil?
74
+ invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ return false if @public_key.nil?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ public_key == o.public_key
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [public_key].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def self._deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = Tremendous.const_get(type)
170
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -22,11 +22,15 @@ module Tremendous
22
22
  # Value of the custom field
23
23
  attr_accessor :value
24
24
 
25
+ # Label of the custom field
26
+ attr_accessor :label
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'id' => :'id',
29
- :'value' => :'value'
32
+ :'value' => :'value',
33
+ :'label' => :'label'
30
34
  }
31
35
  end
32
36
 
@@ -39,14 +43,15 @@ module Tremendous
39
43
  def self.openapi_types
40
44
  {
41
45
  :'id' => :'String',
42
- :'value' => :'String'
46
+ :'value' => :'String',
47
+ :'label' => :'String'
43
48
  }
44
49
  end
45
50
 
46
51
  # List of attributes with nullable: true
47
52
  def self.openapi_nullable
48
53
  Set.new([
49
- :'value'
54
+ :'value',
50
55
  ])
51
56
  end
52
57
 
@@ -72,6 +77,10 @@ module Tremendous
72
77
  if attributes.key?(:'value')
73
78
  self.value = attributes[:'value']
74
79
  end
80
+
81
+ if attributes.key?(:'label')
82
+ self.label = attributes[:'label']
83
+ end
75
84
  end
76
85
 
77
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,7 +125,8 @@ module Tremendous
116
125
  return true if self.equal?(o)
117
126
  self.class == o.class &&
118
127
  id == o.id &&
119
- value == o.value
128
+ value == o.value &&
129
+ label == o.label
120
130
  end
121
131
 
122
132
  # @see the `==` method
@@ -128,7 +138,7 @@ module Tremendous
128
138
  # Calculates hash code according to all attributes.
129
139
  # @return [Integer] Hash code
130
140
  def hash
131
- [id, value].hash
141
+ [id, value, label].hash
132
142
  end
133
143
 
134
144
  # Builds the object from hash
@@ -24,7 +24,10 @@ module Tremendous
24
24
  # Full name of the member
25
25
  attr_accessor :name
26
26
 
27
- # Role of the member within the organization. <table> <thead> <tr> <th>Role</th> <th>Description</th> </tr> </thead> <tr> <td><code>MEMBER</code></td> <td>Limited permissions. Can view their own reward and order histories only.</td> </tr> <tr> <td><code>ADMIN</code></td> <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td> </tr> <tr> <td><code>DELETED</code></td> <td>No longer a member of this organization.</td> </tr> <tbody> </tbody> </table>
27
+ # Is this member currently active in the organization. If `false`, the member will not be able to access the organization.
28
+ attr_accessor :active
29
+
30
+ # The role ID associated with the member within the organization.
28
31
  attr_accessor :role
29
32
 
30
33
  # Current status of the member's account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.
@@ -61,6 +64,7 @@ module Tremendous
61
64
  :'id' => :'id',
62
65
  :'email' => :'email',
63
66
  :'name' => :'name',
67
+ :'active' => :'active',
64
68
  :'role' => :'role',
65
69
  :'status' => :'status',
66
70
  :'events' => :'events'
@@ -78,6 +82,7 @@ module Tremendous
78
82
  :'id' => :'String',
79
83
  :'email' => :'String',
80
84
  :'name' => :'String',
85
+ :'active' => :'Boolean',
81
86
  :'role' => :'String',
82
87
  :'status' => :'String',
83
88
  :'events' => :'Array<GetMember200ResponseMemberEventsInner>'
@@ -88,6 +93,7 @@ module Tremendous
88
93
  def self.openapi_nullable
89
94
  Set.new([
90
95
  :'name',
96
+ :'role',
91
97
  ])
92
98
  end
93
99
 
@@ -124,10 +130,12 @@ module Tremendous
124
130
  self.name = nil
125
131
  end
126
132
 
133
+ if attributes.key?(:'active')
134
+ self.active = attributes[:'active']
135
+ end
136
+
127
137
  if attributes.key?(:'role')
128
138
  self.role = attributes[:'role']
129
- else
130
- self.role = nil
131
139
  end
132
140
 
133
141
  if attributes.key?(:'status')
@@ -161,10 +169,6 @@ module Tremendous
161
169
  invalid_properties.push('invalid value for "email", email cannot be nil.')
162
170
  end
163
171
 
164
- if @role.nil?
165
- invalid_properties.push('invalid value for "role", role cannot be nil.')
166
- end
167
-
168
172
  if @status.nil?
169
173
  invalid_properties.push('invalid value for "status", status cannot be nil.')
170
174
  end
@@ -179,9 +183,6 @@ module Tremendous
179
183
  return false if @id.nil?
180
184
  return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
181
185
  return false if @email.nil?
182
- return false if @role.nil?
183
- role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
184
- return false unless role_validator.valid?(@role)
185
186
  return false if @status.nil?
186
187
  status_validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
187
188
  return false unless status_validator.valid?(@status)
@@ -203,16 +204,6 @@ module Tremendous
203
204
  @id = id
204
205
  end
205
206
 
206
- # Custom attribute writer method checking allowed values (enum).
207
- # @param [Object] role Object to be assigned
208
- def role=(role)
209
- validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
210
- unless validator.valid?(role)
211
- fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
212
- end
213
- @role = role
214
- end
215
-
216
207
  # Custom attribute writer method checking allowed values (enum).
217
208
  # @param [Object] status Object to be assigned
218
209
  def status=(status)
@@ -231,6 +222,7 @@ module Tremendous
231
222
  id == o.id &&
232
223
  email == o.email &&
233
224
  name == o.name &&
225
+ active == o.active &&
234
226
  role == o.role &&
235
227
  status == o.status &&
236
228
  events == o.events
@@ -245,7 +237,7 @@ module Tremendous
245
237
  # Calculates hash code according to all attributes.
246
238
  # @return [Integer] Hash code
247
239
  def hash
248
- [id, email, name, role, status, events].hash
240
+ [id, email, name, active, role, status, events].hash
249
241
  end
250
242
 
251
243
  # Builds the object from hash
@@ -90,8 +90,8 @@ module Tremendous
90
90
  :'status' => :'String',
91
91
  :'orders' => :'Array<String>',
92
92
  :'rewards' => :'Array<String>',
93
- :'created_at' => :'Date',
94
- :'paid_at' => :'Date'
93
+ :'created_at' => :'Time',
94
+ :'paid_at' => :'Time'
95
95
  }
96
96
  end
97
97