late-sdk 0.0.726 → 0.0.727

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -0
  3. data/docs/AttachNumberToSipTrunk200Response.md +22 -0
  4. data/docs/AttachNumberToSipTrunkRequest.md +18 -0
  5. data/docs/CreateSipTrunk201Response.md +34 -0
  6. data/docs/CreateSipTrunk201ResponseTermination.md +20 -0
  7. data/docs/CreateSipTrunkRequest.md +24 -0
  8. data/docs/DetachNumberFromSipTrunk200Response.md +20 -0
  9. data/docs/GetPhoneNumber200ResponsePhoneNumber.md +3 -1
  10. data/docs/GetSipTrunk200Response.md +34 -0
  11. data/docs/GetSipTrunk200ResponseNumbersInner.md +20 -0
  12. data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
  13. data/docs/ListSipTrunks200Response.md +20 -0
  14. data/docs/ListSipTrunks200ResponseTrunksInner.md +32 -0
  15. data/docs/ListSipTrunks200ResponseTrunksInnerTermination.md +20 -0
  16. data/docs/RotateSipTrunkCredentials200Response.md +20 -0
  17. data/docs/VoiceApi.md +485 -0
  18. data/lib/zernio-sdk/api/voice_api.rb +447 -0
  19. data/lib/zernio-sdk/models/attach_number_to_sip_trunk200_response.rb +165 -0
  20. data/lib/zernio-sdk/models/attach_number_to_sip_trunk_request.rb +165 -0
  21. data/lib/zernio-sdk/models/create_sip_trunk201_response.rb +255 -0
  22. data/lib/zernio-sdk/models/create_sip_trunk201_response_termination.rb +158 -0
  23. data/lib/zernio-sdk/models/create_sip_trunk_request.rb +283 -0
  24. data/lib/zernio-sdk/models/detach_number_from_sip_trunk200_response.rb +157 -0
  25. data/lib/zernio-sdk/models/get_phone_number200_response_phone_number.rb +15 -4
  26. data/lib/zernio-sdk/models/get_sip_trunk200_response.rb +256 -0
  27. data/lib/zernio-sdk/models/get_sip_trunk200_response_numbers_inner.rb +157 -0
  28. data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +12 -1
  29. data/lib/zernio-sdk/models/list_sip_trunks200_response.rb +159 -0
  30. data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner.rb +245 -0
  31. data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner_termination.rb +156 -0
  32. data/lib/zernio-sdk/models/rotate_sip_trunk_credentials200_response.rb +156 -0
  33. data/lib/zernio-sdk/version.rb +1 -1
  34. data/lib/zernio-sdk.rb +12 -0
  35. data/openapi.yaml +268 -0
  36. data/spec/api/voice_api_spec.rb +82 -0
  37. data/spec/models/attach_number_to_sip_trunk200_response_spec.rb +48 -0
  38. data/spec/models/attach_number_to_sip_trunk_request_spec.rb +36 -0
  39. data/spec/models/create_sip_trunk201_response_spec.rb +88 -0
  40. data/spec/models/create_sip_trunk201_response_termination_spec.rb +42 -0
  41. data/spec/models/create_sip_trunk_request_spec.rb +58 -0
  42. data/spec/models/detach_number_from_sip_trunk200_response_spec.rb +42 -0
  43. data/spec/models/get_phone_number200_response_phone_number_spec.rb +6 -0
  44. data/spec/models/get_sip_trunk200_response_numbers_inner_spec.rb +42 -0
  45. data/spec/models/get_sip_trunk200_response_spec.rb +88 -0
  46. data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
  47. data/spec/models/list_sip_trunks200_response_spec.rb +42 -0
  48. data/spec/models/list_sip_trunks200_response_trunks_inner_spec.rb +82 -0
  49. data/spec/models/list_sip_trunks200_response_trunks_inner_termination_spec.rb +42 -0
  50. data/spec/models/rotate_sip_trunk_credentials200_response_spec.rb +42 -0
  51. data/zernio-sdk-0.0.727.gem +0 -0
  52. metadata +51 -3
  53. data/zernio-sdk-0.0.726.gem +0 -0
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
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 Zernio
17
+ class AttachNumberToSipTrunkRequest < ApiModelBase
18
+ # SIP trunk ID (from POST /v1/phone-numbers/sip-trunks).
19
+ attr_accessor :trunk_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'trunk_id' => :'trunkId'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'trunk_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AttachNumberToSipTrunkRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AttachNumberToSipTrunkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'trunk_id')
68
+ self.trunk_id = attributes[:'trunk_id']
69
+ else
70
+ self.trunk_id = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @trunk_id.nil?
80
+ invalid_properties.push('invalid value for "trunk_id", trunk_id cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @trunk_id.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] trunk_id Value to be assigned
96
+ def trunk_id=(trunk_id)
97
+ if trunk_id.nil?
98
+ fail ArgumentError, 'trunk_id cannot be nil'
99
+ end
100
+
101
+ @trunk_id = trunk_id
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ trunk_id == o.trunk_id
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [trunk_id].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,255 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
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 Zernio
17
+ class CreateSipTrunk201Response < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :label
21
+
22
+ attr_accessor :sip_host
23
+
24
+ attr_accessor :sip_port
25
+
26
+ attr_accessor :transport
27
+
28
+ attr_accessor :termination
29
+
30
+ attr_accessor :numbers_attached
31
+
32
+ attr_accessor :created_at
33
+
34
+ # SIP digest password, shown only in this response.
35
+ attr_accessor :digest_password
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'id' => :'id',
63
+ :'label' => :'label',
64
+ :'sip_host' => :'sipHost',
65
+ :'sip_port' => :'sipPort',
66
+ :'transport' => :'transport',
67
+ :'termination' => :'termination',
68
+ :'numbers_attached' => :'numbersAttached',
69
+ :'created_at' => :'createdAt',
70
+ :'digest_password' => :'digestPassword'
71
+ }
72
+ end
73
+
74
+ # Returns attribute mapping this model knows about
75
+ def self.acceptable_attribute_map
76
+ attribute_map
77
+ end
78
+
79
+ # Returns all the JSON keys this model knows about
80
+ def self.acceptable_attributes
81
+ acceptable_attribute_map.values
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.openapi_types
86
+ {
87
+ :'id' => :'String',
88
+ :'label' => :'String',
89
+ :'sip_host' => :'String',
90
+ :'sip_port' => :'Integer',
91
+ :'transport' => :'String',
92
+ :'termination' => :'CreateSipTrunk201ResponseTermination',
93
+ :'numbers_attached' => :'Integer',
94
+ :'created_at' => :'Time',
95
+ :'digest_password' => :'String'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ :'created_at',
103
+ ])
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ if (!attributes.is_a?(Hash))
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateSipTrunk201Response` initialize method"
111
+ end
112
+
113
+ # check to see if the attribute exists and convert string to symbol for hash key
114
+ acceptable_attribute_map = self.class.acceptable_attribute_map
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!acceptable_attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateSipTrunk201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'id')
123
+ self.id = attributes[:'id']
124
+ end
125
+
126
+ if attributes.key?(:'label')
127
+ self.label = attributes[:'label']
128
+ end
129
+
130
+ if attributes.key?(:'sip_host')
131
+ self.sip_host = attributes[:'sip_host']
132
+ end
133
+
134
+ if attributes.key?(:'sip_port')
135
+ self.sip_port = attributes[:'sip_port']
136
+ end
137
+
138
+ if attributes.key?(:'transport')
139
+ self.transport = attributes[:'transport']
140
+ end
141
+
142
+ if attributes.key?(:'termination')
143
+ self.termination = attributes[:'termination']
144
+ end
145
+
146
+ if attributes.key?(:'numbers_attached')
147
+ self.numbers_attached = attributes[:'numbers_attached']
148
+ end
149
+
150
+ if attributes.key?(:'created_at')
151
+ self.created_at = attributes[:'created_at']
152
+ end
153
+
154
+ if attributes.key?(:'digest_password')
155
+ self.digest_password = attributes[:'digest_password']
156
+ end
157
+ end
158
+
159
+ # Show invalid properties with the reasons. Usually used together with valid?
160
+ # @return Array for valid properties with the reasons
161
+ def list_invalid_properties
162
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
163
+ invalid_properties = Array.new
164
+ invalid_properties
165
+ end
166
+
167
+ # Check to see if the all the properties in the model are valid
168
+ # @return true if the model is valid
169
+ def valid?
170
+ warn '[DEPRECATED] the `valid?` method is obsolete'
171
+ transport_validator = EnumAttributeValidator.new('String', ["tls", "tcp", "udp"])
172
+ return false unless transport_validator.valid?(@transport)
173
+ true
174
+ end
175
+
176
+ # Custom attribute writer method checking allowed values (enum).
177
+ # @param [Object] transport Object to be assigned
178
+ def transport=(transport)
179
+ validator = EnumAttributeValidator.new('String', ["tls", "tcp", "udp"])
180
+ unless validator.valid?(transport)
181
+ fail ArgumentError, "invalid value for \"transport\", must be one of #{validator.allowable_values}."
182
+ end
183
+ @transport = transport
184
+ end
185
+
186
+ # Checks equality by comparing each attribute.
187
+ # @param [Object] Object to be compared
188
+ def ==(o)
189
+ return true if self.equal?(o)
190
+ self.class == o.class &&
191
+ id == o.id &&
192
+ label == o.label &&
193
+ sip_host == o.sip_host &&
194
+ sip_port == o.sip_port &&
195
+ transport == o.transport &&
196
+ termination == o.termination &&
197
+ numbers_attached == o.numbers_attached &&
198
+ created_at == o.created_at &&
199
+ digest_password == o.digest_password
200
+ end
201
+
202
+ # @see the `==` method
203
+ # @param [Object] Object to be compared
204
+ def eql?(o)
205
+ self == o
206
+ end
207
+
208
+ # Calculates hash code according to all attributes.
209
+ # @return [Integer] Hash code
210
+ def hash
211
+ [id, label, sip_host, sip_port, transport, termination, numbers_attached, created_at, digest_password].hash
212
+ end
213
+
214
+ # Builds the object from hash
215
+ # @param [Hash] attributes Model attributes in the form of hash
216
+ # @return [Object] Returns the model itself
217
+ def self.build_from_hash(attributes)
218
+ return nil unless attributes.is_a?(Hash)
219
+ attributes = attributes.transform_keys(&:to_sym)
220
+ transformed_hash = {}
221
+ openapi_types.each_pair do |key, type|
222
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = nil
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
226
+ # is documented as an array but the input is not
227
+ if attributes[attribute_map[key]].is_a?(Array)
228
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
229
+ end
230
+ elsif !attributes[attribute_map[key]].nil?
231
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
232
+ end
233
+ end
234
+ new(transformed_hash)
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
248
+ hash[param] = _to_hash(value)
249
+ end
250
+ hash
251
+ end
252
+
253
+ end
254
+
255
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
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 Zernio
17
+ class CreateSipTrunk201ResponseTermination < ApiModelBase
18
+ # Telnyx termination host the platform dials for outbound (sip.telnyx.com).
19
+ attr_accessor :uri
20
+
21
+ # SIP digest username.
22
+ attr_accessor :username
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'uri' => :'uri',
28
+ :'username' => :'username'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'uri' => :'String',
46
+ :'username' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateSipTrunk201ResponseTermination` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateSipTrunk201ResponseTermination`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'uri')
73
+ self.uri = attributes[:'uri']
74
+ end
75
+
76
+ if attributes.key?(:'username')
77
+ self.username = attributes[:'username']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ uri == o.uri &&
102
+ username == o.username
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [uri, username].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end