late-sdk 0.0.903 → 0.0.905

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/docs/AdAccountsApi.md +70 -0
  4. data/docs/CheckPhoneNumberAvailability200Response.md +2 -0
  5. data/docs/CreateAdAccount201Response.md +30 -0
  6. data/docs/CreateAdAccountRequest.md +46 -0
  7. data/docs/ListPhoneNumberCountries200ResponseCountriesInner.md +2 -0
  8. data/docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md +6 -2
  9. data/docs/PhoneNumbersApi.md +1 -1
  10. data/docs/SubmitPhoneNumberKyc200Response.md +2 -0
  11. data/lib/zernio-sdk/api/ad_accounts_api.rb +68 -0
  12. data/lib/zernio-sdk/api/phone_numbers_api.rb +2 -2
  13. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +11 -1
  14. data/lib/zernio-sdk/models/create_ad_account201_response.rb +340 -0
  15. data/lib/zernio-sdk/models/create_ad_account_request.rb +611 -0
  16. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner.rb +11 -1
  17. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner_types_inner.rb +38 -4
  18. data/lib/zernio-sdk/models/submit_phone_number_kyc200_response.rb +11 -1
  19. data/lib/zernio-sdk/version.rb +1 -1
  20. data/lib/zernio-sdk.rb +2 -0
  21. data/openapi.yaml +132 -4
  22. data/spec/api/ad_accounts_api_spec.rb +12 -0
  23. data/spec/api/phone_numbers_api_spec.rb +1 -1
  24. data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
  25. data/spec/models/create_ad_account201_response_spec.rb +72 -0
  26. data/spec/models/create_ad_account_request_spec.rb +120 -0
  27. data/spec/models/list_phone_number_countries200_response_countries_inner_spec.rb +6 -0
  28. data/spec/models/list_phone_number_countries200_response_countries_inner_types_inner_spec.rb +16 -0
  29. data/spec/models/submit_phone_number_kyc200_response_spec.rb +6 -0
  30. data/zernio-sdk-0.0.905.gem +0 -0
  31. metadata +10 -2
  32. data/zernio-sdk-0.0.903.gem +0 -0
