cbox_billing 0.1.0 → 0.2.0

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/lib/cbox_billing/api/checkout_portal_api.rb +214 -0
  3. data/lib/cbox_billing/api/coupons_api.rb +55 -55
  4. data/lib/cbox_billing/api/experiments_api.rb +526 -0
  5. data/lib/cbox_billing/api/organizations_api.rb +554 -0
  6. data/lib/cbox_billing/api/pricing_tables_api.rb +519 -0
  7. data/lib/cbox_billing/api/retention_api.rb +884 -0
  8. data/lib/cbox_billing/api/sellers_api.rb +590 -0
  9. data/lib/cbox_billing/models/checkout_link.rb +283 -0
  10. data/lib/cbox_billing/models/conclude_experiment_request.rb +161 -0
  11. data/lib/cbox_billing/models/create_checkout_link_request.rb +178 -0
  12. data/lib/cbox_billing/models/customer_lifecycle_refusal.rb +238 -0
  13. data/lib/cbox_billing/models/customer_lifecycle_state.rb +268 -0
  14. data/lib/cbox_billing/models/delete_experiment200_response.rb +227 -0
  15. data/lib/cbox_billing/models/delete_organization200_response.rb +227 -0
  16. data/lib/cbox_billing/models/experiment.rb +387 -0
  17. data/lib/cbox_billing/models/experiment_input.rb +410 -0
  18. data/lib/cbox_billing/models/experiment_input_variants_inner.rb +233 -0
  19. data/lib/cbox_billing/models/experiment_variant.rb +266 -0
  20. data/lib/cbox_billing/models/list_checkout_links200_response.rb +179 -0
  21. data/lib/cbox_billing/models/list_checkout_links200_response_data_inner.rb +223 -0
  22. data/lib/cbox_billing/models/list_experiments200_response.rb +179 -0
  23. data/lib/cbox_billing/models/list_pricing_tables200_response.rb +179 -0
  24. data/lib/cbox_billing/models/list_retention_offers200_response.rb +179 -0
  25. data/lib/cbox_billing/models/list_retention_reasons200_response.rb +179 -0
  26. data/lib/cbox_billing/models/list_sellers200_response.rb +179 -0
  27. data/lib/cbox_billing/models/merge_organization_request.rb +221 -0
  28. data/lib/cbox_billing/models/merge_organization_request_fields.rb +279 -0
  29. data/lib/cbox_billing/models/preview_organization_merge200_response.rb +343 -0
  30. data/lib/cbox_billing/models/preview_organization_merge_request.rb +177 -0
  31. data/lib/cbox_billing/models/pricing_table.rb +426 -0
  32. data/lib/cbox_billing/models/pricing_table_column.rb +248 -0
  33. data/lib/cbox_billing/models/pricing_table_input.rb +388 -0
  34. data/lib/cbox_billing/models/retention_offer.rb +389 -0
  35. data/lib/cbox_billing/models/retention_offer_input.rb +447 -0
  36. data/lib/cbox_billing/models/retention_reason.rb +282 -0
  37. data/lib/cbox_billing/models/retention_reason_input.rb +195 -0
  38. data/lib/cbox_billing/models/revoke_checkout_link200_response.rb +227 -0
  39. data/lib/cbox_billing/models/seller.rb +551 -0
  40. data/lib/cbox_billing/models/seller_address.rb +201 -0
  41. data/lib/cbox_billing/models/seller_bank.rb +191 -0
  42. data/lib/cbox_billing/models/seller_input.rb +633 -0
  43. data/lib/cbox_billing/models/seller_input_registrations_inner.rb +188 -0
  44. data/lib/cbox_billing/models/seller_registrations_inner.rb +189 -0
  45. data/lib/cbox_billing/models/suspend_organization_request.rb +179 -0
  46. data/lib/cbox_billing/version.rb +1 -1
  47. data/lib/cbox_billing.rb +41 -0
  48. metadata +42 -1
