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