tremendous_ruby 5.0.1 → 5.1.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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +148 -5
  3. data/lib/tremendous/models/campaign.rb +25 -14
  4. data/lib/tremendous/models/{get_campaign200_response.rb → create_campaign201_response.rb} +3 -3
  5. data/lib/tremendous/models/{list_products200_response.rb → create_campaign_request.rb} +57 -7
  6. data/lib/tremendous/models/create_member.rb +1 -18
  7. data/lib/tremendous/models/create_member_request.rb +1 -18
  8. data/lib/tremendous/models/create_order_request_reward.rb +1 -1
  9. data/lib/tremendous/models/{get_product200_response.rb → create_order_request_reward_custom_fields_inner.rb} +42 -15
  10. data/lib/tremendous/models/create_organization_request_copy_settings.rb +16 -4
  11. data/lib/tremendous/models/custom_field.rb +15 -5
  12. data/lib/tremendous/models/get_member200_response_member.rb +14 -4
  13. data/lib/tremendous/models/invoice.rb +2 -2
  14. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +25 -14
  15. data/lib/tremendous/models/{list_products200_response_products_inner_images_inner.rb → list_campaigns200_response_campaigns_inner_email_style.rb} +63 -66
  16. data/lib/tremendous/models/{list_products200_response_products_inner_skus_inner.rb → list_campaigns200_response_campaigns_inner_webpage_style.rb} +61 -68
  17. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +2 -2
  18. data/lib/tremendous/models/list_members200_response_members_inner.rb +14 -4
  19. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +15 -5
  20. data/lib/tremendous/models/member.rb +14 -4
  21. data/lib/tremendous/models/member_base.rb +14 -4
  22. data/lib/tremendous/models/member_with_events.rb +14 -4
  23. data/lib/tremendous/models/member_without_events.rb +14 -4
  24. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +15 -5
  25. data/lib/tremendous/version.rb +1 -1
  26. data/lib/tremendous.rb +5 -1
  27. metadata +8 -10
  28. data/lib/tremendous/models/list_products200_response_products_inner.rb +0 -457
  29. data/lib/tremendous/models/list_products200_response_products_inner_countries_inner.rb +0 -222
@@ -14,13 +14,29 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Tremendous
17
- class ListProducts200Response
17
+ # With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from.
18
+ class CreateCampaignRequest
19
+ # Name of the campaign
20
+ attr_accessor :name
21
+
22
+ # Description of the campaign
23
+ attr_accessor :description
24
+
25
+ # List of IDs of products (different gift cards, charity, etc.) that are available in this campaign.
18
26
  attr_accessor :products
19
27
 
28
+ attr_accessor :webpage_style
29
+
30
+ attr_accessor :email_style
31
+
20
32
  # Attribute mapping from ruby-style variable name to JSON key.
21
33
  def self.attribute_map
22
34
  {
23
- :'products' => :'products'
35
+ :'name' => :'name',
36
+ :'description' => :'description',
37
+ :'products' => :'products',
38
+ :'webpage_style' => :'webpage_style',
39
+ :'email_style' => :'email_style'
24
40
  }
25
41
  end
26
42
 
@@ -32,13 +48,18 @@ module Tremendous
32
48
  # Attribute type mapping.
33
49
  def self.openapi_types
34
50
  {
35
- :'products' => :'Array<ListProducts200ResponseProductsInner>'
51
+ :'name' => :'String',
52
+ :'description' => :'String',
53
+ :'products' => :'Array<String>',
54
+ :'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
55
+ :'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
36
56
  }
37
57
  end
38
58
 
39
59
  # List of attributes with nullable: true
40
60
  def self.openapi_nullable
41
61
  Set.new([
62
+ :'description',
42
63
  ])
43
64
  end
44
65
 
@@ -46,17 +67,29 @@ module Tremendous
46
67
  # @param [Hash] attributes Model attributes in the form of hash
47
68
  def initialize(attributes = {})
48
69
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListProducts200Response` initialize method"
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateCampaignRequest` initialize method"
50
71
  end
