late-sdk 0.0.571 → 0.0.573

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/CheckPhoneNumberAvailability200Response.md +1 -1
  4. data/docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md +2 -2
  5. data/docs/CreateLeadFormRequest.md +13 -11
  6. data/docs/CreateLeadFormRequestPlatformSpecificData.md +49 -0
  7. data/docs/LeadGenApi.md +25 -21
  8. data/docs/LinkedInLeadFormPlatformData.md +30 -0
  9. data/docs/LinkedInLeadFormPlatformDataConsentsInner.md +20 -0
  10. data/docs/LinkedInLeadFormPlatformDataLocale.md +20 -0
  11. data/docs/LinkedInLeadFormPlatformDataQuestionsInner.md +49 -0
  12. data/docs/LinkedInLeadFormPlatformDataQuestionsInnerOneOf.md +28 -0
  13. data/docs/LinkedInLeadFormPlatformDataQuestionsInnerOneOf1.md +28 -0
  14. data/docs/LinkedInLeadFormPlatformDataQuestionsInnerOneOf1ChoicesInner.md +20 -0
  15. data/docs/MetaLeadFormPlatformData.md +46 -0
  16. data/docs/MetaLeadFormPlatformDataContextCard.md +26 -0
  17. data/lib/zernio-sdk/api/lead_gen_api.rb +30 -24
  18. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +1 -1
  19. data/lib/zernio-sdk/models/check_phone_number_availability200_response_area_options_inner.rb +2 -2
  20. data/lib/zernio-sdk/models/create_lead_form_request.rb +25 -13
  21. data/lib/zernio-sdk/models/create_lead_form_request_platform_specific_data.rb +105 -0
  22. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data.rb +336 -0
  23. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_consents_inner.rb +176 -0
  24. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_locale.rb +156 -0
  25. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_questions_inner.rb +104 -0
  26. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_questions_inner_one_of.rb +268 -0
  27. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_questions_inner_one_of1.rb +295 -0
  28. data/lib/zernio-sdk/models/linked_in_lead_form_platform_data_questions_inner_one_of1_choices_inner.rb +190 -0
  29. data/lib/zernio-sdk/models/meta_lead_form_platform_data.rb +354 -0
  30. data/lib/zernio-sdk/models/meta_lead_form_platform_data_context_card.rb +219 -0
  31. data/lib/zernio-sdk/version.rb +1 -1
  32. data/lib/zernio-sdk.rb +10 -0
  33. data/openapi.yaml +158 -40
  34. data/spec/api/lead_gen_api_spec.rb +14 -12
  35. data/spec/models/create_lead_form_request_platform_specific_data_spec.rb +32 -0
  36. data/spec/models/create_lead_form_request_spec.rb +6 -0
  37. data/spec/models/linked_in_lead_form_platform_data_consents_inner_spec.rb +42 -0
  38. data/spec/models/linked_in_lead_form_platform_data_locale_spec.rb +42 -0
  39. data/spec/models/linked_in_lead_form_platform_data_questions_inner_one_of1_choices_inner_spec.rb +42 -0
  40. data/spec/models/linked_in_lead_form_platform_data_questions_inner_one_of1_spec.rb +70 -0
  41. data/spec/models/linked_in_lead_form_platform_data_questions_inner_one_of_spec.rb +70 -0
  42. data/spec/models/linked_in_lead_form_platform_data_questions_inner_spec.rb +32 -0
  43. data/spec/models/linked_in_lead_form_platform_data_spec.rb +76 -0
  44. data/spec/models/meta_lead_form_platform_data_context_card_spec.rb +64 -0
  45. data/spec/models/meta_lead_form_platform_data_spec.rb +124 -0
  46. data/zernio-sdk-0.0.573.gem +0 -0
  47. metadata +42 -2
  48. data/zernio-sdk-0.0.571.gem +0 -0
