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.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +677 -9
- data/lib/tremendous/models/campaign.rb +25 -14
- data/lib/tremendous/models/campaign_base.rb +287 -0
- data/lib/tremendous/models/{get_campaign200_response.rb → create_campaign201_response.rb} +3 -3
- data/lib/tremendous/models/create_campaign_request.rb +273 -0
- data/lib/tremendous/models/create_member.rb +2 -53
- data/lib/tremendous/models/create_member_request.rb +2 -53
- data/lib/tremendous/models/create_order_request_reward.rb +1 -1
- data/lib/tremendous/models/create_order_request_reward_custom_fields_inner.rb +248 -0
- data/lib/tremendous/models/create_organization_request_copy_settings.rb +29 -5
- data/lib/tremendous/models/{list_products200_response_products_inner_countries_inner.rb → create_public_key.rb} +15 -15
- data/lib/tremendous/models/create_public_key200_response.rb +221 -0
- data/lib/tremendous/models/create_public_key_request.rb +222 -0
- data/lib/tremendous/models/custom_field.rb +15 -5
- data/lib/tremendous/models/get_member200_response_member.rb +13 -21
- data/lib/tremendous/models/invoice.rb +2 -2
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +25 -14
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +270 -0
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +270 -0
- data/lib/tremendous/models/{get_product200_response.rb → list_forex_response.rb} +16 -14
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +2 -2
- data/lib/tremendous/models/list_members200_response_members_inner.rb +13 -21
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +15 -5
- data/lib/tremendous/models/{list_products200_response.rb → list_roles200_response.rb} +15 -15
- data/lib/tremendous/models/{list_products200_response_products_inner_images_inner.rb → list_roles200_response_roles_inner.rb} +59 -57
- data/lib/tremendous/models/member.rb +13 -21
- data/lib/tremendous/models/member_base.rb +13 -21
- data/lib/tremendous/models/member_with_events.rb +13 -21
- data/lib/tremendous/models/member_without_events.rb +13 -21
- data/lib/tremendous/models/public_key.rb +257 -0
- data/lib/tremendous/models/public_keys_response.rb +223 -0
- data/lib/tremendous/models/public_keys_response_public_keys_inner.rb +257 -0
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +15 -5
- data/lib/tremendous/models/{list_products200_response_products_inner_skus_inner.rb → role.rb} +51 -53
- data/lib/tremendous/models/test_public_key.rb +222 -0
- data/lib/tremendous/models/test_public_key_request.rb +222 -0
- data/lib/tremendous/models/update_campaign.rb +287 -0
- data/lib/tremendous/models/update_campaign_request.rb +257 -0
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +20 -1
- metadata +23 -10
- data/lib/tremendous/models/list_products200_response_products_inner.rb +0 -457
|
@@ -14,13 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class ListForexResponse
|
|
18
|
+
attr_accessor :forex
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
21
|
def self.attribute_map
|
|
22
22
|
{
|
|
23
|
-
:'
|
|
23
|
+
:'forex' => :'forex'
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ module Tremendous
|
|
|
32
32
|
# Attribute type mapping.
|
|
33
33
|
def self.openapi_types
|
|
34
34
|
{
|
|
35
|
-
:'
|
|
35
|
+
:'forex' => :'Hash<String, Float>'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -46,21 +46,23 @@ module Tremendous
|
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
47
|
def initialize(attributes = {})
|
|
48
48
|
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListForexResponse` initialize method"
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListForexResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
56
|
end
|
|
57
57
|
h[k.to_sym] = v
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
if attributes.key?(:'
|
|
61
|
-
|
|
60
|
+
if attributes.key?(:'forex')
|
|
61
|
+
if (value = attributes[:'forex']).is_a?(Hash)
|
|
62
|
+
self.forex = value
|
|
63
|
+
end
|
|
62
64
|
else
|
|
63
|
-
self.
|
|
65
|
+
self.forex = nil
|
|
64
66
|
end
|
|
65
67
|
end
|
|
66
68
|
|
|
@@ -69,8 +71,8 @@ module Tremendous
|
|
|
69
71
|
def list_invalid_properties
|
|
70
72
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
71
73
|
invalid_properties = Array.new
|
|
72
|
-
if @
|
|
73
|
-
invalid_properties.push('invalid value for "
|
|
74
|
+
if @forex.nil?
|
|
75
|
+
invalid_properties.push('invalid value for "forex", forex cannot be nil.')
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
invalid_properties
|
|
@@ -80,7 +82,7 @@ module Tremendous
|
|
|
80
82
|
# @return true if the model is valid
|
|
81
83
|
def valid?
|
|
82
84
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
-
return false if @
|
|
85
|
+
return false if @forex.nil?
|
|
84
86
|
true
|
|
85
87
|
end
|
|
86
88
|
|
|
@@ -89,7 +91,7 @@ module Tremendous
|
|
|
89
91
|
def ==(o)
|
|
90
92
|
return true if self.equal?(o)
|
|
91
93
|
self.class == o.class &&
|
|
92
|
-
|
|
94
|
+
forex == o.forex
|
|
93
95
|
end
|
|
94
96
|
|
|
95
97
|
# @see the `==` method
|
|
@@ -101,7 +103,7 @@ module Tremendous
|
|
|
101
103
|
# Calculates hash code according to all attributes.
|
|
102
104
|
# @return [Integer] Hash code
|
|
103
105
|
def hash
|
|
104
|
-
[
|
|
106
|
+
[forex].hash
|
|
105
107
|
end
|
|
106
108
|
|
|
107
109
|
# 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
|
-
#
|
|
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`.
|
|
@@ -64,6 +67,7 @@ module Tremendous
|
|
|
64
67
|
:'id' => :'id',
|
|
65
68
|
:'email' => :'email',
|
|
66
69
|
:'name' => :'name',
|
|
70
|
+
:'active' => :'active',
|
|
67
71
|
:'role' => :'role',
|
|
68
72
|
:'status' => :'status',
|
|
69
73
|
:'created_at' => :'created_at',
|
|
@@ -82,6 +86,7 @@ module Tremendous
|
|
|
82
86
|
:'id' => :'String',
|
|
83
87
|
:'email' => :'String',
|
|
84
88
|
:'name' => :'String',
|
|
89
|
+
:'active' => :'Boolean',
|
|
85
90
|
:'role' => :'String',
|
|
86
91
|
:'status' => :'String',
|
|
87
92
|
:'created_at' => :'Time',
|
|
@@ -93,6 +98,7 @@ module Tremendous
|
|
|
93
98
|
def self.openapi_nullable
|
|
94
99
|
Set.new([
|
|
95
100
|
:'name',
|
|
101
|
+
:'role',
|
|
96
102
|
:'last_login_at'
|
|
97
103
|
])
|
|
98
104
|
end
|
|
@@ -130,10 +136,12 @@ module Tremendous
|
|
|
130
136
|
self.name = nil
|
|
131
137
|
end
|
|
132
138
|
|
|
139
|
+
if attributes.key?(:'active')
|
|
140
|
+
self.active = attributes[:'active']
|
|
141
|
+
end
|
|
142
|
+
|
|
133
143
|
if attributes.key?(:'role')
|
|
134
144
|
self.role = attributes[:'role']
|
|
135
|
-
else
|
|
136
|
-
self.role = nil
|
|
137
145
|
end
|
|
138
146
|
|
|
139
147
|
if attributes.key?(:'status')
|
|
@@ -169,10 +177,6 @@ module Tremendous
|
|
|
169
177
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
170
178
|
end
|
|
171
179
|
|
|
172
|
-
if @role.nil?
|
|
173
|
-
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
174
|
-
end
|
|
175
|
-
|
|
176
180
|
if @status.nil?
|
|
177
181
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
178
182
|
end
|
|
@@ -187,9 +191,6 @@ module Tremendous
|
|
|
187
191
|
return false if @id.nil?
|
|
188
192
|
return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
189
193
|
return false if @email.nil?
|
|
190
|
-
return false if @role.nil?
|
|
191
|
-
role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
|
|
192
|
-
return false unless role_validator.valid?(@role)
|
|
193
194
|
return false if @status.nil?
|
|
194
195
|
status_validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
|
|
195
196
|
return false unless status_validator.valid?(@status)
|
|
@@ -211,16 +212,6 @@ module Tremendous
|
|
|
211
212
|
@id = id
|
|
212
213
|
end
|
|
213
214
|
|
|
214
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
215
|
-
# @param [Object] role Object to be assigned
|
|
216
|
-
def role=(role)
|
|
217
|
-
validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
|
|
218
|
-
unless validator.valid?(role)
|
|
219
|
-
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
220
|
-
end
|
|
221
|
-
@role = role
|
|
222
|
-
end
|
|
223
|
-
|
|
224
215
|
# Custom attribute writer method checking allowed values (enum).
|
|
225
216
|
# @param [Object] status Object to be assigned
|
|
226
217
|
def status=(status)
|
|
@@ -239,6 +230,7 @@ module Tremendous
|
|
|
239
230
|
id == o.id &&
|
|
240
231
|
email == o.email &&
|
|
241
232
|
name == o.name &&
|
|
233
|
+
active == o.active &&
|
|
242
234
|
role == o.role &&
|
|
243
235
|
status == o.status &&
|
|
244
236
|
created_at == o.created_at &&
|
|
@@ -254,7 +246,7 @@ module Tremendous
|
|
|
254
246
|
# Calculates hash code according to all attributes.
|
|
255
247
|
# @return [Integer] Hash code
|
|
256
248
|
def hash
|
|
257
|
-
[id, email, name, role, status, created_at, last_login_at].hash
|
|
249
|
+
[id, email, name, active, role, status, created_at, last_login_at].hash
|
|
258
250
|
end
|
|
259
251
|
|
|
260
252
|
# Builds the object from hash
|
|
@@ -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
|
|
@@ -14,13 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class ListRoles200Response
|
|
18
|
+
attr_accessor :roles
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
21
|
def self.attribute_map
|
|
22
22
|
{
|
|
23
|
-
:'
|
|
23
|
+
:'roles' => :'roles'
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ module Tremendous
|
|
|
32
32
|
# Attribute type mapping.
|
|
33
33
|
def self.openapi_types
|
|
34
34
|
{
|
|
35
|
-
:'
|
|
35
|
+
:'roles' => :'Array<ListRoles200ResponseRolesInner>'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -46,23 +46,23 @@ module Tremendous
|
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
47
|
def initialize(attributes = {})
|
|
48
48
|
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListRoles200Response` initialize method"
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListRoles200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
56
|
end
|
|
57
57
|
h[k.to_sym] = v
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
if attributes.key?(:'
|
|
61
|
-
if (value = attributes[:'
|
|
62
|
-
self.
|
|
60
|
+
if attributes.key?(:'roles')
|
|
61
|
+
if (value = attributes[:'roles']).is_a?(Array)
|
|
62
|
+
self.roles = value
|
|
63
63
|
end
|
|
64
64
|
else
|
|
65
|
-
self.
|
|
65
|
+
self.roles = nil
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -71,8 +71,8 @@ module Tremendous
|
|
|
71
71
|
def list_invalid_properties
|
|
72
72
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
73
73
|
invalid_properties = Array.new
|
|
74
|
-
if @
|
|
75
|
-
invalid_properties.push('invalid value for "
|
|
74
|
+
if @roles.nil?
|
|
75
|
+
invalid_properties.push('invalid value for "roles", roles cannot be nil.')
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
invalid_properties
|
|
@@ -82,7 +82,7 @@ module Tremendous
|
|
|
82
82
|
# @return true if the model is valid
|
|
83
83
|
def valid?
|
|
84
84
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
-
return false if @
|
|
85
|
+
return false if @roles.nil?
|
|
86
86
|
true
|
|
87
87
|
end
|
|
88
88
|
|
|
@@ -91,7 +91,7 @@ module Tremendous
|
|
|
91
91
|
def ==(o)
|
|
92
92
|
return true if self.equal?(o)
|
|
93
93
|
self.class == o.class &&
|
|
94
|
-
|
|
94
|
+
roles == o.roles
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# @see the `==` method
|
|
@@ -103,7 +103,7 @@ module Tremendous
|
|
|
103
103
|
# Calculates hash code according to all attributes.
|
|
104
104
|
# @return [Integer] Hash code
|
|
105
105
|
def hash
|
|
106
|
-
[
|
|
106
|
+
[roles].hash
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# Builds the object from hash
|
|
@@ -14,40 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
attr_accessor :
|
|
20
|
-
|
|
21
|
-
# Type of image
|
|
22
|
-
attr_accessor :type
|
|
23
|
-
|
|
24
|
-
class EnumAttributeValidator
|
|
25
|
-
attr_reader :datatype
|
|
26
|
-
attr_reader :allowable_values
|
|
27
|
-
|
|
28
|
-
def initialize(datatype, allowable_values)
|
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
|
30
|
-
case datatype.to_s
|
|
31
|
-
when /Integer/i
|
|
32
|
-
value.to_i
|
|
33
|
-
when /Float/i
|
|
34
|
-
value.to_f
|
|
35
|
-
else
|
|
36
|
-
value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
17
|
+
# Each organization member is assigned a role that defines the permissions they have within the organization.
|
|
18
|
+
class ListRoles200ResponseRolesInner
|
|
19
|
+
attr_accessor :id
|
|
40
20
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
end
|
|
21
|
+
attr_accessor :title
|
|
22
|
+
|
|
23
|
+
attr_accessor :description
|
|
45
24
|
|
|
46
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
26
|
def self.attribute_map
|
|
48
27
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
28
|
+
:'id' => :'id',
|
|
29
|
+
:'title' => :'title',
|
|
30
|
+
:'description' => :'description'
|
|
51
31
|
}
|
|
52
32
|
end
|
|
53
33
|
|
|
@@ -59,8 +39,9 @@ module Tremendous
|
|
|
59
39
|
# Attribute type mapping.
|
|
60
40
|
def self.openapi_types
|
|
61
41
|
{
|
|
62
|
-
:'
|
|
63
|
-
:'
|
|
42
|
+
:'id' => :'String',
|
|
43
|
+
:'title' => :'String',
|
|
44
|
+
:'description' => :'String'
|
|
64
45
|
}
|
|
65
46
|
end
|
|
66
47
|
|
|
@@ -74,27 +55,33 @@ module Tremendous
|
|
|
74
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
56
|
def initialize(attributes = {})
|
|
76
57
|
if (!attributes.is_a?(Hash))
|
|
77
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListRoles200ResponseRolesInner` initialize method"
|
|
78
59
|
end
|
|
79
60
|
|
|
80
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
81
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
83
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListRoles200ResponseRolesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
84
65
|
end
|
|
85
66
|
h[k.to_sym] = v
|
|
86
67
|
}
|
|
87
68
|
|
|
88
|
-
if attributes.key?(:'
|
|
89
|
-
self.
|
|
69
|
+
if attributes.key?(:'id')
|
|
70
|
+
self.id = attributes[:'id']
|
|
71
|
+
else
|
|
72
|
+
self.id = nil
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'title')
|
|
76
|
+
self.title = attributes[:'title']
|
|
90
77
|
else
|
|
91
|
-
self.
|
|
78
|
+
self.title = nil
|
|
92
79
|
end
|
|
93
80
|
|
|
94
|
-
if attributes.key?(:'
|
|
95
|
-
self.
|
|
81
|
+
if attributes.key?(:'description')
|
|
82
|
+
self.description = attributes[:'description']
|
|
96
83
|
else
|
|
97
|
-
self.
|
|
84
|
+
self.description = nil
|
|
98
85
|
end
|
|
99
86
|
end
|
|
100
87
|
|
|
@@ -103,12 +90,21 @@ module Tremendous
|
|
|
103
90
|
def list_invalid_properties
|
|
104
91
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
92
|
invalid_properties = Array.new
|
|
106
|
-
if @
|
|
107
|
-
invalid_properties.push('invalid value for "
|
|
93
|
+
if @id.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
|
98
|
+
if @id !~ pattern
|
|
99
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @title.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
108
104
|
end
|
|
109
105
|
|
|
110
|
-
if @
|
|
111
|
-
invalid_properties.push('invalid value for "
|
|
106
|
+
if @description.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
112
108
|
end
|
|
113
109
|
|
|
114
110
|
invalid_properties
|
|
@@ -118,21 +114,26 @@ module Tremendous
|
|
|
118
114
|
# @return true if the model is valid
|
|
119
115
|
def valid?
|
|
120
116
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
|
-
return false if @
|
|
122
|
-
return false if @
|
|
123
|
-
|
|
124
|
-
return false
|
|
117
|
+
return false if @id.nil?
|
|
118
|
+
return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
119
|
+
return false if @title.nil?
|
|
120
|
+
return false if @description.nil?
|
|
125
121
|
true
|
|
126
122
|
end
|
|
127
123
|
|
|
128
|
-
# Custom attribute writer method
|
|
129
|
-
# @param [Object]
|
|
130
|
-
def
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
# Custom attribute writer method with validation
|
|
125
|
+
# @param [Object] id Value to be assigned
|
|
126
|
+
def id=(id)
|
|
127
|
+
if id.nil?
|
|
128
|
+
fail ArgumentError, 'id cannot be nil'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
|
132
|
+
if id !~ pattern
|
|
133
|
+
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
|
134
134
|
end
|
|
135
|
-
|
|
135
|
+
|
|
136
|
+
@id = id
|
|
136
137
|
end
|
|
137
138
|
|
|
138
139
|
# Checks equality by comparing each attribute.
|
|
@@ -140,8 +141,9 @@ module Tremendous
|
|
|
140
141
|
def ==(o)
|
|
141
142
|
return true if self.equal?(o)
|
|
142
143
|
self.class == o.class &&
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
id == o.id &&
|
|
145
|
+
title == o.title &&
|
|
146
|
+
description == o.description
|
|
145
147
|
end
|
|
146
148
|
|
|
147
149
|
# @see the `==` method
|
|
@@ -153,7 +155,7 @@ module Tremendous
|
|
|
153
155
|
# Calculates hash code according to all attributes.
|
|
154
156
|
# @return [Integer] Hash code
|
|
155
157
|
def hash
|
|
156
|
-
[
|
|
158
|
+
[id, title, description].hash
|
|
157
159
|
end
|
|
158
160
|
|
|
159
161
|
# 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
|
-
#
|
|
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`.
|
|
@@ -64,6 +67,7 @@ module Tremendous
|
|
|
64
67
|
:'id' => :'id',
|
|
65
68
|
:'email' => :'email',
|
|
66
69
|
:'name' => :'name',
|
|
70
|
+
:'active' => :'active',
|
|
67
71
|
:'role' => :'role',
|
|
68
72
|
:'status' => :'status',
|
|
69
73
|
:'created_at' => :'created_at',
|
|
@@ -82,6 +86,7 @@ module Tremendous
|
|
|
82
86
|
:'id' => :'String',
|
|
83
87
|
:'email' => :'String',
|
|
84
88
|
:'name' => :'String',
|
|
89
|
+
:'active' => :'Boolean',
|
|
85
90
|
:'role' => :'String',
|
|
86
91
|
:'status' => :'String',
|
|
87
92
|
:'created_at' => :'Time',
|
|
@@ -93,6 +98,7 @@ module Tremendous
|
|
|
93
98
|
def self.openapi_nullable
|
|
94
99
|
Set.new([
|
|
95
100
|
:'name',
|
|
101
|
+
:'role',
|
|
96
102
|
:'last_login_at'
|
|
97
103
|
])
|
|
98
104
|
end
|
|
@@ -130,10 +136,12 @@ module Tremendous
|
|
|
130
136
|
self.name = nil
|
|
131
137
|
end
|
|
132
138
|
|
|
139
|
+
if attributes.key?(:'active')
|
|
140
|
+
self.active = attributes[:'active']
|
|
141
|
+
end
|
|
142
|
+
|
|
133
143
|
if attributes.key?(:'role')
|
|
134
144
|
self.role = attributes[:'role']
|
|
135
|
-
else
|
|
136
|
-
self.role = nil
|
|
137
145
|
end
|
|
138
146
|
|
|
139
147
|
if attributes.key?(:'status')
|
|
@@ -169,10 +177,6 @@ module Tremendous
|
|
|
169
177
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
170
178
|
end
|
|
171
179
|
|
|
172
|
-
if @role.nil?
|
|
173
|
-
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
174
|
-
end
|
|
175
|
-
|
|
176
180
|
if @status.nil?
|
|
177
181
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
178
182
|
end
|
|
@@ -187,9 +191,6 @@ module Tremendous
|
|
|
187
191
|
return false if @id.nil?
|
|
188
192
|
return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
189
193
|
return false if @email.nil?
|
|
190
|
-
return false if @role.nil?
|
|
191
|
-
role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
|
|
192
|
-
return false unless role_validator.valid?(@role)
|
|
193
194
|
return false if @status.nil?
|
|
194
195
|
status_validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
|
|
195
196
|
return false unless status_validator.valid?(@status)
|
|
@@ -211,16 +212,6 @@ module Tremendous
|
|
|
211
212
|
@id = id
|
|
212
213
|
end
|
|
213
214
|
|
|
214
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
215
|
-
# @param [Object] role Object to be assigned
|
|
216
|
-
def role=(role)
|
|
217
|
-
validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
|
|
218
|
-
unless validator.valid?(role)
|
|
219
|
-
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
220
|
-
end
|
|
221
|
-
@role = role
|
|
222
|
-
end
|
|
223
|
-
|
|
224
215
|
# Custom attribute writer method checking allowed values (enum).
|
|
225
216
|
# @param [Object] status Object to be assigned
|
|
226
217
|
def status=(status)
|
|
@@ -239,6 +230,7 @@ module Tremendous
|
|
|
239
230
|
id == o.id &&
|
|
240
231
|
email == o.email &&
|
|
241
232
|
name == o.name &&
|
|
233
|
+
active == o.active &&
|
|
242
234
|
role == o.role &&
|
|
243
235
|
status == o.status &&
|
|
244
236
|
created_at == o.created_at &&
|
|
@@ -254,7 +246,7 @@ module Tremendous
|
|
|
254
246
|
# Calculates hash code according to all attributes.
|
|
255
247
|
# @return [Integer] Hash code
|
|
256
248
|
def hash
|
|
257
|
-
[id, email, name, role, status, created_at, last_login_at].hash
|
|
249
|
+
[id, email, name, active, role, status, created_at, last_login_at].hash
|
|
258
250
|
end
|
|
259
251
|
|
|
260
252
|
# Builds the object from hash
|