@@ -0,0 +1,633 @@
1
+ =begin
2
+ #Cbox Billing API
3
+
4
+ #The HTTP API of Cbox Billing. Reference: https://github.com/cboxdk/cbox-billing/tree/main/docs/api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CboxBilling
17
+ class SellerInput < ApiModelBase
18
+ # On create only. Left out, made from the legal name.
19
+ attr_accessor :id
20
+
21
+ attr_accessor :legal_name
22
+
23
+ attr_accessor :registration_number
24
+
25
+ attr_accessor :establishment
26
+
27
+ attr_accessor :currency
28
+
29
+ # Unique in the environment.
30
+ attr_accessor :invoice_prefix
31
+
32
+ attr_accessor :is_default
33
+
34
+ attr_accessor :invoice_draft_mode
35
+
36
+ attr_accessor :invoice_draft_grace_hours
37
+
38
+ attr_accessor :timezone
39
+
40
+ attr_accessor :registrations
41
+
42
+ attr_accessor :address_line1
43
+
44
+ attr_accessor :address_line2
45
+
46
+ attr_accessor :address_postal_code
47
+
48
+ attr_accessor :address_city
49
+
50
+ attr_accessor :address_region
51
+
52
+ attr_accessor :bank_name
53
+
54
+ attr_accessor :bank_iban
55
+
56
+ attr_accessor :bank_bic
57
+
58
+ attr_accessor :bank_account
59
+
60
+ attr_accessor :brand_color
61
+
62
+ attr_accessor :logo_url
63
+
64
+ attr_accessor :from_name
65
+
66
+ attr_accessor :from_email
67
+
68
+ attr_accessor :reply_to
69
+
70
+ attr_accessor :footer_address
71
+
72
+ attr_accessor :support_url
73
+
74
+ attr_accessor :support_email
75
+
76
+ attr_accessor :default_locale
77
+
78
+ attr_accessor :remove_document_logo
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'id' => :'id',
84
+ :'legal_name' => :'legal_name',
85
+ :'registration_number' => :'registration_number',
86
+ :'establishment' => :'establishment',
87
+ :'currency' => :'currency',
88
+ :'invoice_prefix' => :'invoice_prefix',
89
+ :'is_default' => :'is_default',
90
+ :'invoice_draft_mode' => :'invoice_draft_mode',
91
+ :'invoice_draft_grace_hours' => :'invoice_draft_grace_hours',
92
+ :'timezone' => :'timezone',
93
+ :'registrations' => :'registrations',
94
+ :'address_line1' => :'address_line1',
95
+ :'address_line2' => :'address_line2',
96
+ :'address_postal_code' => :'address_postal_code',
97
+ :'address_city' => :'address_city',
98
+ :'address_region' => :'address_region',
99
+ :'bank_name' => :'bank_name',
100
+ :'bank_iban' => :'bank_iban',
101
+ :'bank_bic' => :'bank_bic',
102
+ :'bank_account' => :'bank_account',
103
+ :'brand_color' => :'brand_color',
104
+ :'logo_url' => :'logo_url',
105
+ :'from_name' => :'from_name',
106
+ :'from_email' => :'from_email',
107
+ :'reply_to' => :'reply_to',
108
+ :'footer_address' => :'footer_address',
109
+ :'support_url' => :'support_url',
110
+ :'support_email' => :'support_email',
111
+ :'default_locale' => :'default_locale',
112
+ :'remove_document_logo' => :'remove_document_logo'
113
+ }
114
+ end
115
+
116
+ # Returns attribute mapping this model knows about
117
+ def self.acceptable_attribute_map
118
+ attribute_map
119
+ end
120
+
121
+ # Returns all the JSON keys this model knows about
122
+ def self.acceptable_attributes
123
+ acceptable_attribute_map.values
124
+ end
125
+
126
+ # Attribute type mapping.
127
+ def self.openapi_types
128
+ {
129
+ :'id' => :'String',
130
+ :'legal_name' => :'String',
131
+ :'registration_number' => :'String',
132
+ :'establishment' => :'String',
133
+ :'currency' => :'String',
134
+ :'invoice_prefix' => :'String',
135
+ :'is_default' => :'Boolean',
136
+ :'invoice_draft_mode' => :'Boolean',
137
+ :'invoice_draft_grace_hours' => :'Integer',
138
+ :'timezone' => :'String',
139
+ :'registrations' => :'Array<SellerInputRegistrationsInner>',
140
+ :'address_line1' => :'String',
141
+ :'address_line2' => :'String',
142
+ :'address_postal_code' => :'String',
143
+ :'address_city' => :'String',
144
+ :'address_region' => :'String',
145
+ :'bank_name' => :'String',
146
+ :'bank_iban' => :'String',
147
+ :'bank_bic' => :'String',
148
+ :'bank_account' => :'String',
149
+ :'brand_color' => :'String',
150
+ :'logo_url' => :'String',
151
+ :'from_name' => :'String',
152
+ :'from_email' => :'String',
153
+ :'reply_to' => :'String',
154
+ :'footer_address' => :'String',
155
+ :'support_url' => :'String',
156
+ :'support_email' => :'String',
157
+ :'default_locale' => :'String',
158
+ :'remove_document_logo' => :'Boolean'
159
+ }
160
+ end
161
+
162
+ # List of attributes with nullable: true
163
+ def self.openapi_nullable
164
+ Set.new([
165
+ ])
166
+ end
167
+
168
+ # Returns attribute type mapping
169
+ def self.acceptable_openapi_types
170
+ openapi_types
171
+ end
172
+
173
+ # Returns the nullable attributes
174
+ def self.acceptable_openapi_nullable
175
+ openapi_nullable
176
+ end
177
+
178
+ # Initializes the object
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ def initialize(attributes = {})
181
+ if (!attributes.is_a?(Hash))
182
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CboxBilling::SellerInput` initialize method"
183
+ end
184
+
185
+ # check to see if the attribute exists and convert string to symbol for hash key
186
+ acceptable_attribute_map = self.class.acceptable_attribute_map
187
+ attributes = attributes.each_with_object({}) { |(k, v), h|
188
+ if (!acceptable_attribute_map.key?(k.to_sym))
189
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CboxBilling::SellerInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
190
+ end
191
+ h[k.to_sym] = v
192
+ }
193
+
194
+ if attributes.key?(:'id')
195
+ self.id = attributes[:'id']
196
+ end
197
+
198
+ if attributes.key?(:'legal_name')
199
+ self.legal_name = attributes[:'legal_name']
200
+ else
201
+ self.legal_name = nil
202
+ end
203
+
204
+ if attributes.key?(:'registration_number')
205
+ self.registration_number = attributes[:'registration_number']
206
+ else
207
+ self.registration_number = nil
208
+ end
209
+
210
+ if attributes.key?(:'establishment')
211
+ self.establishment = attributes[:'establishment']
212
+ else
213
+ self.establishment = nil
214
+ end
215
+
216
+ if attributes.key?(:'currency')
217
+ self.currency = attributes[:'currency']
218
+ else
219
+ self.currency = nil
220
+ end
221
+
222
+ if attributes.key?(:'invoice_prefix')
223
+ self.invoice_prefix = attributes[:'invoice_prefix']
224
+ else
225
+ self.invoice_prefix = nil
226
+ end
227
+
228
+ if attributes.key?(:'is_default')
229
+ self.is_default = attributes[:'is_default']
230
+ end
231
+
232
+ if attributes.key?(:'invoice_draft_mode')
233
+ self.invoice_draft_mode = attributes[:'invoice_draft_mode']
234
+ end
235
+
236
+ if attributes.key?(:'invoice_draft_grace_hours')
237
+ self.invoice_draft_grace_hours = attributes[:'invoice_draft_grace_hours']
238
+ end
239
+
240
+ if attributes.key?(:'timezone')
241
+ self.timezone = attributes[:'timezone']
242
+ end
243
+
244
+ if attributes.key?(:'registrations')
245
+ if (value = attributes[:'registrations']).is_a?(Array)
246
+ self.registrations = value
247
+ end
248
+ end
249
+
250
+ if attributes.key?(:'address_line1')
251
+ self.address_line1 = attributes[:'address_line1']
252
+ end
253
+
254
+ if attributes.key?(:'address_line2')
255
+ self.address_line2 = attributes[:'address_line2']
256
+ end
257
+
258
+ if attributes.key?(:'address_postal_code')
259
+ self.address_postal_code = attributes[:'address_postal_code']
260
+ end
261
+
262
+ if attributes.key?(:'address_city')
263
+ self.address_city = attributes[:'address_city']
264
+ end
265
+
266
+ if attributes.key?(:'address_region')
267
+ self.address_region = attributes[:'address_region']
268
+ end
269
+
270
+ if attributes.key?(:'bank_name')
271
+ self.bank_name = attributes[:'bank_name']
272
+ end
273
+
274
+ if attributes.key?(:'bank_iban')
275
+ self.bank_iban = attributes[:'bank_iban']
276
+ end
277
+
278
+ if attributes.key?(:'bank_bic')
279
+ self.bank_bic = attributes[:'bank_bic']
280
+ end
281
+
282
+ if attributes.key?(:'bank_account')
283
+ self.bank_account = attributes[:'bank_account']
284
+ end
285
+
286
+ if attributes.key?(:'brand_color')
287
+ self.brand_color = attributes[:'brand_color']
288
+ end
289
+
290
+ if attributes.key?(:'logo_url')
291
+ self.logo_url = attributes[:'logo_url']
292
+ end
293
+
294
+ if attributes.key?(:'from_name')
295
+ self.from_name = attributes[:'from_name']
296
+ end
297
+
298
+ if attributes.key?(:'from_email')
299
+ self.from_email = attributes[:'from_email']
300
+ end
301
+
302
+ if attributes.key?(:'reply_to')
303
+ self.reply_to = attributes[:'reply_to']
304
+ end
305
+
306
+ if attributes.key?(:'footer_address')
307
+ self.footer_address = attributes[:'footer_address']
308
+ end
309
+
310
+ if attributes.key?(:'support_url')
311
+ self.support_url = attributes[:'support_url']
312
+ end
313
+
314
+ if attributes.key?(:'support_email')
315
+ self.support_email = attributes[:'support_email']
316
+ end
317
+
318
+ if attributes.key?(:'default_locale')
319
+ self.default_locale = attributes[:'default_locale']
320
+ end
321
+
322
+ if attributes.key?(:'remove_document_logo')
323
+ self.remove_document_logo = attributes[:'remove_document_logo']
324
+ end
325
+ end
326
+
327
+ # Show invalid properties with the reasons. Usually used together with valid?
328
+ # @return Array for valid properties with the reasons
329
+ def list_invalid_properties
330
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
331
+ invalid_properties = Array.new
332
+ pattern = Regexp.new(/^[a-z0-9._-]+$/)
333
+ if !@id.nil? && @id !~ pattern
334
+ invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
335
+ end
336
+
337
+ if @legal_name.nil?
338
+ invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.')
339
+ end
340
+
341
+ if @legal_name.to_s.length > 190
342
+ invalid_properties.push('invalid value for "legal_name", the character length must be smaller than or equal to 190.')
343
+ end
344
+
345
+ if @registration_number.nil?
346
+ invalid_properties.push('invalid value for "registration_number", registration_number cannot be nil.')
347
+ end
348
+
349
+ if @registration_number.to_s.length > 64
350
+ invalid_properties.push('invalid value for "registration_number", the character length must be smaller than or equal to 64.')
351
+ end
352
+
353
+ if @establishment.nil?
354
+ invalid_properties.push('invalid value for "establishment", establishment cannot be nil.')
355
+ end
356
+
357
+ if @establishment.to_s.length > 2
358
+ invalid_properties.push('invalid value for "establishment", the character length must be smaller than or equal to 2.')
359
+ end
360
+
361
+ if @establishment.to_s.length < 2
362
+ invalid_properties.push('invalid value for "establishment", the character length must be greater than or equal to 2.')
363
+ end
364
+
365
+ if @currency.nil?
366
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
367
+ end
368
+
369
+ if @currency.to_s.length > 3
370
+ invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
371
+ end
372
+
373
+ if @currency.to_s.length < 3
374
+ invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
375
+ end
376
+
377
+ if @invoice_prefix.nil?
378
+ invalid_properties.push('invalid value for "invoice_prefix", invoice_prefix cannot be nil.')
379
+ end
380
+
381
+ if @invoice_prefix.to_s.length > 40
382
+ invalid_properties.push('invalid value for "invoice_prefix", the character length must be smaller than or equal to 40.')
383
+ end
384
+
385
+ pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
386
+ if @invoice_prefix !~ pattern
387
+ invalid_properties.push("invalid value for \"invoice_prefix\", must conform to the pattern #{pattern}.")
388
+ end
389
+
390
+ if !@invoice_draft_grace_hours.nil? && @invoice_draft_grace_hours > 2160
391
+ invalid_properties.push('invalid value for "invoice_draft_grace_hours", must be smaller than or equal to 2160.')
392
+ end
393
+
394
+ if !@invoice_draft_grace_hours.nil? && @invoice_draft_grace_hours < 0
395
+ invalid_properties.push('invalid value for "invoice_draft_grace_hours", must be greater than or equal to 0.')
396
+ end
397
+
398
+ invalid_properties
399
+ end
400
+
401
+ # Check to see if the all the properties in the model are valid
402
+ # @return true if the model is valid
403
+ def valid?
404
+ warn '[DEPRECATED] the `valid?` method is obsolete'
405
+ return false if !@id.nil? && @id !~ Regexp.new(/^[a-z0-9._-]+$/)
406
+ return false if @legal_name.nil?
407
+ return false if @legal_name.to_s.length > 190
408
+ return false if @registration_number.nil?
409
+ return false if @registration_number.to_s.length > 64
410
+ return false if @establishment.nil?
411
+ return false if @establishment.to_s.length > 2
412
+ return false if @establishment.to_s.length < 2
413
+ return false if @currency.nil?
414
+ return false if @currency.to_s.length > 3
415
+ return false if @currency.to_s.length < 3
416
+ return false if @invoice_prefix.nil?
417
+ return false if @invoice_prefix.to_s.length > 40
418
+ return false if @invoice_prefix !~ Regexp.new(/^[A-Za-z0-9._-]+$/)
419
+ return false if !@invoice_draft_grace_hours.nil? && @invoice_draft_grace_hours > 2160
420
+ return false if !@invoice_draft_grace_hours.nil? && @invoice_draft_grace_hours < 0
421
+ true
422
+ end
423
+
424
+ # Custom attribute writer method with validation
425
+ # @param [Object] id Value to be assigned
426
+ def id=(id)
427
+ if id.nil?
428
+ fail ArgumentError, 'id cannot be nil'
429
+ end
430
+
431
+ pattern = Regexp.new(/^[a-z0-9._-]+$/)
432
+ if id !~ pattern
433
+ fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
434
+ end
435
+
436
+ @id = id
437
+ end
438
+
439
+ # Custom attribute writer method with validation
440
+ # @param [Object] legal_name Value to be assigned
441
+ def legal_name=(legal_name)
442
+ if legal_name.nil?
443
+ fail ArgumentError, 'legal_name cannot be nil'
444
+ end
445
+
446
+ if legal_name.to_s.length > 190
447
+ fail ArgumentError, 'invalid value for "legal_name", the character length must be smaller than or equal to 190.'
448
+ end
449
+
450
+ @legal_name = legal_name
451
+ end
452
+
453
+ # Custom attribute writer method with validation
454
+ # @param [Object] registration_number Value to be assigned
455
+ def registration_number=(registration_number)
456
+ if registration_number.nil?
457
+ fail ArgumentError, 'registration_number cannot be nil'
458
+ end
459
+
460
+ if registration_number.to_s.length > 64
461
+ fail ArgumentError, 'invalid value for "registration_number", the character length must be smaller than or equal to 64.'
462
+ end
463
+
464
+ @registration_number = registration_number
465
+ end
466
+
467
+ # Custom attribute writer method with validation
468
+ # @param [Object] establishment Value to be assigned
469
+ def establishment=(establishment)
470
+ if establishment.nil?
471
+ fail ArgumentError, 'establishment cannot be nil'
472
+ end
473
+
474
+ if establishment.to_s.length > 2
475
+ fail ArgumentError, 'invalid value for "establishment", the character length must be smaller than or equal to 2.'
476
+ end
477
+
478
+ if establishment.to_s.length < 2
479
+ fail ArgumentError, 'invalid value for "establishment", the character length must be greater than or equal to 2.'
480
+ end
481
+
482
+ @establishment = establishment
483
+ end
484
+
485
+ # Custom attribute writer method with validation
486
+ # @param [Object] currency Value to be assigned
487
+ def currency=(currency)
488
+ if currency.nil?
489
+ fail ArgumentError, 'currency cannot be nil'
490
+ end
491
+
492
+ if currency.to_s.length > 3
493
+ fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
494
+ end
495
+
496
+ if currency.to_s.length < 3
497
+ fail ArgumentError, 'invalid value for "currency", the character length must be greater than or equal to 3.'
498
+ end
499
+
500
+ @currency = currency
501
+ end
502
+
503
+ # Custom attribute writer method with validation
504
+ # @param [Object] invoice_prefix Value to be assigned
505
+ def invoice_prefix=(invoice_prefix)
506
+ if invoice_prefix.nil?
507
+ fail ArgumentError, 'invoice_prefix cannot be nil'
508
+ end
509
+
510
+ if invoice_prefix.to_s.length > 40
511
+ fail ArgumentError, 'invalid value for "invoice_prefix", the character length must be smaller than or equal to 40.'
512
+ end
513
+
514
+ pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
515
+ if invoice_prefix !~ pattern
516
+ fail ArgumentError, "invalid value for \"invoice_prefix\", must conform to the pattern #{pattern}."
517
+ end
518
+
519
+ @invoice_prefix = invoice_prefix
520
+ end
521
+
522
+ # Custom attribute writer method with validation
523
+ # @param [Object] invoice_draft_grace_hours Value to be assigned
524
+ def invoice_draft_grace_hours=(invoice_draft_grace_hours)
525
+ if invoice_draft_grace_hours.nil?
526
+ fail ArgumentError, 'invoice_draft_grace_hours cannot be nil'
527
+ end
528
+
529
+ if invoice_draft_grace_hours > 2160
530
+ fail ArgumentError, 'invalid value for "invoice_draft_grace_hours", must be smaller than or equal to 2160.'
531
+ end
532
+
533
+ if invoice_draft_grace_hours < 0
534
+ fail ArgumentError, 'invalid value for "invoice_draft_grace_hours", must be greater than or equal to 0.'
535
+ end
536
+
537
+ @invoice_draft_grace_hours = invoice_draft_grace_hours
538
+ end
539
+
540
+ # Checks equality by comparing each attribute.
541
+ # @param [Object] Object to be compared
542
+ def ==(o)
543
+ return true if self.equal?(o)
544
+ self.class == o.class &&
545
+ id == o.id &&
546
+ legal_name == o.legal_name &&
547
+ registration_number == o.registration_number &&
548
+ establishment == o.establishment &&
549
+ currency == o.currency &&
550
+ invoice_prefix == o.invoice_prefix &&
551
+ is_default == o.is_default &&
552
+ invoice_draft_mode == o.invoice_draft_mode &&
553
+ invoice_draft_grace_hours == o.invoice_draft_grace_hours &&
554
+ timezone == o.timezone &&
555
+ registrations == o.registrations &&
556
+ address_line1 == o.address_line1 &&
557
+ address_line2 == o.address_line2 &&
558
+ address_postal_code == o.address_postal_code &&
559
+ address_city == o.address_city &&
560
+ address_region == o.address_region &&
561
+ bank_name == o.bank_name &&
562
+ bank_iban == o.bank_iban &&
563
+ bank_bic == o.bank_bic &&
564
+ bank_account == o.bank_account &&
565
+ brand_color == o.brand_color &&
566
+ logo_url == o.logo_url &&
567
+ from_name == o.from_name &&
568
+ from_email == o.from_email &&
569
+ reply_to == o.reply_to &&
570
+ footer_address == o.footer_address &&
571
+ support_url == o.support_url &&
572
+ support_email == o.support_email &&
573
+ default_locale == o.default_locale &&
574
+ remove_document_logo == o.remove_document_logo
575
+ end
576
+
577
+ # @see the `==` method
578
+ # @param [Object] Object to be compared
579
+ def eql?(o)
580
+ self == o
581
+ end
582
+
583
+ # Calculates hash code according to all attributes.
584
+ # @return [Integer] Hash code
585
+ def hash
586
+ [id, legal_name, registration_number, establishment, currency, invoice_prefix, is_default, invoice_draft_mode, invoice_draft_grace_hours, timezone, registrations, address_line1, address_line2, address_postal_code, address_city, address_region, bank_name, bank_iban, bank_bic, bank_account, brand_color, logo_url, from_name, from_email, reply_to, footer_address, support_url, support_email, default_locale, remove_document_logo].hash
587
+ end
588
+
589
+ # Builds the object from hash
590
+ # @param [Hash] attributes Model attributes in the form of hash
591
+ # @return [Object] Returns the model itself
592
+ def self.build_from_hash(attributes)
593
+ return nil unless attributes.is_a?(Hash)
594
+ attributes = attributes.transform_keys(&:to_sym)
595
+ # include attributes inherited from allOf parents (the nearest declaration wins)
596
+ map = acceptable_attribute_map
597
+ transformed_hash = {}
598
+ acceptable_openapi_types.each_pair do |key, type|
599
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
600
+ transformed_hash["#{key}"] = nil
601
+ elsif type =~ /\AArray<(.*)>/i
602
+ # check to ensure the input is an array given that the attribute
603
+ # is documented as an array but the input is not
604
+ if attributes[map[key]].is_a?(Array)
605
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
606
+ end
607
+ elsif !attributes[map[key]].nil?
608
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
609
+ end
610
+ end
611
+ new(transformed_hash)
612
+ end
613
+
614
+ # Returns the object in the form of hash
615
+ # @return [Hash] Returns the object in the form of hash
616
+ def to_hash
617
+ hash = {}
618
+ # include attributes inherited from allOf parents (the nearest declaration wins)
619
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
620
+ value = self.send(attr)
621
+ if value.nil?
622
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
623
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
624
+ end
625
+
626
+ hash[param] = _to_hash(value)
627
+ end
628
+ hash
629
+ end
630
+
631
+ end
632
+
633
+ end