pingram 1.0.14 → 1.0.16

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/pingram/api/addresses_api.rb +67 -6
  4. data/lib/pingram/api/default_api.rb +2 -2
  5. data/lib/pingram/api/domains_api.rb +69 -8
  6. data/lib/pingram/api/email_api.rb +2 -2
  7. data/lib/pingram/api/logs_api.rb +10 -10
  8. data/lib/pingram/api/numbers_api.rb +6 -6
  9. data/lib/pingram/api/profile_api.rb +248 -0
  10. data/lib/pingram/api/sms_api.rb +2 -2
  11. data/lib/pingram/api_client.rb +1 -1
  12. data/lib/pingram/models/billing_post_response_body.rb +74 -203
  13. data/lib/pingram/models/domain_dns_check.rb +244 -0
  14. data/lib/pingram/models/domain_dns_check_records_inner.rb +357 -0
  15. data/lib/pingram/models/get_members_response_inner.rb +37 -4
  16. data/lib/pingram/models/mfa_setup_request.rb +189 -0
  17. data/lib/pingram/models/mfa_setup_response.rb +216 -0
  18. data/lib/pingram/models/mfa_status_response.rb +235 -0
  19. data/lib/pingram/models/mfa_verify_request.rb +241 -0
  20. data/lib/pingram/version.rb +1 -1
  21. data/lib/pingram.rb +6 -0
  22. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  23. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  24. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  25. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  26. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  27. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  28. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  29. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  30. metadata +8 -2
