pingram 1.0.5 → 1.0.7
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/Gemfile.lock +2 -2
- data/lib/pingram/api/members_api.rb +10 -10
- data/lib/pingram/api/numbers_api.rb +214 -0
- data/lib/pingram/api/profile_api.rb +154 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +22 -2
- data/lib/pingram/models/accept_invite_request.rb +164 -0
- data/lib/pingram/models/accept_invite_response.rb +225 -0
- data/lib/pingram/models/account_get_response.rb +19 -53
- data/lib/pingram/models/auto_join_get_response.rb +16 -16
- data/lib/pingram/models/auto_join_post_response.rb +16 -16
- data/lib/pingram/models/billing_post_response_body.rb +1 -1
- data/lib/pingram/models/change_email_request.rb +164 -0
- data/lib/pingram/models/get_members_response_inner.rb +27 -1
- data/lib/pingram/models/list_phone_numbers_response.rb +167 -0
- data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +202 -0
- data/lib/pingram/models/order_phone_number_request.rb +166 -0
- data/lib/pingram/models/order_phone_number_response.rb +217 -0
- data/lib/pingram/models/organization.rb +74 -222
- data/lib/pingram/models/phone_verify_confirm_request.rb +190 -0
- data/lib/pingram/models/phone_verify_confirm_response.rb +164 -0
- data/lib/pingram/models/phone_verify_start_request.rb +190 -0
- data/lib/pingram/models/phone_verify_start_response.rb +164 -0
- data/lib/pingram/models/search_available_phone_numbers_response.rb +167 -0
- data/lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb +206 -0
- data/lib/pingram/models/sender_post_body.rb +2 -0
- data/lib/pingram/models/sender_post_body_sms.rb +15 -5
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/cache/parallel-1.28.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/parallel-1.28.0/lib/parallel/version.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{parallel-1.27.0.gemspec → parallel-1.28.0.gemspec} +4 -4
- metadata +22 -7
- data/vendor/bundle/ruby/3.2.0/cache/parallel-1.27.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
- /data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class AcceptInviteRequest < ApiModelBase
|
|
18
|
+
attr_accessor :token
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'token' => :'token'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'token' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AcceptInviteRequest` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AcceptInviteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'token')
|
|
67
|
+
self.token = attributes[:'token']
|
|
68
|
+
else
|
|
69
|
+
self.token = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @token.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "token", token cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @token.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] token Value to be assigned
|
|
95
|
+
def token=(token)
|
|
96
|
+
if token.nil?
|
|
97
|
+
fail ArgumentError, 'token cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@token = token
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
token == o.token
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[token].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class AcceptInviteResponse < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :user_exists
|
|
23
|
+
|
|
24
|
+
attr_accessor :invitee_email
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'success' => :'success',
|
|
30
|
+
:'account_id' => :'accountId',
|
|
31
|
+
:'user_exists' => :'userExists',
|
|
32
|
+
:'invitee_email' => :'inviteeEmail'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'success' => :'Boolean',
|
|
50
|
+
:'account_id' => :'String',
|
|
51
|
+
:'user_exists' => :'Boolean',
|
|
52
|
+
:'invitee_email' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AcceptInviteResponse` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AcceptInviteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'success')
|
|
79
|
+
self.success = attributes[:'success']
|
|
80
|
+
else
|
|
81
|
+
self.success = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'account_id')
|
|
85
|
+
self.account_id = attributes[:'account_id']
|
|
86
|
+
else
|
|
87
|
+
self.account_id = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'user_exists')
|
|
91
|
+
self.user_exists = attributes[:'user_exists']
|
|
92
|
+
else
|
|
93
|
+
self.user_exists = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'invitee_email')
|
|
97
|
+
self.invitee_email = attributes[:'invitee_email']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
if @success.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @account_id.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @user_exists.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "user_exists", user_exists cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if @success.nil?
|
|
126
|
+
return false if @account_id.nil?
|
|
127
|
+
return false if @user_exists.nil?
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Custom attribute writer method with validation
|
|
132
|
+
# @param [Object] success Value to be assigned
|
|
133
|
+
def success=(success)
|
|
134
|
+
if success.nil?
|
|
135
|
+
fail ArgumentError, 'success cannot be nil'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@success = success
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] account_id Value to be assigned
|
|
143
|
+
def account_id=(account_id)
|
|
144
|
+
if account_id.nil?
|
|
145
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@account_id = account_id
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] user_exists Value to be assigned
|
|
153
|
+
def user_exists=(user_exists)
|
|
154
|
+
if user_exists.nil?
|
|
155
|
+
fail ArgumentError, 'user_exists cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@user_exists = user_exists
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Checks equality by comparing each attribute.
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def ==(o)
|
|
164
|
+
return true if self.equal?(o)
|
|
165
|
+
self.class == o.class &&
|
|
166
|
+
success == o.success &&
|
|
167
|
+
account_id == o.account_id &&
|
|
168
|
+
user_exists == o.user_exists &&
|
|
169
|
+
invitee_email == o.invitee_email
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @see the `==` method
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Integer] Hash code
|
|
180
|
+
def hash
|
|
181
|
+
[success, account_id, user_exists, invitee_email].hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Builds the object from hash
|
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
186
|
+
# @return [Object] Returns the model itself
|
|
187
|
+
def self.build_from_hash(attributes)
|
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
|
189
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
190
|
+
transformed_hash = {}
|
|
191
|
+
openapi_types.each_pair do |key, type|
|
|
192
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = nil
|
|
194
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
195
|
+
# check to ensure the input is an array given that the attribute
|
|
196
|
+
# is documented as an array but the input is not
|
|
197
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
198
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
199
|
+
end
|
|
200
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
201
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
new(transformed_hash)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns the object in the form of hash
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_hash
|
|
210
|
+
hash = {}
|
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
212
|
+
value = self.send(attr)
|
|
213
|
+
if value.nil?
|
|
214
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
hash[param] = _to_hash(value)
|
|
219
|
+
end
|
|
220
|
+
hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
@@ -14,48 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
# GET /account response: basic account info (billing fields are on
|
|
17
|
+
# GET /account response: basic account info (billing fields are on the organization).
|
|
18
18
|
class AccountGetResponse < ApiModelBase
|
|
19
19
|
attr_accessor :account_id
|
|
20
20
|
|
|
21
|
-
# Optional organization ID; legacy accounts may not have one.
|
|
22
21
|
attr_accessor :organization_id
|
|
23
22
|
|
|
24
23
|
attr_accessor :name
|
|
25
24
|
|
|
26
|
-
attr_accessor :account_type
|
|
27
|
-
|
|
28
25
|
attr_accessor :created_at
|
|
29
26
|
|
|
30
|
-
class EnumAttributeValidator
|
|
31
|
-
attr_reader :datatype
|
|
32
|
-
attr_reader :allowable_values
|
|
33
|
-
|
|
34
|
-
def initialize(datatype, allowable_values)
|
|
35
|
-
@allowable_values = allowable_values.map do |value|
|
|
36
|
-
case datatype.to_s
|
|
37
|
-
when /Integer/i
|
|
38
|
-
value.to_i
|
|
39
|
-
when /Float/i
|
|
40
|
-
value.to_f
|
|
41
|
-
else
|
|
42
|
-
value
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def valid?(value)
|
|
48
|
-
!value || allowable_values.include?(value)
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
28
|
def self.attribute_map
|
|
54
29
|
{
|
|
55
30
|
:'account_id' => :'accountId',
|
|
56
31
|
:'organization_id' => :'organizationId',
|
|
57
32
|
:'name' => :'name',
|
|
58
|
-
:'account_type' => :'accountType',
|
|
59
33
|
:'created_at' => :'createdAt'
|
|
60
34
|
}
|
|
61
35
|
end
|
|
@@ -76,7 +50,6 @@ module Pingram
|
|
|
76
50
|
:'account_id' => :'String',
|
|
77
51
|
:'organization_id' => :'String',
|
|
78
52
|
:'name' => :'String',
|
|
79
|
-
:'account_type' => :'String',
|
|
80
53
|
:'created_at' => :'String'
|
|
81
54
|
}
|
|
82
55
|
end
|
|
@@ -111,6 +84,8 @@ module Pingram
|
|
|
111
84
|
|
|
112
85
|
if attributes.key?(:'organization_id')
|
|
113
86
|
self.organization_id = attributes[:'organization_id']
|
|
87
|
+
else
|
|
88
|
+
self.organization_id = nil
|
|
114
89
|
end
|
|
115
90
|
|
|
116
91
|
if attributes.key?(:'name')
|
|
@@ -119,12 +94,6 @@ module Pingram
|
|
|
119
94
|
self.name = nil
|
|
120
95
|
end
|
|
121
96
|
|
|
122
|
-
if attributes.key?(:'account_type')
|
|
123
|
-
self.account_type = attributes[:'account_type']
|
|
124
|
-
else
|
|
125
|
-
self.account_type = nil
|
|
126
|
-
end
|
|
127
|
-
|
|
128
97
|
if attributes.key?(:'created_at')
|
|
129
98
|
self.created_at = attributes[:'created_at']
|
|
130
99
|
else
|
|
@@ -141,12 +110,12 @@ module Pingram
|
|
|
141
110
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
142
111
|
end
|
|
143
112
|
|
|
144
|
-
if @
|
|
145
|
-
invalid_properties.push('invalid value for "
|
|
113
|
+
if @organization_id.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
146
115
|
end
|
|
147
116
|
|
|
148
|
-
if @
|
|
149
|
-
invalid_properties.push('invalid value for "
|
|
117
|
+
if @name.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
150
119
|
end
|
|
151
120
|
|
|
152
121
|
if @created_at.nil?
|
|
@@ -161,10 +130,8 @@ module Pingram
|
|
|
161
130
|
def valid?
|
|
162
131
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
132
|
return false if @account_id.nil?
|
|
133
|
+
return false if @organization_id.nil?
|
|
164
134
|
return false if @name.nil?
|
|
165
|
-
return false if @account_type.nil?
|
|
166
|
-
account_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
|
|
167
|
-
return false unless account_type_validator.valid?(@account_type)
|
|
168
135
|
return false if @created_at.nil?
|
|
169
136
|
true
|
|
170
137
|
end
|
|
@@ -179,6 +146,16 @@ module Pingram
|
|
|
179
146
|
@account_id = account_id
|
|
180
147
|
end
|
|
181
148
|
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] organization_id Value to be assigned
|
|
151
|
+
def organization_id=(organization_id)
|
|
152
|
+
if organization_id.nil?
|
|
153
|
+
fail ArgumentError, 'organization_id cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@organization_id = organization_id
|
|
157
|
+
end
|
|
158
|
+
|
|
182
159
|
# Custom attribute writer method with validation
|
|
183
160
|
# @param [Object] name Value to be assigned
|
|
184
161
|
def name=(name)
|
|
@@ -189,16 +166,6 @@ module Pingram
|
|
|
189
166
|
@name = name
|
|
190
167
|
end
|
|
191
168
|
|
|
192
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
193
|
-
# @param [Object] account_type Object to be assigned
|
|
194
|
-
def account_type=(account_type)
|
|
195
|
-
validator = EnumAttributeValidator.new('String', ["free", "paid"])
|
|
196
|
-
unless validator.valid?(account_type)
|
|
197
|
-
fail ArgumentError, "invalid value for \"account_type\", must be one of #{validator.allowable_values}."
|
|
198
|
-
end
|
|
199
|
-
@account_type = account_type
|
|
200
|
-
end
|
|
201
|
-
|
|
202
169
|
# Custom attribute writer method with validation
|
|
203
170
|
# @param [Object] created_at Value to be assigned
|
|
204
171
|
def created_at=(created_at)
|
|
@@ -217,7 +184,6 @@ module Pingram
|
|
|
217
184
|
account_id == o.account_id &&
|
|
218
185
|
organization_id == o.organization_id &&
|
|
219
186
|
name == o.name &&
|
|
220
|
-
account_type == o.account_type &&
|
|
221
187
|
created_at == o.created_at
|
|
222
188
|
end
|
|
223
189
|
|
|
@@ -230,7 +196,7 @@ module Pingram
|
|
|
230
196
|
# Calculates hash code according to all attributes.
|
|
231
197
|
# @return [Integer] Hash code
|
|
232
198
|
def hash
|
|
233
|
-
[account_id, organization_id, name,
|
|
199
|
+
[account_id, organization_id, name, created_at].hash
|
|
234
200
|
end
|
|
235
201
|
|
|
236
202
|
# Builds the object from hash
|
|
@@ -15,14 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
17
|
class AutoJoinGetResponse < ApiModelBase
|
|
18
|
-
attr_accessor :
|
|
18
|
+
attr_accessor :organization_id
|
|
19
19
|
|
|
20
20
|
attr_accessor :domains
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
23
|
def self.attribute_map
|
|
24
24
|
{
|
|
25
|
-
:'
|
|
25
|
+
:'organization_id' => :'organizationId',
|
|
26
26
|
:'domains' => :'domains'
|
|
27
27
|
}
|
|
28
28
|
end
|
|
@@ -40,7 +40,7 @@ module Pingram
|
|
|
40
40
|
# Attribute type mapping.
|
|
41
41
|
def self.openapi_types
|
|
42
42
|
{
|
|
43
|
-
:'
|
|
43
|
+
:'organization_id' => :'String',
|
|
44
44
|
:'domains' => :'Array<String>'
|
|
45
45
|
}
|
|
46
46
|
end
|
|
@@ -67,10 +67,10 @@ module Pingram
|
|
|
67
67
|
h[k.to_sym] = v
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
self.
|
|
70
|
+
if attributes.key?(:'organization_id')
|
|
71
|
+
self.organization_id = attributes[:'organization_id']
|
|
72
72
|
else
|
|
73
|
-
self.
|
|
73
|
+
self.organization_id = nil
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
if attributes.key?(:'domains')
|
|
@@ -87,8 +87,8 @@ module Pingram
|
|
|
87
87
|
def list_invalid_properties
|
|
88
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
89
|
invalid_properties = Array.new
|
|
90
|
-
if @
|
|
91
|
-
invalid_properties.push('invalid value for "
|
|
90
|
+
if @organization_id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
if @domains.nil?
|
|
@@ -102,19 +102,19 @@ module Pingram
|
|
|
102
102
|
# @return true if the model is valid
|
|
103
103
|
def valid?
|
|
104
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @
|
|
105
|
+
return false if @organization_id.nil?
|
|
106
106
|
return false if @domains.nil?
|
|
107
107
|
true
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object]
|
|
112
|
-
def
|
|
113
|
-
if
|
|
114
|
-
fail ArgumentError, '
|
|
111
|
+
# @param [Object] organization_id Value to be assigned
|
|
112
|
+
def organization_id=(organization_id)
|
|
113
|
+
if organization_id.nil?
|
|
114
|
+
fail ArgumentError, 'organization_id cannot be nil'
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
@
|
|
117
|
+
@organization_id = organization_id
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
# Custom attribute writer method with validation
|
|
@@ -132,7 +132,7 @@ module Pingram
|
|
|
132
132
|
def ==(o)
|
|
133
133
|
return true if self.equal?(o)
|
|
134
134
|
self.class == o.class &&
|
|
135
|
-
|
|
135
|
+
organization_id == o.organization_id &&
|
|
136
136
|
domains == o.domains
|
|
137
137
|
end
|
|
138
138
|
|
|
@@ -145,7 +145,7 @@ module Pingram
|
|
|
145
145
|
# Calculates hash code according to all attributes.
|
|
146
146
|
# @return [Integer] Hash code
|
|
147
147
|
def hash
|
|
148
|
-
[
|
|
148
|
+
[organization_id, domains].hash
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
# Builds the object from hash
|