@@ -0,0 +1,190 @@
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 LinkedInLeadFormPlatformDataQuestionsInnerOneOf1ChoicesInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :text
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'id' => :'id',
26
+ :'text' => :'text'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'id' => :'Integer',
44
+ :'text' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::LinkedInLeadFormPlatformDataQuestionsInnerOneOf1ChoicesInner` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::LinkedInLeadFormPlatformDataQuestionsInnerOneOf1ChoicesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'id')
71
+ self.id = attributes[:'id']
72
+ else
73
+ self.id = nil
74
+ end
75
+
76
+ if attributes.key?(:'text')
77
+ self.text = attributes[:'text']
78
+ else
79
+ self.text = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @id.nil?
89
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
90
+ end
91
+
92
+ if @text.nil?
93
+ invalid_properties.push('invalid value for "text", text cannot be nil.')
94
+ end
95
+
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ return false if @id.nil?
104
+ return false if @text.nil?
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] id Value to be assigned
110
+ def id=(id)
111
+ if id.nil?
112
+ fail ArgumentError, 'id cannot be nil'
113
+ end
114
+
115
+ @id = id
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] text Value to be assigned
120
+ def text=(text)
121
+ if text.nil?
122
+ fail ArgumentError, 'text cannot be nil'
123
+ end
124
+
125
+ @text = text
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ id == o.id &&
134
+ text == o.text
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [id, text].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end
@@ -0,0 +1,354 @@
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 MetaLeadFormPlatformData < ApiModelBase
18
+ attr_accessor :questions
19
+
20
+ attr_accessor :privacy_policy_link_text
21
+
22
+ attr_accessor :follow_up_action_url
23
+
24
+ attr_accessor :locale
25
+
26
+ attr_accessor :thank_you_title
27
+
28
+ attr_accessor :thank_you_body
29
+
30
+ attr_accessor :thank_you_button_text
31
+
32
+ attr_accessor :thank_you_button_type
33
+
34
+ attr_accessor :thank_you_website_url
35
+
36
+ attr_accessor :is_optimized_for_quality
37
+
38
+ attr_accessor :form_type
39
+
40
+ attr_accessor :block_display_for_non_targeted_viewer
41
+
42
+ attr_accessor :allow_organic_lead_gen
43
+
44
+ attr_accessor :question_page_custom_headline
45
+
46
+ attr_accessor :context_card
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'questions' => :'questions',
74
+ :'privacy_policy_link_text' => :'privacyPolicyLinkText',
75
+ :'follow_up_action_url' => :'followUpActionUrl',
76
+ :'locale' => :'locale',
77
+ :'thank_you_title' => :'thankYouTitle',
78
+ :'thank_you_body' => :'thankYouBody',
79
+ :'thank_you_button_text' => :'thankYouButtonText',
80
+ :'thank_you_button_type' => :'thankYouButtonType',
81
+ :'thank_you_website_url' => :'thankYouWebsiteUrl',
82
+ :'is_optimized_for_quality' => :'isOptimizedForQuality',
83
+ :'form_type' => :'formType',
84
+ :'block_display_for_non_targeted_viewer' => :'blockDisplayForNonTargetedViewer',
85
+ :'allow_organic_lead_gen' => :'allowOrganicLeadGen',
86
+ :'question_page_custom_headline' => :'questionPageCustomHeadline',
87
+ :'context_card' => :'contextCard'
88
+ }
89
+ end
90
+
91
+ # Returns attribute mapping this model knows about
92
+ def self.acceptable_attribute_map
93
+ attribute_map
94
+ end
95
+
96
+ # Returns all the JSON keys this model knows about
97
+ def self.acceptable_attributes
98
+ acceptable_attribute_map.values
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'questions' => :'Array<CreateLeadFormRequestQuestionsInner>',
105
+ :'privacy_policy_link_text' => :'String',
106
+ :'follow_up_action_url' => :'String',
107
+ :'locale' => :'String',
108
+ :'thank_you_title' => :'String',
109
+ :'thank_you_body' => :'String',
110
+ :'thank_you_button_text' => :'String',
111
+ :'thank_you_button_type' => :'String',
112
+ :'thank_you_website_url' => :'String',
113
+ :'is_optimized_for_quality' => :'Boolean',
114
+ :'form_type' => :'String',
115
+ :'block_display_for_non_targeted_viewer' => :'Boolean',
116
+ :'allow_organic_lead_gen' => :'Boolean',
117
+ :'question_page_custom_headline' => :'String',
118
+ :'context_card' => :'MetaLeadFormPlatformDataContextCard'
119
+ }
120
+ end
121
+
122
+ # List of attributes with nullable: true
123
+ def self.openapi_nullable
124
+ Set.new([
125
+ ])
126
+ end
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ def initialize(attributes = {})
131
+ if (!attributes.is_a?(Hash))
132
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::MetaLeadFormPlatformData` initialize method"
133
+ end
134
+
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ acceptable_attribute_map = self.class.acceptable_attribute_map
137
+ attributes = attributes.each_with_object({}) { |(k, v), h|
138
+ if (!acceptable_attribute_map.key?(k.to_sym))
139
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::MetaLeadFormPlatformData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
140
+ end
141
+ h[k.to_sym] = v
142
+ }
143
+
144
+ if attributes.key?(:'questions')
145
+ if (value = attributes[:'questions']).is_a?(Array)
146
+ self.questions = value
147
+ end
148
+ else
149
+ self.questions = nil
150
+ end
151
+
152
+ if attributes.key?(:'privacy_policy_link_text')
153
+ self.privacy_policy_link_text = attributes[:'privacy_policy_link_text']
154
+ end
155
+
156
+ if attributes.key?(:'follow_up_action_url')
157
+ self.follow_up_action_url = attributes[:'follow_up_action_url']
158
+ end
159
+
160
+ if attributes.key?(:'locale')
161
+ self.locale = attributes[:'locale']
162
+ end
163
+
164
+ if attributes.key?(:'thank_you_title')
165
+ self.thank_you_title = attributes[:'thank_you_title']
166
+ end
167
+
168
+ if attributes.key?(:'thank_you_body')
169
+ self.thank_you_body = attributes[:'thank_you_body']
170
+ end
171
+
172
+ if attributes.key?(:'thank_you_button_text')
173
+ self.thank_you_button_text = attributes[:'thank_you_button_text']
174
+ end
175
+
176
+ if attributes.key?(:'thank_you_button_type')
177
+ self.thank_you_button_type = attributes[:'thank_you_button_type']
178
+ end
179
+
180
+ if attributes.key?(:'thank_you_website_url')
181
+ self.thank_you_website_url = attributes[:'thank_you_website_url']
182
+ end
183
+
184
+ if attributes.key?(:'is_optimized_for_quality')
185
+ self.is_optimized_for_quality = attributes[:'is_optimized_for_quality']
186
+ end
187
+
188
+ if attributes.key?(:'form_type')
189
+ self.form_type = attributes[:'form_type']
190
+ end
191
+
192
+ if attributes.key?(:'block_display_for_non_targeted_viewer')
193
+ self.block_display_for_non_targeted_viewer = attributes[:'block_display_for_non_targeted_viewer']
194
+ end
195
+
196
+ if attributes.key?(:'allow_organic_lead_gen')
197
+ self.allow_organic_lead_gen = attributes[:'allow_organic_lead_gen']
198
+ end
199
+
200
+ if attributes.key?(:'question_page_custom_headline')
201
+ self.question_page_custom_headline = attributes[:'question_page_custom_headline']
202
+ end
203
+
204
+ if attributes.key?(:'context_card')
205
+ self.context_card = attributes[:'context_card']
206
+ end
207
+ end
208
+
209
+ # Show invalid properties with the reasons. Usually used together with valid?
210
+ # @return Array for valid properties with the reasons
211
+ def list_invalid_properties
212
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
213
+ invalid_properties = Array.new
214
+ if @questions.nil?
215
+ invalid_properties.push('invalid value for "questions", questions cannot be nil.')
216
+ end
217
+
218
+ if @questions.length < 1
219
+ invalid_properties.push('invalid value for "questions", number of items must be greater than or equal to 1.')
220
+ end
221
+
222
+ if !@privacy_policy_link_text.nil? && @privacy_policy_link_text.to_s.length > 70
223
+ invalid_properties.push('invalid value for "privacy_policy_link_text", the character length must be smaller than or equal to 70.')
224
+ end
225
+
226
+ invalid_properties
227
+ end
228
+
229
+ # Check to see if the all the properties in the model are valid
230
+ # @return true if the model is valid
231
+ def valid?
232
+ warn '[DEPRECATED] the `valid?` method is obsolete'
233
+ return false if @questions.nil?
234
+ return false if @questions.length < 1
235
+ return false if !@privacy_policy_link_text.nil? && @privacy_policy_link_text.to_s.length > 70
236
+ form_type_validator = EnumAttributeValidator.new('String', ["MORE_VOLUME", "HIGHER_INTENT", "RICH_CREATIVE"])
237
+ return false unless form_type_validator.valid?(@form_type)
238
+ true
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] questions Value to be assigned
243
+ def questions=(questions)
244
+ if questions.nil?
245
+ fail ArgumentError, 'questions cannot be nil'
246
+ end
247
+
248
+ if questions.length < 1
249
+ fail ArgumentError, 'invalid value for "questions", number of items must be greater than or equal to 1.'
250
+ end
251
+
252
+ @questions = questions
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] privacy_policy_link_text Value to be assigned
257
+ def privacy_policy_link_text=(privacy_policy_link_text)
258
+ if privacy_policy_link_text.nil?
259
+ fail ArgumentError, 'privacy_policy_link_text cannot be nil'
260
+ end
261
+
262
+ if privacy_policy_link_text.to_s.length > 70
263
+ fail ArgumentError, 'invalid value for "privacy_policy_link_text", the character length must be smaller than or equal to 70.'
264
+ end
265
+
266
+ @privacy_policy_link_text = privacy_policy_link_text
267
+ end
268
+
269
+ # Custom attribute writer method checking allowed values (enum).
270
+ # @param [Object] form_type Object to be assigned
271
+ def form_type=(form_type)
272
+ validator = EnumAttributeValidator.new('String', ["MORE_VOLUME", "HIGHER_INTENT", "RICH_CREATIVE"])
273
+ unless validator.valid?(form_type)
274
+ fail ArgumentError, "invalid value for \"form_type\", must be one of #{validator.allowable_values}."
275
+ end
276
+ @form_type = form_type
277
+ end
278
+
279
+ # Checks equality by comparing each attribute.
280
+ # @param [Object] Object to be compared
281
+ def ==(o)
282
+ return true if self.equal?(o)
283
+ self.class == o.class &&
284
+ questions == o.questions &&
285
+ privacy_policy_link_text == o.privacy_policy_link_text &&
286
+ follow_up_action_url == o.follow_up_action_url &&
287
+ locale == o.locale &&
288
+ thank_you_title == o.thank_you_title &&
289
+ thank_you_body == o.thank_you_body &&
290
+ thank_you_button_text == o.thank_you_button_text &&
291
+ thank_you_button_type == o.thank_you_button_type &&
292
+ thank_you_website_url == o.thank_you_website_url &&
293
+ is_optimized_for_quality == o.is_optimized_for_quality &&
294
+ form_type == o.form_type &&
295
+ block_display_for_non_targeted_viewer == o.block_display_for_non_targeted_viewer &&
296
+ allow_organic_lead_gen == o.allow_organic_lead_gen &&
297
+ question_page_custom_headline == o.question_page_custom_headline &&
298
+ context_card == o.context_card
299
+ end
300
+
301
+ # @see the `==` method
302
+ # @param [Object] Object to be compared
303
+ def eql?(o)
304
+ self == o
305
+ end
306
+
307
+ # Calculates hash code according to all attributes.
308
+ # @return [Integer] Hash code
309
+ def hash
310
+ [questions, privacy_policy_link_text, follow_up_action_url, locale, thank_you_title, thank_you_body, thank_you_button_text, thank_you_button_type, thank_you_website_url, is_optimized_for_quality, form_type, block_display_for_non_targeted_viewer, allow_organic_lead_gen, question_page_custom_headline, context_card].hash
311
+ end
312
+
313
+ # Builds the object from hash
314
+ # @param [Hash] attributes Model attributes in the form of hash
315
+ # @return [Object] Returns the model itself
316
+ def self.build_from_hash(attributes)
317
+ return nil unless attributes.is_a?(Hash)
318
+ attributes = attributes.transform_keys(&:to_sym)
319
+ transformed_hash = {}
320
+ openapi_types.each_pair do |key, type|
321
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
322
+ transformed_hash["#{key}"] = nil
323
+ elsif type =~ /\AArray<(.*)>/i
324
+ # check to ensure the input is an array given that the attribute
325
+ # is documented as an array but the input is not
326
+ if attributes[attribute_map[key]].is_a?(Array)
327
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
328
+ end
329
+ elsif !attributes[attribute_map[key]].nil?
330
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
331
+ end
332
+ end
333
+ new(transformed_hash)
334
+ end
335
+
336
+ # Returns the object in the form of hash
337
+ # @return [Hash] Returns the object in the form of hash
338
+ def to_hash
339
+ hash = {}
340
+ self.class.attribute_map.each_pair do |attr, param|
341
+ value = self.send(attr)
342
+ if value.nil?
343
+ is_nullable = self.class.openapi_nullable.include?(attr)
344
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
345
+ end
346
+
347
+ hash[param] = _to_hash(value)
348
+ end
349
+ hash
350
+ end
351
+
352
+ end
353
+
354
+ end