51
72
 
52
73
  # check to see if the attribute exists and convert string to symbol for hash key
53
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
75
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListProducts200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateCampaignRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
77
  end
57
78
  h[k.to_sym] = v
58
79
  }
59
80
 
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ else
84
+ self.name = nil
85
+ end
86
+
87
+ if attributes.key?(:'description')
88
+ self.description = attributes[:'description']
89
+ else
90
+ self.description = nil
91
+ end
92
+
60
93
  if attributes.key?(:'products')
61
94
  if (value = attributes[:'products']).is_a?(Array)
62
95
  self.products = value
@@ -64,6 +97,14 @@ module Tremendous
64
97
  else
65
98
  self.products = nil
66
99
  end
100
+
101
+ if attributes.key?(:'webpage_style')
102
+ self.webpage_style = attributes[:'webpage_style']
103
+ end
104
+
105
+ if attributes.key?(:'email_style')
106
+ self.email_style = attributes[:'email_style']
107
+ end
67
108
  end
68
109
 
69
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -71,6 +112,10 @@ module Tremendous
71
112
  def list_invalid_properties
72
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
73
114
  invalid_properties = Array.new
115
+ if @name.nil?
116
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
117
+ end
118
+
74
119
  if @products.nil?
75
120
  invalid_properties.push('invalid value for "products", products cannot be nil.')
76
121
  end
@@ -82,6 +127,7 @@ module Tremendous
82
127
  # @return true if the model is valid
83
128
  def valid?
84
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ return false if @name.nil?
85
131
  return false if @products.nil?
86
132
  true
87
133
  end
@@ -91,7 +137,11 @@ module Tremendous
91
137
  def ==(o)
92
138
  return true if self.equal?(o)
93
139
  self.class == o.class &&
94
- products == o.products
140
+ name == o.name &&
141
+ description == o.description &&
142
+ products == o.products &&
143
+ webpage_style == o.webpage_style &&
144
+ email_style == o.email_style
95
145
  end
96
146
 
97
147
  # @see the `==` method
@@ -103,7 +153,7 @@ module Tremendous
103
153
  # Calculates hash code according to all attributes.
104
154
  # @return [Integer] Hash code
105
155
  def hash
106
- [products].hash
156
+ [name, description, products, webpage_style, email_style].hash
107
157
  end
108
158
 
109
159
  # Builds the object from hash
@@ -18,9 +18,6 @@ module Tremendous
18
18
  # Email address of the member
19
19
  attr_accessor :email
20
20
 
21
- # Full name of the member
22
- attr_accessor :name
23
-
24
21
  # 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> <tbody> </table>
25
22
  attr_accessor :role
26
23
 
@@ -50,7 +47,6 @@ module Tremendous
50
47
  def self.attribute_map
51
48
  {
52
49
  :'email' => :'email',
53
- :'name' => :'name',
54
50
  :'role' => :'role'
55
51
  }
56
52
  end
@@ -64,7 +60,6 @@ module Tremendous
64
60
  def self.openapi_types
65
61
  {
66
62
  :'email' => :'String',
67
- :'name' => :'String',
68
63
  :'role' => :'String'
69
64
  }
70
65
  end
@@ -96,12 +91,6 @@ module Tremendous
96
91
  self.email = nil
97
92
  end
98
93
 
99
- if attributes.key?(:'name')
100
- self.name = attributes[:'name']
101
- else
102
- self.name = nil
103
- end
104
-
105
94
  if attributes.key?(:'role')
106
95
  self.role = attributes[:'role']
107
96
  else
@@ -118,10 +107,6 @@ module Tremendous
118
107
  invalid_properties.push('invalid value for "email", email cannot be nil.')
119
108
  end
120
109
 
121
- if @name.nil?
122
- invalid_properties.push('invalid value for "name", name cannot be nil.')
123
- end
124
-
125
110
  if @role.nil?
126
111
  invalid_properties.push('invalid value for "role", role cannot be nil.')
127
112
  end