@@ -0,0 +1,340 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 CreateAdAccount201Response < ApiModelBase
18
+ # New Meta ad account ID for subsequent ads calls.
19
+ attr_accessor :ad_account_id
20
+
21
+ # Owning business portfolio ID.
22
+ attr_accessor :business_id
23
+
24
+ # Whether the connection scope and discovery schedule were updated.
25
+ attr_accessor :connection_updated
26
+
27
+ # Always true as a delivery prerequisite. This is not a live funding-source check. Confirm payment or invoicing in Ads Manager.
28
+ attr_accessor :payment_method_required
29
+
30
+ # Open the created account in Ads Manager.
31
+ attr_accessor :ads_manager_url
32
+
33
+ # Payment setup instructions for the user.
34
+ attr_accessor :next_steps
35
+
36
+ # Recovery instructions if the account could not be attached to the connection.
37
+ attr_accessor :warnings
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'ad_account_id' => :'adAccountId',
43
+ :'business_id' => :'businessId',
44
+ :'connection_updated' => :'connectionUpdated',
45
+ :'payment_method_required' => :'paymentMethodRequired',
46
+ :'ads_manager_url' => :'adsManagerUrl',
47
+ :'next_steps' => :'nextSteps',
48
+ :'warnings' => :'warnings'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'ad_account_id' => :'String',
66
+ :'business_id' => :'String',
67
+ :'connection_updated' => :'Boolean',
68
+ :'payment_method_required' => :'Boolean',
69
+ :'ads_manager_url' => :'String',
70
+ :'next_steps' => :'String',
71
+ :'warnings' => :'Array<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 `Zernio::CreateAdAccount201Response` 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 `Zernio::CreateAdAccount201Response`. 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?(:'ad_account_id')
98
+ self.ad_account_id = attributes[:'ad_account_id']
99
+ else
100
+ self.ad_account_id = nil
101
+ end
102
+
103
+ if attributes.key?(:'business_id')
104
+ self.business_id = attributes[:'business_id']
105
+ else
106
+ self.business_id = nil
107
+ end
108
+
109
+ if attributes.key?(:'connection_updated')
110
+ self.connection_updated = attributes[:'connection_updated']
111
+ else
112
+ self.connection_updated = nil
113
+ end
114
+
115
+ if attributes.key?(:'payment_method_required')
116
+ self.payment_method_required = attributes[:'payment_method_required']
117
+ else
118
+ self.payment_method_required = nil
119
+ end
120
+
121
+ if attributes.key?(:'ads_manager_url')
122
+ self.ads_manager_url = attributes[:'ads_manager_url']
123
+ else
124
+ self.ads_manager_url = nil
125
+ end
126
+
127
+ if attributes.key?(:'next_steps')
128
+ self.next_steps = attributes[:'next_steps']
129
+ else
130
+ self.next_steps = nil
131
+ end
132
+
133
+ if attributes.key?(:'warnings')
134
+ if (value = attributes[:'warnings']).is_a?(Array)
135
+ self.warnings = value
136
+ end
137
+ else
138
+ self.warnings = nil
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
+ invalid_properties = Array.new
147
+ if @ad_account_id.nil?
148
+ invalid_properties.push('invalid value for "ad_account_id", ad_account_id cannot be nil.')
149
+ end
150
+
151
+ pattern = Regexp.new(/^act_[0-9]+$/)
152
+ if @ad_account_id !~ pattern
153
+ invalid_properties.push("invalid value for \"ad_account_id\", must conform to the pattern #{pattern}.")
154
+ end
155
+
156
+ if @business_id.nil?
157
+ invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
158
+ end
159
+
160
+ if @connection_updated.nil?
161
+ invalid_properties.push('invalid value for "connection_updated", connection_updated cannot be nil.')
162
+ end
163
+
164
+ if @payment_method_required.nil?
165
+ invalid_properties.push('invalid value for "payment_method_required", payment_method_required cannot be nil.')
166
+ end
167
+
168
+ if @ads_manager_url.nil?
169
+ invalid_properties.push('invalid value for "ads_manager_url", ads_manager_url cannot be nil.')
170
+ end
171
+
172
+ if @next_steps.nil?
173
+ invalid_properties.push('invalid value for "next_steps", next_steps cannot be nil.')
174
+ end
175
+
176
+ if @warnings.nil?
177
+ invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
178
+ end
179
+
180
+ invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
+ return false if @ad_account_id.nil?
188
+ return false if @ad_account_id !~ Regexp.new(/^act_[0-9]+$/)
189
+ return false if @business_id.nil?
190
+ return false if @connection_updated.nil?
191
+ return false if @payment_method_required.nil?
192
+ return false if @ads_manager_url.nil?
193
+ return false if @next_steps.nil?
194
+ return false if @warnings.nil?
195
+ true
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] ad_account_id Value to be assigned
200
+ def ad_account_id=(ad_account_id)
201
+ if ad_account_id.nil?
202
+ fail ArgumentError, 'ad_account_id cannot be nil'
203
+ end
204
+
205
+ pattern = Regexp.new(/^act_[0-9]+$/)
206
+ if ad_account_id !~ pattern
207
+ fail ArgumentError, "invalid value for \"ad_account_id\", must conform to the pattern #{pattern}."
208
+ end
209
+
210
+ @ad_account_id = ad_account_id
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] business_id Value to be assigned
215
+ def business_id=(business_id)
216
+ if business_id.nil?
217
+ fail ArgumentError, 'business_id cannot be nil'
218
+ end
219
+
220
+ @business_id = business_id
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] connection_updated Value to be assigned
225
+ def connection_updated=(connection_updated)
226
+ if connection_updated.nil?
227
+ fail ArgumentError, 'connection_updated cannot be nil'
228
+ end
229
+
230
+ @connection_updated = connection_updated
231
+ end
232
+
233
+ # Custom attribute writer method with validation
234
+ # @param [Object] payment_method_required Value to be assigned
235
+ def payment_method_required=(payment_method_required)
236
+ if payment_method_required.nil?
237
+ fail ArgumentError, 'payment_method_required cannot be nil'
238
+ end
239
+
240
+ @payment_method_required = payment_method_required
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] ads_manager_url Value to be assigned
245
+ def ads_manager_url=(ads_manager_url)
246
+ if ads_manager_url.nil?
247
+ fail ArgumentError, 'ads_manager_url cannot be nil'
248
+ end
249
+
250
+ @ads_manager_url = ads_manager_url
251
+ end
252
+
253
+ # Custom attribute writer method with validation
254
+ # @param [Object] next_steps Value to be assigned
255
+ def next_steps=(next_steps)
256
+ if next_steps.nil?
257
+ fail ArgumentError, 'next_steps cannot be nil'
258
+ end
259
+
260
+ @next_steps = next_steps
261
+ end
262
+
263
+ # Custom attribute writer method with validation
264
+ # @param [Object] warnings Value to be assigned
265
+ def warnings=(warnings)
266
+ if warnings.nil?
267
+ fail ArgumentError, 'warnings cannot be nil'
268
+ end
269
+
270
+ @warnings = warnings
271
+ end
272
+
273
+ # Checks equality by comparing each attribute.
274
+ # @param [Object] Object to be compared
275
+ def ==(o)
276
+ return true if self.equal?(o)
277
+ self.class == o.class &&
278
+ ad_account_id == o.ad_account_id &&
279
+ business_id == o.business_id &&
280
+ connection_updated == o.connection_updated &&
281
+ payment_method_required == o.payment_method_required &&
282
+ ads_manager_url == o.ads_manager_url &&
283
+ next_steps == o.next_steps &&
284
+ warnings == o.warnings
285
+ end
286
+
287
+ # @see the `==` method
288
+ # @param [Object] Object to be compared
289
+ def eql?(o)
290
+ self == o
291
+ end
292
+
293
+ # Calculates hash code according to all attributes.
294
+ # @return [Integer] Hash code
295
+ def hash
296
+ [ad_account_id, business_id, connection_updated, payment_method_required, ads_manager_url, next_steps, warnings].hash
297
+ end
298
+
299
+ # Builds the object from hash
300
+ # @param [Hash] attributes Model attributes in the form of hash
301
+ # @return [Object] Returns the model itself
302
+ def self.build_from_hash(attributes)
303
+ return nil unless attributes.is_a?(Hash)
304
+ attributes = attributes.transform_keys(&:to_sym)
305
+ transformed_hash = {}
306
+ openapi_types.each_pair do |key, type|
307
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
308
+ transformed_hash["#{key}"] = nil
309
+ elsif type =~ /\AArray<(.*)>/i
310
+ # check to ensure the input is an array given that the attribute
311
+ # is documented as an array but the input is not
312
+ if attributes[attribute_map[key]].is_a?(Array)
313
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
314
+ end
315
+ elsif !attributes[attribute_map[key]].nil?
316
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
317
+ end
318
+ end
319
+ new(transformed_hash)
320
+ end
321
+
322
+ # Returns the object in the form of hash
323
+ # @return [Hash] Returns the object in the form of hash
324
+ def to_hash
325
+ hash = {}
326
+ self.class.attribute_map.each_pair do |attr, param|
327
+ value = self.send(attr)
328
+ if value.nil?
329
+ is_nullable = self.class.openapi_nullable.include?(attr)
330
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
331
+ end
332
+
333
+ hash[param] = _to_hash(value)
334
+ end
335
+ hash
336
+ end
337
+
338
+ end
339
+
340
+ end