@@ -0,0 +1,216 @@
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 MFASetupResponse < ApiModelBase
18
+ attr_accessor :secret_code
19
+
20
+ attr_accessor :qr_code_uri
21
+
22
+ attr_accessor :session
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'secret_code' => :'secretCode',
28
+ :'qr_code_uri' => :'qrCodeUri',
29
+ :'session' => :'session'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'secret_code' => :'String',
47
+ :'qr_code_uri' => :'String',
48
+ :'session' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::MFASetupResponse` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::MFASetupResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'secret_code')
75
+ self.secret_code = attributes[:'secret_code']
76
+ else
77
+ self.secret_code = nil
78
+ end
79
+
80
+ if attributes.key?(:'qr_code_uri')
81
+ self.qr_code_uri = attributes[:'qr_code_uri']
82
+ else
83
+ self.qr_code_uri = nil
84
+ end
85
+
86
+ if attributes.key?(:'session')
87
+ self.session = attributes[:'session']
88
+ else
89
+ self.session = nil
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @secret_code.nil?
99
+ invalid_properties.push('invalid value for "secret_code", secret_code cannot be nil.')
100
+ end
101
+
102
+ if @qr_code_uri.nil?
103
+ invalid_properties.push('invalid value for "qr_code_uri", qr_code_uri cannot be nil.')
104
+ end
105
+
106
+ if @session.nil?
107
+ invalid_properties.push('invalid value for "session", session cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @secret_code.nil?
118
+ return false if @qr_code_uri.nil?
119
+ return false if @session.nil?
120
+ true
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] secret_code Value to be assigned
125
+ def secret_code=(secret_code)
126
+ if secret_code.nil?
127
+ fail ArgumentError, 'secret_code cannot be nil'
128
+ end
129
+
130
+ @secret_code = secret_code
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] qr_code_uri Value to be assigned
135
+ def qr_code_uri=(qr_code_uri)
136
+ if qr_code_uri.nil?
137
+ fail ArgumentError, 'qr_code_uri cannot be nil'
138
+ end
139
+
140
+ @qr_code_uri = qr_code_uri
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] session Value to be assigned
145
+ def session=(session)
146
+ if session.nil?
147
+ fail ArgumentError, 'session cannot be nil'
148
+ end
149
+
150
+ @session = session
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ secret_code == o.secret_code &&
159
+ qr_code_uri == o.qr_code_uri &&
160
+ session == o.session
161
+ end
162
+
163
+ # @see the `==` method
164
+ # @param [Object] Object to be compared
165
+ def eql?(o)
166
+ self == o
167
+ end
168
+
169
+ # Calculates hash code according to all attributes.
170
+ # @return [Integer] Hash code
171
+ def hash
172
+ [secret_code, qr_code_uri, session].hash
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def self.build_from_hash(attributes)
179
+ return nil unless attributes.is_a?(Hash)
180
+ attributes = attributes.transform_keys(&:to_sym)
181
+ transformed_hash = {}
182
+ openapi_types.each_pair do |key, type|
183
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = nil
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[attribute_map[key]].is_a?(Array)
189
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
+ end
191
+ elsif !attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
193
+ end
194
+ end
195
+ new(transformed_hash)
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -0,0 +1,235 @@
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 MFAStatusResponse < ApiModelBase
18
+ attr_accessor :enabled
19
+
20
+ # MFA methods supported by the profile MFA API.
21
+ attr_accessor :preferred_mfa
22
+
23
+ # Whether the org has the Enterprise add-on required to enable MFA.
24
+ attr_accessor :available
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'enabled' => :'enabled',
52
+ :'preferred_mfa' => :'preferredMfa',
53
+ :'available' => :'available'
54
+ }
55
+ end
56
+
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
62
+ # Returns all the JSON keys this model knows about
63
+ def self.acceptable_attributes
64
+ acceptable_attribute_map.values
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'enabled' => :'Boolean',
71
+ :'preferred_mfa' => :'String',
72
+ :'available' => :'Boolean'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::MFAStatusResponse` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::MFAStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'enabled')
99
+ self.enabled = attributes[:'enabled']
100
+ else
101
+ self.enabled = nil
102
+ end
103
+
104
+ if attributes.key?(:'preferred_mfa')
105
+ self.preferred_mfa = attributes[:'preferred_mfa']
106
+ end
107
+
108
+ if attributes.key?(:'available')
109
+ self.available = attributes[:'available']
110
+ else
111
+ self.available = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @enabled.nil?
121
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
122
+ end
123
+
124
+ if @available.nil?
125
+ invalid_properties.push('invalid value for "available", available cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ return false if @enabled.nil?
136
+ preferred_mfa_validator = EnumAttributeValidator.new('String', ["SOFTWARE_TOKEN_MFA"])
137
+ return false unless preferred_mfa_validator.valid?(@preferred_mfa)
138
+ return false if @available.nil?
139
+ true
140
+ end
141
+
142
+ # Custom attribute writer method with validation
143
+ # @param [Object] enabled Value to be assigned
144
+ def enabled=(enabled)
145
+ if enabled.nil?
146
+ fail ArgumentError, 'enabled cannot be nil'
147
+ end
148
+
149
+ @enabled = enabled
150
+ end
151
+
152
+ # Custom attribute writer method checking allowed values (enum).
153
+ # @param [Object] preferred_mfa Object to be assigned
154
+ def preferred_mfa=(preferred_mfa)
155
+ validator = EnumAttributeValidator.new('String', ["SOFTWARE_TOKEN_MFA"])
156
+ unless validator.valid?(preferred_mfa)
157
+ fail ArgumentError, "invalid value for \"preferred_mfa\", must be one of #{validator.allowable_values}."
158
+ end
159
+ @preferred_mfa = preferred_mfa
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] available Value to be assigned
164
+ def available=(available)
165
+ if available.nil?
166
+ fail ArgumentError, 'available cannot be nil'
167
+ end
168
+
169
+ @available = available
170
+ end
171
+
172
+ # Checks equality by comparing each attribute.
173
+ # @param [Object] Object to be compared
174
+ def ==(o)
175
+ return true if self.equal?(o)
176
+ self.class == o.class &&
177
+ enabled == o.enabled &&
178
+ preferred_mfa == o.preferred_mfa &&
179
+ available == o.available
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Integer] Hash code
190
+ def hash
191
+ [enabled, preferred_mfa, available].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def self.build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ attributes = attributes.transform_keys(&:to_sym)
200
+ transformed_hash = {}
201
+ openapi_types.each_pair do |key, type|
202
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = nil
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[attribute_map[key]].is_a?(Array)
208
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
209
+ end
210
+ elsif !attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
212
+ end
213
+ end
214
+ new(transformed_hash)
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -0,0 +1,241 @@
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 MFAVerifyRequest < ApiModelBase
18
+ # MFA methods supported by the profile MFA API.
19
+ attr_accessor :type
20
+
21
+ attr_accessor :code
22
+
23
+ attr_accessor :session
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'type' => :'type',
51
+ :'code' => :'code',
52
+ :'session' => :'session'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'type' => :'String',
70
+ :'code' => :'String',
71
+ :'session' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::MFAVerifyRequest` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::MFAVerifyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ else
100
+ self.type = nil
101
+ end
102
+
103
+ if attributes.key?(:'code')
104
+ self.code = attributes[:'code']
105
+ else
106
+ self.code = nil
107
+ end
108
+
109
+ if attributes.key?(:'session')
110
+ self.session = attributes[:'session']
111
+ else
112
+ self.session = nil
113
+ end
114
+ end
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
121
+ if @type.nil?
122
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
123
+ end
124
+
125
+ if @code.nil?
126
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
127
+ end
128
+
129
+ if @session.nil?
130
+ invalid_properties.push('invalid value for "session", session cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @type.nil?
141
+ type_validator = EnumAttributeValidator.new('String', ["SOFTWARE_TOKEN_MFA"])
142
+ return false unless type_validator.valid?(@type)
143
+ return false if @code.nil?
144
+ return false if @session.nil?
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] type Object to be assigned
150
+ def type=(type)
151
+ validator = EnumAttributeValidator.new('String', ["SOFTWARE_TOKEN_MFA"])
152
+ unless validator.valid?(type)
153
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
154
+ end
155
+ @type = type
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] code Value to be assigned
160
+ def code=(code)
161
+ if code.nil?
162
+ fail ArgumentError, 'code cannot be nil'
163
+ end
164
+
165
+ @code = code
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] session Value to be assigned
170
+ def session=(session)
171
+ if session.nil?
172
+ fail ArgumentError, 'session cannot be nil'
173
+ end
174
+
175
+ @session = session
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ type == o.type &&
184
+ code == o.code &&
185
+ session == o.session
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [type, code, session].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ attributes = attributes.transform_keys(&:to_sym)
206
+ transformed_hash = {}
207
+ openapi_types.each_pair do |key, type|
208
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
209
+ transformed_hash["#{key}"] = nil
210
+ elsif type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[attribute_map[key]].is_a?(Array)
214
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
215
+ end
216
+ elsif !attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
218
+ end
219
+ end
220
+ new(transformed_hash)
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Pingram
14
- VERSION = '1.0.14'
14
+ VERSION = '1.0.16'
15
15
  end