@@ -134,7 +119,6 @@ module Tremendous
134
119
  def valid?
135
120
  warn '[DEPRECATED] the `valid?` method is obsolete'
136
121
  return false if @email.nil?
137
- return false if @name.nil?
138
122
  return false if @role.nil?
139
123
  role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
140
124
  return false unless role_validator.valid?(@role)
@@ -157,7 +141,6 @@ module Tremendous
157
141
  return true if self.equal?(o)
158
142
  self.class == o.class &&
159
143
  email == o.email &&
160
- name == o.name &&
161
144
  role == o.role
162
145
  end
163
146
 
@@ -170,7 +153,7 @@ module Tremendous
170
153
  # Calculates hash code according to all attributes.
171
154
  # @return [Integer] Hash code
172
155
  def hash
173
- [email, name, role].hash
156
+ [email, role].hash
174
157
  end
175
158
 
176
159
  # Builds the object from hash
@@ -18,9 +18,6 @@ module Tremendous
18
18
  # Email address of the member
19
19
  attr_accessor :email
20
20
 
21
- # Full name of the member
22
- attr_accessor :name
23
-
24
21
  # 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> <tbody> </table>
25
22
  attr_accessor :role
26
23
 
@@ -50,7 +47,6 @@ module Tremendous
50
47
  def self.attribute_map
51
48
  {
52
49
  :'email' => :'email',
53
- :'name' => :'name',
54
50
  :'role' => :'role'
55
51
  }
56
52
  end
@@ -64,7 +60,6 @@ module Tremendous
64
60
  def self.openapi_types
65
61
  {
66
62
  :'email' => :'String',
67
- :'name' => :'String',
68
63
  :'role' => :'String'
69
64
  }
70
65
  end
@@ -96,12 +91,6 @@ module Tremendous
96
91
  self.email = nil
97
92
  end
98
93
 
99
- if attributes.key?(:'name')
100
- self.name = attributes[:'name']
101
- else
102
- self.name = nil
103
- end
104
-
105
94
  if attributes.key?(:'role')
106
95
  self.role = attributes[:'role']
107
96
  else
@@ -118,10 +107,6 @@ module Tremendous
118
107
  invalid_properties.push('invalid value for "email", email cannot be nil.')
119
108
  end
120
109
 
121
- if @name.nil?
122
- invalid_properties.push('invalid value for "name", name cannot be nil.')
123
- end
124
-
125
110
  if @role.nil?
126
111
  invalid_properties.push('invalid value for "role", role cannot be nil.')
127
112
  end
@@ -134,7 +119,6 @@ module Tremendous
134
119
  def valid?
135
120
  warn '[DEPRECATED] the `valid?` method is obsolete'
136
121
  return false if @email.nil?
137
- return false if @name.nil?
138
122
  return false if @role.nil?
139
123
  role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
140
124
  return false unless role_validator.valid?(@role)
@@ -157,7 +141,6 @@ module Tremendous
157
141
  return true if self.equal?(o)
158
142
  self.class == o.class &&
159
143
  email == o.email &&
160
- name == o.name &&
161
144
  role == o.role
162
145
  end
163
146
 
@@ -170,7 +153,7 @@ module Tremendous
170
153
  # Calculates hash code according to all attributes.
171
154
  # @return [Integer] Hash code
172
155
  def hash
173
- [email, name, role].hash
156
+ [email, role].hash
174
157
  end
175
158
 
176
159
  # Builds the object from hash
@@ -63,7 +63,7 @@ module Tremendous
63
63
  :'value' => :'ListRewards200ResponseRewardsInnerValue',
64
64
  :'recipient' => :'ListRewards200ResponseRewardsInnerRecipient',
65
65
  :'deliver_at' => :'Date',
66
- :'custom_fields' => :'Array<ListRewards200ResponseRewardsInnerCustomFieldsInner>',
66
+ :'custom_fields' => :'Array<CreateOrderRequestRewardCustomFieldsInner>',
67
67
  :'language' => :'String',
