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.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +148 -5
- data/lib/tremendous/models/campaign.rb +25 -14
- data/lib/tremendous/models/{get_campaign200_response.rb → create_campaign201_response.rb} +3 -3
- data/lib/tremendous/models/{list_products200_response.rb → create_campaign_request.rb} +57 -7
- data/lib/tremendous/models/create_member.rb +1 -18
- data/lib/tremendous/models/create_member_request.rb +1 -18
- data/lib/tremendous/models/create_order_request_reward.rb +1 -1
- data/lib/tremendous/models/{get_product200_response.rb → create_order_request_reward_custom_fields_inner.rb} +42 -15
- data/lib/tremendous/models/create_organization_request_copy_settings.rb +16 -4
- data/lib/tremendous/models/custom_field.rb +15 -5
- data/lib/tremendous/models/get_member200_response_member.rb +14 -4
- 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_products200_response_products_inner_images_inner.rb → list_campaigns200_response_campaigns_inner_email_style.rb} +63 -66
- data/lib/tremendous/models/{list_products200_response_products_inner_skus_inner.rb → list_campaigns200_response_campaigns_inner_webpage_style.rb} +61 -68
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +2 -2
- data/lib/tremendous/models/list_members200_response_members_inner.rb +14 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +15 -5
- data/lib/tremendous/models/member.rb +14 -4
- data/lib/tremendous/models/member_base.rb +14 -4
- data/lib/tremendous/models/member_with_events.rb +14 -4
- data/lib/tremendous/models/member_without_events.rb +14 -4
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +15 -5
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +5 -1
- metadata +8 -10
- data/lib/tremendous/models/list_products200_response_products_inner.rb +0 -457
- data/lib/tremendous/models/list_products200_response_products_inner_countries_inner.rb +0 -222
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
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.
|
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
18
|
class ListCampaigns200ResponseCampaignsInner
|
19
19
|
attr_accessor :id
|
20
20
|
|
@@ -27,13 +27,19 @@ module Tremendous
|
|
27
27
|
# List of IDs of products (different gift cards, charity, etc.) that are available in this campaign.
|
28
28
|
attr_accessor :products
|
29
29
|
|
30
|
+
attr_accessor :webpage_style
|
31
|
+
|
32
|
+
attr_accessor :email_style
|
33
|
+
|
30
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
35
|
def self.attribute_map
|
32
36
|
{
|
33
37
|
:'id' => :'id',
|
34
38
|
:'name' => :'name',
|
35
39
|
:'description' => :'description',
|
36
|
-
:'products' => :'products'
|
40
|
+
:'products' => :'products',
|
41
|
+
:'webpage_style' => :'webpage_style',
|
42
|
+
:'email_style' => :'email_style'
|
37
43
|
}
|
38
44
|
end
|
39
45
|
|
@@ -48,7 +54,9 @@ module Tremendous
|
|
48
54
|
:'id' => :'String',
|
49
55
|
:'name' => :'String',
|
50
56
|
:'description' => :'String',
|
51
|
-
:'products' => :'Array<String>'
|
57
|
+
:'products' => :'Array<String>',
|
58
|
+
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
59
|
+
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
52
60
|
}
|
53
61
|
end
|
54
62
|
|
@@ -76,8 +84,6 @@ module Tremendous
|
|
76
84
|
|
77
85
|
if attributes.key?(:'id')
|
78
86
|
self.id = attributes[:'id']
|
79
|
-
else
|
80
|
-
self.id = nil
|
81
87
|
end
|
82
88
|
|
83
89
|
if attributes.key?(:'name')
|
@@ -99,6 +105,14 @@ module Tremendous
|
|
99
105
|
else
|
100
106
|
self.products = nil
|
101
107
|
end
|
108
|
+
|
109
|
+
if attributes.key?(:'webpage_style')
|
110
|
+
self.webpage_style = attributes[:'webpage_style']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'email_style')
|
114
|
+
self.email_style = attributes[:'email_style']
|
115
|
+
end
|
102
116
|
end
|
103
117
|
|
104
118
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -106,12 +120,8 @@ module Tremendous
|
|
106
120
|
def list_invalid_properties
|
107
121
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
108
122
|
invalid_properties = Array.new
|
109
|
-
if @id.nil?
|
110
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
111
|
-
end
|
112
|
-
|
113
123
|
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
114
|
-
if @id !~ pattern
|
124
|
+
if !@id.nil? && @id !~ pattern
|
115
125
|
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
116
126
|
end
|
117
127
|
|
@@ -130,8 +140,7 @@ module Tremendous
|
|
130
140
|
# @return true if the model is valid
|
131
141
|
def valid?
|
132
142
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
|
-
return false if
|
134
|
-
return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
143
|
+
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
135
144
|
return false if @name.nil?
|
136
145
|
return false if @products.nil?
|
137
146
|
true
|
@@ -160,7 +169,9 @@ module Tremendous
|
|
160
169
|
id == o.id &&
|
161
170
|
name == o.name &&
|
162
171
|
description == o.description &&
|
163
|
-
products == o.products
|
172
|
+
products == o.products &&
|
173
|
+
webpage_style == o.webpage_style &&
|
174
|
+
email_style == o.email_style
|
164
175
|
end
|
165
176
|
|
166
177
|
# @see the `==` method
|
@@ -172,7 +183,7 @@ module Tremendous
|
|
172
183
|
# Calculates hash code according to all attributes.
|
173
184
|
# @return [Integer] Hash code
|
174
185
|
def hash
|
175
|
-
[id, name, description, products].hash
|
186
|
+
[id, name, description, products, webpage_style, email_style].hash
|
176
187
|
end
|
177
188
|
|
178
189
|
# Builds the object from hash
|
@@ -14,40 +14,35 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
+
# Definition of the email style
|
18
|
+
class ListCampaigns200ResponseCampaignsInnerEmailStyle
|
19
|
+
# If sending via email, this is how the email will appear to be sent from
|
20
|
+
attr_accessor :sender_name
|
40
21
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
22
|
+
# Email subject line
|
23
|
+
attr_accessor :subject_line
|
24
|
+
|
25
|
+
# URL of a publicly-accessible image (png, jpeg, jpg, gif, or svg). This image will be copied to our storage location.
|
26
|
+
attr_accessor :logo_image_url
|
27
|
+
|
28
|
+
# Image height in pixels
|
29
|
+
attr_accessor :logo_image_height_px
|
30
|
+
|
31
|
+
# Logo backgrond color code (hex, rgb, or rgba)
|
32
|
+
attr_accessor :logo_background_color
|
33
|
+
|
34
|
+
# Button color code (hex, rgb, or rgba)
|
35
|
+
attr_accessor :button_color
|
45
36
|
|
46
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
38
|
def self.attribute_map
|
48
39
|
{
|
49
|
-
:'
|
50
|
-
:'
|
40
|
+
:'sender_name' => :'sender_name',
|
41
|
+
:'subject_line' => :'subject_line',
|
42
|
+
:'logo_image_url' => :'logo_image_url',
|
43
|
+
:'logo_image_height_px' => :'logo_image_height_px',
|
44
|
+
:'logo_background_color' => :'logo_background_color',
|
45
|
+
:'button_color' => :'button_color'
|
51
46
|
}
|
52
47
|
end
|
53
48
|
|
@@ -59,14 +54,22 @@ module Tremendous
|
|
59
54
|
# Attribute type mapping.
|
60
55
|
def self.openapi_types
|
61
56
|
{
|
62
|
-
:'
|
63
|
-
:'
|
57
|
+
:'sender_name' => :'String',
|
58
|
+
:'subject_line' => :'String',
|
59
|
+
:'logo_image_url' => :'String',
|
60
|
+
:'logo_image_height_px' => :'Integer',
|
61
|
+
:'logo_background_color' => :'String',
|
62
|
+
:'button_color' => :'String'
|
64
63
|
}
|
65
64
|
end
|
66
65
|
|
67
66
|
# List of attributes with nullable: true
|
68
67
|
def self.openapi_nullable
|
69
68
|
Set.new([
|
69
|
+
:'logo_image_url',
|
70
|
+
:'logo_image_height_px',
|
71
|
+
:'logo_background_color',
|
72
|
+
:'button_color'
|
70
73
|
])
|
71
74
|
end
|
72
75
|
|
@@ -74,27 +77,39 @@ module Tremendous
|
|
74
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
75
78
|
def initialize(attributes = {})
|
76
79
|
if (!attributes.is_a?(Hash))
|
77
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListCampaigns200ResponseCampaignsInnerEmailStyle` initialize method"
|
78
81
|
end
|
79
82
|
|
80
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
81
84
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
85
|
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListCampaigns200ResponseCampaignsInnerEmailStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
87
|
end
|
85
88
|
h[k.to_sym] = v
|
86
89
|
}
|
87
90
|
|
88
|
-
if attributes.key?(:'
|
89
|
-
self.
|
90
|
-
else
|
91
|
-
self.src = nil
|
91
|
+
if attributes.key?(:'sender_name')
|
92
|
+
self.sender_name = attributes[:'sender_name']
|
92
93
|
end
|
93
94
|
|
94
|
-
if attributes.key?(:'
|
95
|
-
self.
|
96
|
-
|
97
|
-
|
95
|
+
if attributes.key?(:'subject_line')
|
96
|
+
self.subject_line = attributes[:'subject_line']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'logo_image_url')
|
100
|
+
self.logo_image_url = attributes[:'logo_image_url']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'logo_image_height_px')
|
104
|
+
self.logo_image_height_px = attributes[:'logo_image_height_px']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'logo_background_color')
|
108
|
+
self.logo_background_color = attributes[:'logo_background_color']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'button_color')
|
112
|
+
self.button_color = attributes[:'button_color']
|
98
113
|
end
|
99
114
|
end
|
100
115
|
|
@@ -103,14 +118,6 @@ module Tremendous
|
|
103
118
|
def list_invalid_properties
|
104
119
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
105
120
|
invalid_properties = Array.new
|
106
|
-
if @src.nil?
|
107
|
-
invalid_properties.push('invalid value for "src", src cannot be nil.')
|
108
|
-
end
|
109
|
-
|
110
|
-
if @type.nil?
|
111
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
112
|
-
end
|
113
|
-
|
114
121
|
invalid_properties
|
115
122
|
end
|
116
123
|
|
@@ -118,30 +125,20 @@ module Tremendous
|
|
118
125
|
# @return true if the model is valid
|
119
126
|
def valid?
|
120
127
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
121
|
-
return false if @src.nil?
|
122
|
-
return false if @type.nil?
|
123
|
-
type_validator = EnumAttributeValidator.new('String', ["card", "logo"])
|
124
|
-
return false unless type_validator.valid?(@type)
|
125
128
|
true
|
126
129
|
end
|
127
130
|
|
128
|
-
# Custom attribute writer method checking allowed values (enum).
|
129
|
-
# @param [Object] type Object to be assigned
|
130
|
-
def type=(type)
|
131
|
-
validator = EnumAttributeValidator.new('String', ["card", "logo"])
|
132
|
-
unless validator.valid?(type)
|
133
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
134
|
-
end
|
135
|
-
@type = type
|
136
|
-
end
|
137
|
-
|
138
131
|
# Checks equality by comparing each attribute.
|
139
132
|
# @param [Object] Object to be compared
|
140
133
|
def ==(o)
|
141
134
|
return true if self.equal?(o)
|
142
135
|
self.class == o.class &&
|
143
|
-
|
144
|
-
|
136
|
+
sender_name == o.sender_name &&
|
137
|
+
subject_line == o.subject_line &&
|
138
|
+
logo_image_url == o.logo_image_url &&
|
139
|
+
logo_image_height_px == o.logo_image_height_px &&
|
140
|
+
logo_background_color == o.logo_background_color &&
|
141
|
+
button_color == o.button_color
|
145
142
|
end
|
146
143
|
|
147
144
|
# @see the `==` method
|
@@ -153,7 +150,7 @@ module Tremendous
|
|
153
150
|
# Calculates hash code according to all attributes.
|
154
151
|
# @return [Integer] Hash code
|
155
152
|
def hash
|
156
|
-
[
|
153
|
+
[sender_name, subject_line, logo_image_url, logo_image_height_px, logo_background_color, button_color].hash
|
157
154
|
end
|
158
155
|
|
159
156
|
# Builds the object from hash
|
@@ -14,18 +14,35 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
# Definition of the webpage style
|
18
|
+
class ListCampaigns200ResponseCampaignsInnerWebpageStyle
|
19
|
+
# Headline for the reward page
|
20
|
+
attr_accessor :headline
|
20
21
|
|
21
|
-
#
|
22
|
-
attr_accessor :
|
22
|
+
# Message for the reward page
|
23
|
+
attr_accessor :message
|
24
|
+
|
25
|
+
# URL of a publicly-accessible image (png, jpeg, jpg, gif, or svg). This image will be copied to our storage location.
|
26
|
+
attr_accessor :logo_image_url
|
27
|
+
|
28
|
+
# Image height in pixels
|
29
|
+
attr_accessor :logo_image_height_px
|
30
|
+
|
31
|
+
# Logo backgrond color code (hex, rgb, or rgba)
|
32
|
+
attr_accessor :logo_background_color
|
33
|
+
|
34
|
+
# Backgrond color code (hex, rgb, or rgba)
|
35
|
+
attr_accessor :background_color
|
23
36
|
|
24
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
38
|
def self.attribute_map
|
26
39
|
{
|
27
|
-
:'
|
28
|
-
:'
|
40
|
+
:'headline' => :'headline',
|
41
|
+
:'message' => :'message',
|
42
|
+
:'logo_image_url' => :'logo_image_url',
|
43
|
+
:'logo_image_height_px' => :'logo_image_height_px',
|
44
|
+
:'logo_background_color' => :'logo_background_color',
|
45
|
+
:'background_color' => :'background_color'
|
29
46
|
}
|
30
47
|
end
|
31
48
|
|
@@ -37,14 +54,22 @@ module Tremendous
|
|
37
54
|
# Attribute type mapping.
|
38
55
|
def self.openapi_types
|
39
56
|
{
|
40
|
-
:'
|
41
|
-
:'
|
57
|
+
:'headline' => :'String',
|
58
|
+
:'message' => :'String',
|
59
|
+
:'logo_image_url' => :'String',
|
60
|
+
:'logo_image_height_px' => :'Integer',
|
61
|
+
:'logo_background_color' => :'String',
|
62
|
+
:'background_color' => :'String'
|
42
63
|
}
|
43
64
|
end
|
44
65
|
|
45
66
|
# List of attributes with nullable: true
|
46
67
|
def self.openapi_nullable
|
47
68
|
Set.new([
|
69
|
+
:'logo_image_url',
|
70
|
+
:'logo_image_height_px',
|
71
|
+
:'logo_background_color',
|
72
|
+
:'background_color'
|
48
73
|
])
|
49
74
|
end
|
50
75
|
|
@@ -52,51 +77,47 @@ module Tremendous
|
|
52
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
78
|
def initialize(attributes = {})
|
54
79
|
if (!attributes.is_a?(Hash))
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListCampaigns200ResponseCampaignsInnerWebpageStyle` initialize method"
|
56
81
|
end
|
57
82
|
|
58
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
59
84
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
85
|
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListCampaigns200ResponseCampaignsInnerWebpageStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
87
|
end
|
63
88
|
h[k.to_sym] = v
|
64
89
|
}
|
65
90
|
|
66
|
-
if attributes.key?(:'
|
67
|
-
self.
|
68
|
-
else
|
69
|
-
self.min = nil
|
91
|
+
if attributes.key?(:'headline')
|
92
|
+
self.headline = attributes[:'headline']
|
70
93
|
end
|
71
94
|
|
72
|
-
if attributes.key?(:'
|
73
|
-
self.
|
74
|
-
else
|
75
|
-
self.max = nil
|
95
|
+
if attributes.key?(:'message')
|
96
|
+
self.message = attributes[:'message']
|
76
97
|
end
|
77
|
-
end
|
78
98
|
|
79
|
-
|
80
|
-
|
81
|
-
def list_invalid_properties
|
82
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
83
|
-
invalid_properties = Array.new
|
84
|
-
if @min.nil?
|
85
|
-
invalid_properties.push('invalid value for "min", min cannot be nil.')
|
99
|
+
if attributes.key?(:'logo_image_url')
|
100
|
+
self.logo_image_url = attributes[:'logo_image_url']
|
86
101
|
end
|
87
102
|
|
88
|
-
if
|
89
|
-
|
103
|
+
if attributes.key?(:'logo_image_height_px')
|
104
|
+
self.logo_image_height_px = attributes[:'logo_image_height_px']
|
90
105
|
end
|
91
106
|
|
92
|
-
if
|
93
|
-
|
107
|
+
if attributes.key?(:'logo_background_color')
|
108
|
+
self.logo_background_color = attributes[:'logo_background_color']
|
94
109
|
end
|
95
110
|
|
96
|
-
if
|
97
|
-
|
111
|
+
if attributes.key?(:'background_color')
|
112
|
+
self.background_color = attributes[:'background_color']
|
98
113
|
end
|
114
|
+
end
|
99
115
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
117
|
+
# @return Array for valid properties with the reasons
|
118
|
+
def list_invalid_properties
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
120
|
+
invalid_properties = Array.new
|
100
121
|
invalid_properties
|
101
122
|
end
|
102
123
|
|
@@ -104,48 +125,20 @@ module Tremendous
|
|
104
125
|
# @return true if the model is valid
|
105
126
|
def valid?
|
106
127
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
107
|
-
return false if @min.nil?
|
108
|
-
return false if @min < 0
|
109
|
-
return false if @max.nil?
|
110
|
-
return false if @max < 0
|
111
128
|
true
|
112
129
|
end
|
113
130
|
|
114
|
-
# Custom attribute writer method with validation
|
115
|
-
# @param [Object] min Value to be assigned
|
116
|
-
def min=(min)
|
117
|
-
if min.nil?
|
118
|
-
fail ArgumentError, 'min cannot be nil'
|
119
|
-
end
|
120
|
-
|
121
|
-
if min < 0
|
122
|
-
fail ArgumentError, 'invalid value for "min", must be greater than or equal to 0.'
|
123
|
-
end
|
124
|
-
|
125
|
-
@min = min
|
126
|
-
end
|
127
|
-
|
128
|
-
# Custom attribute writer method with validation
|
129
|
-
# @param [Object] max Value to be assigned
|
130
|
-
def max=(max)
|
131
|
-
if max.nil?
|
132
|
-
fail ArgumentError, 'max cannot be nil'
|
133
|
-
end
|
134
|
-
|
135
|
-
if max < 0
|
136
|
-
fail ArgumentError, 'invalid value for "max", must be greater than or equal to 0.'
|
137
|
-
end
|
138
|
-
|
139
|
-
@max = max
|
140
|
-
end
|
141
|
-
|
142
131
|
# Checks equality by comparing each attribute.
|
143
132
|
# @param [Object] Object to be compared
|
144
133
|
def ==(o)
|
145
134
|
return true if self.equal?(o)
|
146
135
|
self.class == o.class &&
|
147
|
-
|
148
|
-
|
136
|
+
headline == o.headline &&
|
137
|
+
message == o.message &&
|
138
|
+
logo_image_url == o.logo_image_url &&
|
139
|
+
logo_image_height_px == o.logo_image_height_px &&
|
140
|
+
logo_background_color == o.logo_background_color &&
|
141
|
+
background_color == o.background_color
|
149
142
|
end
|
150
143
|
|
151
144
|
# @see the `==` method
|
@@ -157,7 +150,7 @@ module Tremendous
|
|
157
150
|
# Calculates hash code according to all attributes.
|
158
151
|
# @return [Integer] Hash code
|
159
152
|
def hash
|
160
|
-
[
|
153
|
+
[headline, message, logo_image_url, logo_image_height_px, logo_background_color, background_color].hash
|
161
154
|
end
|
162
155
|
|
163
156
|
# 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
|
+
# 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`.
|
@@ -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',
|
@@ -130,6 +135,10 @@ module Tremendous
|
|
130
135
|
self.name = nil
|
131
136
|
end
|
132
137
|
|
138
|
+
if attributes.key?(:'active')
|
139
|
+
self.active = attributes[:'active']
|
140
|
+
end
|
141
|
+
|
133
142
|
if attributes.key?(:'role')
|
134
143
|
self.role = attributes[:'role']
|
135
144
|
else
|
@@ -188,7 +197,7 @@ module Tremendous
|
|
188
197
|
return false if @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
189
198
|
return false if @email.nil?
|
190
199
|
return false if @role.nil?
|
191
|
-
role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"
|
200
|
+
role_validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
|
192
201
|
return false unless role_validator.valid?(@role)
|
193
202
|
return false if @status.nil?
|
194
203
|
status_validator = EnumAttributeValidator.new('String', ["REGISTERED", "INVITED"])
|
@@ -214,7 +223,7 @@ module Tremendous
|
|
214
223
|
# Custom attribute writer method checking allowed values (enum).
|
215
224
|
# @param [Object] role Object to be assigned
|
216
225
|
def role=(role)
|
217
|
-
validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"
|
226
|
+
validator = EnumAttributeValidator.new('String', ["MEMBER", "ADMIN"])
|
218
227
|
unless validator.valid?(role)
|
219
228
|
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
220
229
|
end
|
@@ -239,6 +248,7 @@ module Tremendous
|
|
239
248
|
id == o.id &&
|
240
249
|
email == o.email &&
|
241
250
|
name == o.name &&
|
251
|
+
active == o.active &&
|
242
252
|
role == o.role &&
|
243
253
|
status == o.status &&
|
244
254
|
created_at == o.created_at &&
|
@@ -254,7 +264,7 @@ module Tremendous
|
|
254
264
|
# Calculates hash code according to all attributes.
|
255
265
|
# @return [Integer] Hash code
|
256
266
|
def hash
|
257
|
-
[id, email, name, role, status, created_at, last_login_at].hash
|
267
|
+
[id, email, name, active, role, status, created_at, last_login_at].hash
|
258
268
|
end
|
259
269
|
|
260
270
|
# 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
|