tremendous_ruby 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +54 -256
- data/lib/tremendous/models/base_order_for_create.rb +1 -1
- data/lib/tremendous/models/create_order200_response.rb +1 -1
- data/lib/tremendous/models/create_order200_response_order.rb +403 -0
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +326 -0
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +296 -0
- data/lib/tremendous/models/{create_public_key_request.rb → create_order201_response.rb} +14 -15
- data/lib/tremendous/models/create_order_request.rb +1 -1
- data/lib/tremendous/models/create_organization.rb +51 -4
- data/lib/tremendous/models/create_organization200_response_organization.rb +20 -45
- data/lib/tremendous/models/{public_keys_response_public_keys_inner.rb → create_organization_for_response.rb} +72 -20
- data/lib/tremendous/models/{public_key.rb → create_organization_properties.rb} +57 -20
- data/lib/tremendous/models/create_organization_request.rb +7 -0
- data/lib/tremendous/models/create_report201_response.rb +231 -0
- data/lib/tremendous/models/create_report201_response_report.rb +291 -0
- data/lib/tremendous/models/create_report_request.rb +295 -0
- data/lib/tremendous/models/{create_public_key200_response.rb → create_report_request_filters.rb} +12 -17
- data/lib/tremendous/models/{create_invoice.rb → create_report_request_filters_digital_rewards.rb} +128 -32
- data/lib/tremendous/models/{create_public_key.rb → create_report_request_filters_digital_rewards_amount.rb} +22 -18
- data/lib/tremendous/models/{public_keys_response.rb → create_report_request_filters_digital_rewards_created_at.rb} +22 -19
- data/lib/tremendous/models/delivery_details.rb +0 -14
- data/lib/tremendous/models/delivery_details_with_link.rb +296 -0
- data/lib/tremendous/models/error_model.rb +11 -1
- data/lib/tremendous/models/fraud_rule400_response.rb +11 -1
- data/lib/tremendous/models/fraud_rule422_response.rb +11 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +4 -2
- data/lib/tremendous/models/generate_reward_link403_response.rb +11 -1
- data/lib/tremendous/models/invoice.rb +10 -1
- data/lib/tremendous/models/list_fraud_reviews200_response.rb +21 -4
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +4 -2
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +37 -7
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +225 -0
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +10 -1
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +4 -48
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +0 -14
- data/lib/tremendous/models/list_rewards401_response.rb +11 -1
- data/lib/tremendous/models/list_rewards401_response_errors.rb +4 -2
- data/lib/tremendous/models/list_rewards429_response.rb +11 -1
- data/lib/tremendous/models/order_base_payment.rb +4 -48
- data/lib/tremendous/models/order_with_link.rb +403 -0
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +385 -0
- data/lib/tremendous/models/payment_details.rb +4 -48
- data/lib/tremendous/models/payout.rb +352 -0
- data/lib/tremendous/models/report.rb +291 -0
- data/lib/tremendous/models/resend_reward422_response.rb +11 -1
- data/lib/tremendous/models/resend_reward_request.rb +225 -0
- data/lib/tremendous/models/reward_for_order_create.rb +1 -1
- data/lib/tremendous/models/{single_reward_order1_reward.rb → reward_with_link.rb} +78 -16
- data/lib/tremendous/models/reward_with_link_delivery.rb +296 -0
- data/lib/tremendous/models/reward_without_link_delivery.rb +0 -14
- data/lib/tremendous/models/single_reward_order.rb +1 -1
- data/lib/tremendous/models/{single_reward_order1_payment.rb → single_reward_order_payment.rb} +3 -3
- data/lib/tremendous/models/single_reward_order_reward.rb +3 -75
- data/lib/tremendous/models/{single_reward_order1_reward_custom_fields_inner.rb → single_reward_order_reward_custom_fields_inner.rb} +3 -3
- data/lib/tremendous/models/{single_reward_order1_reward_delivery.rb → single_reward_order_reward_delivery.rb} +3 -3
- data/lib/tremendous/models/{test_public_key.rb → single_reward_order_with_link.rb} +14 -15
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +403 -0
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +27 -14
- metadata +29 -16
- data/lib/tremendous/models/single_reward_order1.rb +0 -242
- data/lib/tremendous/models/test_public_key_request.rb +0 -222
@@ -14,14 +14,13 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
class
|
18
|
-
|
19
|
-
attr_accessor :public_key
|
17
|
+
class CreateOrder201Response
|
18
|
+
attr_accessor :order
|
20
19
|
|
21
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
21
|
def self.attribute_map
|
23
22
|
{
|
24
|
-
:'
|
23
|
+
:'order' => :'order'
|
25
24
|
}
|
26
25
|
end
|
27
26
|
|
@@ -33,7 +32,7 @@ module Tremendous
|
|
33
32
|
# Attribute type mapping.
|
34
33
|
def self.openapi_types
|
35
34
|
{
|
36
|
-
:'
|
35
|
+
:'order' => :'ListOrders200ResponseOrdersInner'
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
@@ -47,21 +46,21 @@ module Tremendous
|
|
47
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
47
|
def initialize(attributes = {})
|
49
48
|
if (!attributes.is_a?(Hash))
|
50
|
-
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::CreateOrder201Response` initialize method"
|
51
50
|
end
|
52
51
|
|
53
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder201Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
56
|
end
|
58
57
|
h[k.to_sym] = v
|
59
58
|
}
|
60
59
|
|
61
|
-
if attributes.key?(:'
|
62
|
-
self.
|
60
|
+
if attributes.key?(:'order')
|
61
|
+
self.order = attributes[:'order']
|
63
62
|
else
|
64
|
-
self.
|
63
|
+
self.order = nil
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
@@ -70,8 +69,8 @@ module Tremendous
|
|
70
69
|
def list_invalid_properties
|
71
70
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
71
|
invalid_properties = Array.new
|
73
|
-
if @
|
74
|
-
invalid_properties.push('invalid value for "
|
72
|
+
if @order.nil?
|
73
|
+
invalid_properties.push('invalid value for "order", order cannot be nil.')
|
75
74
|
end
|
76
75
|
|
77
76
|
invalid_properties
|
@@ -81,7 +80,7 @@ module Tremendous
|
|
81
80
|
# @return true if the model is valid
|
82
81
|
def valid?
|
83
82
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
84
|
-
return false if @
|
83
|
+
return false if @order.nil?
|
85
84
|
true
|
86
85
|
end
|
87
86
|
|
@@ -90,7 +89,7 @@ module Tremendous
|
|
90
89
|
def ==(o)
|
91
90
|
return true if self.equal?(o)
|
92
91
|
self.class == o.class &&
|
93
|
-
|
92
|
+
order == o.order
|
94
93
|
end
|
95
94
|
|
96
95
|
# @see the `==` method
|
@@ -102,7 +101,7 @@ module Tremendous
|
|
102
101
|
# Calculates hash code according to all attributes.
|
103
102
|
# @return [Integer] Hash code
|
104
103
|
def hash
|
105
|
-
[
|
104
|
+
[order].hash
|
106
105
|
end
|
107
106
|
|
108
107
|
# Builds the object from hash
|
@@ -15,6 +15,8 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Tremendous
|
17
17
|
class CreateOrganization
|
18
|
+
attr_accessor :id
|
19
|
+
|
18
20
|
# Name of the organization
|
19
21
|
attr_accessor :name
|
20
22
|
|
@@ -29,14 +31,19 @@ module Tremendous
|
|
29
31
|
# Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +).
|
30
32
|
attr_accessor :phone
|
31
33
|
|
34
|
+
# Timestamp of when the organization has been created.
|
35
|
+
attr_accessor :created_at
|
36
|
+
|
32
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
38
|
def self.attribute_map
|
34
39
|
{
|
40
|
+
:'id' => :'id',
|
35
41
|
:'name' => :'name',
|
36
42
|
:'website' => :'website',
|
37
43
|
:'with_api_key' => :'with_api_key',
|
38
44
|
:'copy_settings' => :'copy_settings',
|
39
|
-
:'phone' => :'phone'
|
45
|
+
:'phone' => :'phone',
|
46
|
+
:'created_at' => :'created_at'
|
40
47
|
}
|
41
48
|
end
|
42
49
|
|
@@ -48,11 +55,13 @@ module Tremendous
|
|
48
55
|
# Attribute type mapping.
|
49
56
|
def self.openapi_types
|
50
57
|
{
|
58
|
+
:'id' => :'String',
|
51
59
|
:'name' => :'String',
|
52
60
|
:'website' => :'String',
|
53
61
|
:'with_api_key' => :'Boolean',
|
54
62
|
:'copy_settings' => :'CreateOrganizationRequestCopySettings',
|
55
|
-
:'phone' => :'String'
|
63
|
+
:'phone' => :'String',
|
64
|
+
:'created_at' => :'Date'
|
56
65
|
}
|
57
66
|
end
|
58
67
|
|
@@ -77,6 +86,10 @@ module Tremendous
|
|
77
86
|
h[k.to_sym] = v
|
78
87
|
}
|
79
88
|
|
89
|
+
if attributes.key?(:'id')
|
90
|
+
self.id = attributes[:'id']
|
91
|
+
end
|
92
|
+
|
80
93
|
if attributes.key?(:'name')
|
81
94
|
self.name = attributes[:'name']
|
82
95
|
else
|
@@ -91,6 +104,8 @@ module Tremendous
|
|
91
104
|
|
92
105
|
if attributes.key?(:'with_api_key')
|
93
106
|
self.with_api_key = attributes[:'with_api_key']
|
107
|
+
else
|
108
|
+
self.with_api_key = nil
|
94
109
|
end
|
95
110
|
|
96
111
|
if attributes.key?(:'copy_settings')
|
@@ -100,6 +115,10 @@ module Tremendous
|
|
100
115
|
if attributes.key?(:'phone')
|
101
116
|
self.phone = attributes[:'phone']
|
102
117
|
end
|
118
|
+
|
119
|
+
if attributes.key?(:'created_at')
|
120
|
+
self.created_at = attributes[:'created_at']
|
121
|
+
end
|
103
122
|
end
|
104
123
|
|
105
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -107,6 +126,11 @@ module Tremendous
|
|
107
126
|
def list_invalid_properties
|
108
127
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
109
128
|
invalid_properties = Array.new
|
129
|
+
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
130
|
+
if !@id.nil? && @id !~ pattern
|
131
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
132
|
+
end
|
133
|
+
|
110
134
|
if @name.nil?
|
111
135
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
112
136
|
end
|
@@ -115,6 +139,10 @@ module Tremendous
|
|
115
139
|
invalid_properties.push('invalid value for "website", website cannot be nil.')
|
116
140
|
end
|
117
141
|
|
142
|
+
if @with_api_key.nil?
|
143
|
+
invalid_properties.push('invalid value for "with_api_key", with_api_key cannot be nil.')
|
144
|
+
end
|
145
|
+
|
118
146
|
invalid_properties
|
119
147
|
end
|
120
148
|
|
@@ -122,21 +150,40 @@ module Tremendous
|
|
122
150
|
# @return true if the model is valid
|
123
151
|
def valid?
|
124
152
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
153
|
+
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
125
154
|
return false if @name.nil?
|
126
155
|
return false if @website.nil?
|
156
|
+
return false if @with_api_key.nil?
|
127
157
|
true
|
128
158
|
end
|
129
159
|
|
160
|
+
# Custom attribute writer method with validation
|
161
|
+
# @param [Object] id Value to be assigned
|
162
|
+
def id=(id)
|
163
|
+
if id.nil?
|
164
|
+
fail ArgumentError, 'id cannot be nil'
|
165
|
+
end
|
166
|
+
|
167
|
+
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
168
|
+
if id !~ pattern
|
169
|
+
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
170
|
+
end
|
171
|
+
|
172
|
+
@id = id
|
173
|
+
end
|
174
|
+
|
130
175
|
# Checks equality by comparing each attribute.
|
131
176
|
# @param [Object] Object to be compared
|
132
177
|
def ==(o)
|
133
178
|
return true if self.equal?(o)
|
134
179
|
self.class == o.class &&
|
180
|
+
id == o.id &&
|
135
181
|
name == o.name &&
|
136
182
|
website == o.website &&
|
137
183
|
with_api_key == o.with_api_key &&
|
138
184
|
copy_settings == o.copy_settings &&
|
139
|
-
phone == o.phone
|
185
|
+
phone == o.phone &&
|
186
|
+
created_at == o.created_at
|
140
187
|
end
|
141
188
|
|
142
189
|
# @see the `==` method
|
@@ -148,7 +195,7 @@ module Tremendous
|
|
148
195
|
# Calculates hash code according to all attributes.
|
149
196
|
# @return [Integer] Hash code
|
150
197
|
def hash
|
151
|
-
[name, website, with_api_key, copy_settings, phone].hash
|
198
|
+
[id, name, website, with_api_key, copy_settings, phone, created_at].hash
|
152
199
|
end
|
153
200
|
|
154
201
|
# Builds the object from hash
|
@@ -14,7 +14,6 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
# Organizations are a way to separate different parts of your business within the same Tremendous account. Your root Tremendous account is an organization itself and can have multiple sub-organizations. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. Each organizations can have it's own API key.
|
18
17
|
class CreateOrganization200ResponseOrganization
|
19
18
|
attr_accessor :id
|
20
19
|
|
@@ -24,44 +23,25 @@ module Tremendous
|
|
24
23
|
# URL of the website of that organization
|
25
24
|
attr_accessor :website
|
26
25
|
|
27
|
-
|
28
|
-
attr_accessor :status
|
26
|
+
attr_accessor :copy_settings
|
29
27
|
|
30
|
-
#
|
28
|
+
# Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +).
|
29
|
+
attr_accessor :phone
|
30
|
+
|
31
|
+
# Timestamp of when the organization has been created.
|
31
32
|
attr_accessor :created_at
|
32
33
|
|
33
|
-
# The API key for the created organization. This property is only returned when `
|
34
|
+
# The API key for the created organization. This property is only returned when `api_key` is set to `true`.
|
34
35
|
attr_accessor :api_key
|
35
36
|
|
36
|
-
class EnumAttributeValidator
|
37
|
-
attr_reader :datatype
|
38
|
-
attr_reader :allowable_values
|
39
|
-
|
40
|
-
def initialize(datatype, allowable_values)
|
41
|
-
@allowable_values = allowable_values.map do |value|
|
42
|
-
case datatype.to_s
|
43
|
-
when /Integer/i
|
44
|
-
value.to_i
|
45
|
-
when /Float/i
|
46
|
-
value.to_f
|
47
|
-
else
|
48
|
-
value
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def valid?(value)
|
54
|
-
!value || allowable_values.include?(value)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
38
|
def self.attribute_map
|
60
39
|
{
|
61
40
|
:'id' => :'id',
|
62
41
|
:'name' => :'name',
|
63
42
|
:'website' => :'website',
|
64
|
-
:'
|
43
|
+
:'copy_settings' => :'copy_settings',
|
44
|
+
:'phone' => :'phone',
|
65
45
|
:'created_at' => :'created_at',
|
66
46
|
:'api_key' => :'api_key'
|
67
47
|
}
|
@@ -78,7 +58,8 @@ module Tremendous
|
|
78
58
|
:'id' => :'String',
|
79
59
|
:'name' => :'String',
|
80
60
|
:'website' => :'String',
|
81
|
-
:'
|
61
|
+
:'copy_settings' => :'CreateOrganizationRequestCopySettings',
|
62
|
+
:'phone' => :'String',
|
82
63
|
:'created_at' => :'Date',
|
83
64
|
:'api_key' => :'String'
|
84
65
|
}
|
@@ -87,6 +68,7 @@ module Tremendous
|
|
87
68
|
# List of attributes with nullable: true
|
88
69
|
def self.openapi_nullable
|
89
70
|
Set.new([
|
71
|
+
:'phone',
|
90
72
|
])
|
91
73
|
end
|
92
74
|
|
@@ -121,8 +103,12 @@ module Tremendous
|
|
121
103
|
self.website = nil
|
122
104
|
end
|
123
105
|
|
124
|
-
if attributes.key?(:'
|
125
|
-
self.
|
106
|
+
if attributes.key?(:'copy_settings')
|
107
|
+
self.copy_settings = attributes[:'copy_settings']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'phone')
|
111
|
+
self.phone = attributes[:'phone']
|
126
112
|
end
|
127
113
|
|
128
114
|
if attributes.key?(:'created_at')
|
@@ -162,8 +148,6 @@ module Tremendous
|
|
162
148
|
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
163
149
|
return false if @name.nil?
|
164
150
|
return false if @website.nil?
|
165
|
-
status_validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED"])
|
166
|
-
return false unless status_validator.valid?(@status)
|
167
151
|
true
|
168
152
|
end
|
169
153
|
|
@@ -182,16 +166,6 @@ module Tremendous
|
|
182
166
|
@id = id
|
183
167
|
end
|
184
168
|
|
185
|
-
# Custom attribute writer method checking allowed values (enum).
|
186
|
-
# @param [Object] status Object to be assigned
|
187
|
-
def status=(status)
|
188
|
-
validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED"])
|
189
|
-
unless validator.valid?(status)
|
190
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
191
|
-
end
|
192
|
-
@status = status
|
193
|
-
end
|
194
|
-
|
195
169
|
# Checks equality by comparing each attribute.
|
196
170
|
# @param [Object] Object to be compared
|
197
171
|
def ==(o)
|
@@ -200,7 +174,8 @@ module Tremendous
|
|
200
174
|
id == o.id &&
|
201
175
|
name == o.name &&
|
202
176
|
website == o.website &&
|
203
|
-
|
177
|
+
copy_settings == o.copy_settings &&
|
178
|
+
phone == o.phone &&
|
204
179
|
created_at == o.created_at &&
|
205
180
|
api_key == o.api_key
|
206
181
|
end
|
@@ -214,7 +189,7 @@ module Tremendous
|
|
214
189
|
# Calculates hash code according to all attributes.
|
215
190
|
# @return [Integer] Hash code
|
216
191
|
def hash
|
217
|
-
[id, name, website,
|
192
|
+
[id, name, website, copy_settings, phone, created_at, api_key].hash
|
218
193
|
end
|
219
194
|
|
220
195
|
# Builds the object from hash
|
@@ -14,22 +14,36 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
|
18
|
-
class PublicKeysResponsePublicKeysInner
|
17
|
+
class CreateOrganizationForResponse
|
19
18
|
attr_accessor :id
|
20
19
|
|
21
|
-
#
|
22
|
-
attr_accessor :
|
20
|
+
# Name of the organization
|
21
|
+
attr_accessor :name
|
23
22
|
|
24
|
-
#
|
25
|
-
attr_accessor :
|
23
|
+
# URL of the website of that organization
|
24
|
+
attr_accessor :website
|
25
|
+
|
26
|
+
# Default value is `false`. Set to true to also generate an API key associated to the new organization.
|
27
|
+
attr_accessor :with_api_key
|
28
|
+
|
29
|
+
attr_accessor :copy_settings
|
30
|
+
|
31
|
+
# Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +).
|
32
|
+
attr_accessor :phone
|
33
|
+
|
34
|
+
# Timestamp of when the organization has been created.
|
35
|
+
attr_accessor :created_at
|
26
36
|
|
27
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
38
|
def self.attribute_map
|
29
39
|
{
|
30
40
|
:'id' => :'id',
|
31
|
-
:'
|
32
|
-
:'
|
41
|
+
:'name' => :'name',
|
42
|
+
:'website' => :'website',
|
43
|
+
:'with_api_key' => :'with_api_key',
|
44
|
+
:'copy_settings' => :'copy_settings',
|
45
|
+
:'phone' => :'phone',
|
46
|
+
:'created_at' => :'created_at'
|
33
47
|
}
|
34
48
|
end
|
35
49
|
|
@@ -42,15 +56,19 @@ module Tremendous
|
|
42
56
|
def self.openapi_types
|
43
57
|
{
|
44
58
|
:'id' => :'String',
|
45
|
-
:'
|
46
|
-
:'
|
59
|
+
:'name' => :'String',
|
60
|
+
:'website' => :'String',
|
61
|
+
:'with_api_key' => :'Boolean',
|
62
|
+
:'copy_settings' => :'CreateOrganizationRequestCopySettings',
|
63
|
+
:'phone' => :'String',
|
64
|
+
:'created_at' => :'Date'
|
47
65
|
}
|
48
66
|
end
|
49
67
|
|
50
68
|
# List of attributes with nullable: true
|
51
69
|
def self.openapi_nullable
|
52
70
|
Set.new([
|
53
|
-
:'
|
71
|
+
:'phone',
|
54
72
|
])
|
55
73
|
end
|
56
74
|
|
@@ -58,13 +76,13 @@ module Tremendous
|
|
58
76
|
# @param [Hash] attributes Model attributes in the form of hash
|
59
77
|
def initialize(attributes = {})
|
60
78
|
if (!attributes.is_a?(Hash))
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateOrganizationForResponse` initialize method"
|
62
80
|
end
|
63
81
|
|
64
82
|
# check to see if the attribute exists and convert string to symbol for hash key
|
65
83
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
84
|
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrganizationForResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
86
|
end
|
69
87
|
h[k.to_sym] = v
|
70
88
|
}
|
@@ -73,12 +91,32 @@ module Tremendous
|
|
73
91
|
self.id = attributes[:'id']
|
74
92
|
end
|
75
93
|
|
76
|
-
if attributes.key?(:'
|
77
|
-
self.
|
94
|
+
if attributes.key?(:'name')
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
else
|
97
|
+
self.name = nil
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'website')
|
101
|
+
self.website = attributes[:'website']
|
102
|
+
else
|
103
|
+
self.website = nil
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'with_api_key')
|
107
|
+
self.with_api_key = attributes[:'with_api_key']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'copy_settings')
|
111
|
+
self.copy_settings = attributes[:'copy_settings']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'phone')
|
115
|
+
self.phone = attributes[:'phone']
|
78
116
|
end
|
79
117
|
|
80
|
-
if attributes.key?(:'
|
81
|
-
self.
|
118
|
+
if attributes.key?(:'created_at')
|
119
|
+
self.created_at = attributes[:'created_at']
|
82
120
|
end
|
83
121
|
end
|
84
122
|
|
@@ -92,6 +130,14 @@ module Tremendous
|
|
92
130
|
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
93
131
|
end
|
94
132
|
|
133
|
+
if @name.nil?
|
134
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if @website.nil?
|
138
|
+
invalid_properties.push('invalid value for "website", website cannot be nil.')
|
139
|
+
end
|
140
|
+
|
95
141
|
invalid_properties
|
96
142
|
end
|
97
143
|
|
@@ -100,6 +146,8 @@ module Tremendous
|
|
100
146
|
def valid?
|
101
147
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
148
|
return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
149
|
+
return false if @name.nil?
|
150
|
+
return false if @website.nil?
|
103
151
|
true
|
104
152
|
end
|
105
153
|
|
@@ -124,8 +172,12 @@ module Tremendous
|
|
124
172
|
return true if self.equal?(o)
|
125
173
|
self.class == o.class &&
|
126
174
|
id == o.id &&
|
127
|
-
|
128
|
-
|
175
|
+
name == o.name &&
|
176
|
+
website == o.website &&
|
177
|
+
with_api_key == o.with_api_key &&
|
178
|
+
copy_settings == o.copy_settings &&
|
179
|
+
phone == o.phone &&
|
180
|
+
created_at == o.created_at
|
129
181
|
end
|
130
182
|
|
131
183
|
# @see the `==` method
|
@@ -137,7 +189,7 @@ module Tremendous
|
|
137
189
|
# Calculates hash code according to all attributes.
|
138
190
|
# @return [Integer] Hash code
|
139
191
|
def hash
|
140
|
-
[id,
|
192
|
+
[id, name, website, with_api_key, copy_settings, phone, created_at].hash
|
141
193
|
end
|
142
194
|
|
143
195
|
# Builds the object from hash
|
@@ -14,22 +14,36 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Tremendous
|
17
|
-
|
18
|
-
class PublicKey
|
17
|
+
class CreateOrganizationProperties
|
19
18
|
attr_accessor :id
|
20
19
|
|
21
|
-
#
|
22
|
-
attr_accessor :
|
20
|
+
# Name of the organization
|
21
|
+
attr_accessor :name
|
23
22
|
|
24
|
-
#
|
25
|
-
attr_accessor :
|
23
|
+
# URL of the website of that organization
|
24
|
+
attr_accessor :website
|
25
|
+
|
26
|
+
# Default value is `false`. Set to true to also generate an API key associated to the new organization.
|
27
|
+
attr_accessor :with_api_key
|
28
|
+
|
29
|
+
attr_accessor :copy_settings
|
30
|
+
|
31
|
+
# Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +).
|
32
|
+
attr_accessor :phone
|
33
|
+
|
34
|
+
# Timestamp of when the organization has been created.
|
35
|
+
attr_accessor :created_at
|
26
36
|
|
27
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
38
|
def self.attribute_map
|
29
39
|
{
|
30
40
|
:'id' => :'id',
|
31
|
-
:'
|
32
|
-
:'
|
41
|
+
:'name' => :'name',
|
42
|
+
:'website' => :'website',
|
43
|
+
:'with_api_key' => :'with_api_key',
|
44
|
+
:'copy_settings' => :'copy_settings',
|
45
|
+
:'phone' => :'phone',
|
46
|
+
:'created_at' => :'created_at'
|
33
47
|
}
|
34
48
|
end
|
35
49
|
|
@@ -42,15 +56,18 @@ module Tremendous
|
|
42
56
|
def self.openapi_types
|
43
57
|
{
|
44
58
|
:'id' => :'String',
|
45
|
-
:'
|
46
|
-
:'
|
59
|
+
:'name' => :'String',
|
60
|
+
:'website' => :'String',
|
61
|
+
:'with_api_key' => :'Boolean',
|
62
|
+
:'copy_settings' => :'CreateOrganizationRequestCopySettings',
|
63
|
+
:'phone' => :'String',
|
64
|
+
:'created_at' => :'Date'
|
47
65
|
}
|
48
66
|
end
|
49
67
|
|
50
68
|
# List of attributes with nullable: true
|
51
69
|
def self.openapi_nullable
|
52
70
|
Set.new([
|
53
|
-
:'last_used_at'
|
54
71
|
])
|
55
72
|
end
|
56
73
|
|
@@ -58,13 +75,13 @@ module Tremendous
|
|
58
75
|
# @param [Hash] attributes Model attributes in the form of hash
|
59
76
|
def initialize(attributes = {})
|
60
77
|
if (!attributes.is_a?(Hash))
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateOrganizationProperties` initialize method"
|
62
79
|
end
|
63
80
|
|
64
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
65
82
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
83
|
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrganizationProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
85
|
end
|
69
86
|
h[k.to_sym] = v
|
70
87
|
}
|
@@ -73,12 +90,28 @@ module Tremendous
|
|
73
90
|
self.id = attributes[:'id']
|
74
91
|
end
|
75
92
|
|
76
|
-
if attributes.key?(:'
|
77
|
-
self.
|
93
|
+
if attributes.key?(:'name')
|
94
|
+
self.name = attributes[:'name']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'website')
|
98
|
+
self.website = attributes[:'website']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'with_api_key')
|
102
|
+
self.with_api_key = attributes[:'with_api_key']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'copy_settings')
|
106
|
+
self.copy_settings = attributes[:'copy_settings']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'phone')
|
110
|
+
self.phone = attributes[:'phone']
|
78
111
|
end
|
79
112
|
|
80
|
-
if attributes.key?(:'
|
81
|
-
self.
|
113
|
+
if attributes.key?(:'created_at')
|
114
|
+
self.created_at = attributes[:'created_at']
|
82
115
|
end
|
83
116
|
end
|
84
117
|
|
@@ -124,8 +157,12 @@ module Tremendous
|
|
124
157
|
return true if self.equal?(o)
|
125
158
|
self.class == o.class &&
|
126
159
|
id == o.id &&
|
127
|
-
|
128
|
-
|
160
|
+
name == o.name &&
|
161
|
+
website == o.website &&
|
162
|
+
with_api_key == o.with_api_key &&
|
163
|
+
copy_settings == o.copy_settings &&
|
164
|
+
phone == o.phone &&
|
165
|
+
created_at == o.created_at
|
129
166
|
end
|
130
167
|
|
131
168
|
# @see the `==` method
|
@@ -137,7 +174,7 @@ module Tremendous
|
|
137
174
|
# Calculates hash code according to all attributes.
|
138
175
|
# @return [Integer] Hash code
|
139
176
|
def hash
|
140
|
-
[id,
|
177
|
+
[id, name, website, with_api_key, copy_settings, phone, created_at].hash
|
141
178
|
end
|
142
179
|
|
143
180
|
# Builds the object from hash
|