68
68
  :'delivery' => :'CreateOrderRequestRewardDelivery'
69
69
  }
@@ -14,13 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Tremendous
17
- class GetProduct200Response
18
- attr_accessor :product
17
+ # Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)
18
+ class CreateOrderRequestRewardCustomFieldsInner
19
+ # Tremendous ID of the custom field
20
+ attr_accessor :id
21
+
22
+ # Value of the custom field
23
+ attr_accessor :value
19
24
 
20
25
  # Attribute mapping from ruby-style variable name to JSON key.
21
26
  def self.attribute_map
22
27
  {
23
- :'product' => :'product'
28
+ :'id' => :'id',
29
+ :'value' => :'value'
24
30
  }
25
31
  end
26
32
 
@@ -32,13 +38,15 @@ module Tremendous
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
35
- :'product' => :'ListProducts200ResponseProductsInner'
41
+ :'id' => :'String',
42
+ :'value' => :'String'
36
43
  }
37
44
  end
38
45
 
39
46
  # List of attributes with nullable: true
40
47
  def self.openapi_nullable
41
48
  Set.new([
49
+ :'value'
42
50
  ])
43
51
  end
44
52
 
@@ -46,21 +54,23 @@ module Tremendous
46
54
  # @param [Hash] attributes Model attributes in the form of hash
47
55
  def initialize(attributes = {})
48
56
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::GetProduct200Response` initialize method"
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateOrderRequestRewardCustomFieldsInner` initialize method"
50
58
  end
51
59
 
52
60
  # check to see if the attribute exists and convert string to symbol for hash key
53
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
62
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::GetProduct200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrderRequestRewardCustomFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
64
  end
57
65
  h[k.to_sym] = v
58
66
  }
59
67
 
60
- if attributes.key?(:'product')
61
- self.product = attributes[:'product']
62
- else
63
- self.product = nil
68
+ if attributes.key?(:'id')
69
+ self.id = attributes[:'id']
70
+ end
71
+
72
+ if attributes.key?(:'value')
73
+ self.value = attributes[:'value']
64
74
  end
65
75
  end
66
76
 
@@ -69,8 +79,9 @@ module Tremendous
69
79
  def list_invalid_properties
70
80
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
81
  invalid_properties = Array.new
72
- if @product.nil?
73
- invalid_properties.push('invalid value for "product", product cannot be nil.')
82
+ pattern = Regexp.new(/[A-Z0-9]{4,20}/)
83
+ if !@id.nil? && @id !~ pattern
84
+ invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
74
85
  end
75
86
 
76
87
  invalid_properties
@@ -80,16 +91,32 @@ module Tremendous
80
91
  # @return true if the model is valid
81
92
  def valid?
82
93
  warn '[DEPRECATED] the `valid?` method is obsolete'
83
- return false if @product.nil?
94
+ return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
84
95
  true
85
96
  end
86
97
 
98
+ # Custom attribute writer method with validation
99
+ # @param [Object] id Value to be assigned
100
+ def id=(id)
101
+ if id.nil?
102
+ fail ArgumentError, 'id cannot be nil'
103
+ end
104
+
105
+ pattern = Regexp.new(/[A-Z0-9]{4,20}/)
106
+ if id !~ pattern
107
+ fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
108
+ end
109
+
110
+ @id = id
111
+ end
112
+
87
113
  # Checks equality by comparing each attribute.
88
114
  # @param [Object] Object to be compared
89
115
  def ==(o)
90
116
  return true if self.equal?(o)
91
117
  self.class == o.class &&
92
- product == o.product
118
+ id == o.id &&
119
+ value == o.value
93
120
  end
94
121
 
95
122
  # @see the `==` method
@@ -101,7 +128,7 @@ module Tremendous
101
128
  # Calculates hash code according to all attributes.
102
129
  # @return [Integer] Hash code
103
130
  def hash
104
- [product].hash
131
+ [id, value].hash
105
132
  end
106
133
 
107
134
  # Builds the object from hash
@@ -34,6 +34,9 @@ module Tremendous
34
34
  # Copy over the users from the current organization to the new organization. Defaults to `false`.
35
35
  attr_accessor :users
36
36
 
37
+ # Copy over the fraud prevention settings and rules from the current organization to the new organization. Defaults to `false`.
38
+ attr_accessor :fraud_prevention
39
+
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
@@ -42,7 +45,8 @@ module Tremendous
42
45
  :'order_approvals' => :'order_approvals',
43
46
  :'payment_methods' => :'payment_methods',
44
47
  :'security_settings' => :'security_settings',
45
- :'users' => :'users'
48
+ :'users' => :'users',
49
+ :'fraud_prevention' => :'fraud_prevention'
46
50
  }
47
51
  end
48
52
 
@@ -59,7 +63,8 @@ module Tremendous
59
63
  :'order_approvals' => :'Boolean',
60
64
  :'payment_methods' => :'Boolean',
61
65
  :'security_settings' => :'Boolean',
62
- :'users' => :'Boolean'
66
+ :'users' => :'Boolean',
67
+ :'fraud_prevention' => :'Boolean'
63
68
  }
64
69
  end
65
70
 
@@ -119,6 +124,12 @@ module Tremendous
119
124
  else
120
125
  self.users = false
121
126
  end
127
+
128
+ if attributes.key?(:'fraud_prevention')
129
+ self.fraud_prevention = attributes[:'fraud_prevention']
130
+ else
131
+ self.fraud_prevention = false
132
+ end
122
133
  end
123
134
 
124
135
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -146,7 +157,8 @@ module Tremendous
146
157
  order_approvals == o.order_approvals &&
147
158
  payment_methods == o.payment_methods &&
148
159
  security_settings == o.security_settings &&
149
- users == o.users
160
+ users == o.users &&
161
+ fraud_prevention == o.fraud_prevention
150
162
  end
151
163
 
152
164
  # @see the `==` method
@@ -158,7 +170,7 @@ module Tremendous
158
170
  # Calculates hash code according to all attributes.
159
171
  # @return [Integer] Hash code
160
172
  def hash
161
- [campaigns, custom_fields, order_approvals, payment_methods, security_settings, users].hash
173
+ [campaigns, custom_fields, order_approvals, payment_methods, security_settings, users, fraud_prevention].hash
162
174
  end
163
175
 
164
176
  # 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
@@ -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
+ # 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> <tbody> </tbody> </table>
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>'
@@ -124,6 +129,10 @@ module Tremendous
124
129
  self.name = nil
125
130
  end
126
131
 
132
+ if attributes.key?(:'active')
133
+ self.active = attributes[:'active']
134
+ end
135
+
127
136
  if attributes.key?(:'role')
128
137
  self.role = attributes[:'role']
129
138
  else
@@ -180,7 +189,7 @@ module Tremendous
180
189
  return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
181
190
  return false if @email.nil?
182
191
  return false if @role.nil?
183
- role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
192
+ role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
184
193
  return false unless role_validator.valid?(@role)
185
194
  return false if @status.nil?
186
195
  status_validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
@@ -206,7 +215,7 @@ module Tremendous
206
215
  # Custom attribute writer method checking allowed values (enum).
207
216
  # @param [Object] role Object to be assigned
208
217
  def role=(role)
209
- validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN", "DELETED"])
218
+ validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
210
219
  unless validator.valid?(role)
211
220
  fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
212
221
  end
@@ -231,6 +240,7 @@ module Tremendous
231
240
  id == o.id &&
232
241
  email == o.email &&
233
242
  name == o.name &&
243
+ active == o.active &&
234
244
  role == o.role &&
235
245
  status == o.status &&
236
246
  events == o.events
@@ -245,7 +255,7 @@ module Tremendous
245
255
  # Calculates hash code according to all attributes.
246
256
  # @return [Integer] Hash code
247
257
  def hash
248
- [id, email, name, role, status, events].hash
258
+ [id, email, name, active, role, status, events].hash
249
259
  end
250
260
 
251
261
  # 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