pescheck-client 0.0.5

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 (143) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +182 -0
  4. data/Rakefile +10 -0
  5. data/docs/AuthenticationApi.md +217 -0
  6. data/docs/ChecksApi.md +147 -0
  7. data/docs/CustomTokenObtainPair.md +20 -0
  8. data/docs/DivisionReadOnly.md +46 -0
  9. data/docs/DivisionWrite.md +40 -0
  10. data/docs/DivisionsApi.md +369 -0
  11. data/docs/JWTGeneration.md +24 -0
  12. data/docs/JWTResponse.md +28 -0
  13. data/docs/OAuthApi.md +213 -0
  14. data/docs/OAuthApplication.md +26 -0
  15. data/docs/OAuthApplicationResponse.md +32 -0
  16. data/docs/PaginatedDivisionReadOnlyList.md +24 -0
  17. data/docs/PaginatedV2ProfileListItemList.md +24 -0
  18. data/docs/PaginatedV2ScreeningListItemList.md +24 -0
  19. data/docs/PatchedDivisionWrite.md +40 -0
  20. data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
  21. data/docs/ProfilesApi.md +438 -0
  22. data/docs/ScreeningsApi.md +293 -0
  23. data/docs/TokenRefresh.md +20 -0
  24. data/docs/V2Candidate.md +36 -0
  25. data/docs/V2CheckField.md +26 -0
  26. data/docs/V2CheckInfo.md +40 -0
  27. data/docs/V2Document.md +28 -0
  28. data/docs/V2DocumentContent.md +20 -0
  29. data/docs/V2Money.md +20 -0
  30. data/docs/V2ProfileCheck.md +20 -0
  31. data/docs/V2ProfileCheckEntry.md +30 -0
  32. data/docs/V2ProfileCreate.md +22 -0
  33. data/docs/V2ProfileDetail.md +38 -0
  34. data/docs/V2ProfileListItem.md +30 -0
  35. data/docs/V2ProfileUpdate.md +22 -0
  36. data/docs/V2ProfileUpdateCheck.md +22 -0
  37. data/docs/V2ScreeningCheck.md +24 -0
  38. data/docs/V2ScreeningCheckEntry.md +34 -0
  39. data/docs/V2ScreeningCheckListItem.md +22 -0
  40. data/docs/V2ScreeningCreate.md +22 -0
  41. data/docs/V2ScreeningDetail.md +34 -0
  42. data/docs/V2ScreeningDetailProfile.md +20 -0
  43. data/docs/V2ScreeningListItem.md +34 -0
  44. data/docs/VerifyWebhook.md +18 -0
  45. data/docs/Webhook.md +26 -0
  46. data/docs/WebhookResponse.md +36 -0
  47. data/docs/WebhooksApi.md +290 -0
  48. data/git_push.sh +57 -0
  49. data/lib/pescheck-client/api/authentication_api.rb +220 -0
  50. data/lib/pescheck-client/api/checks_api.rb +144 -0
  51. data/lib/pescheck-client/api/divisions_api.rb +365 -0
  52. data/lib/pescheck-client/api/o_auth_api.rb +202 -0
  53. data/lib/pescheck-client/api/profiles_api.rb +432 -0
  54. data/lib/pescheck-client/api/screenings_api.rb +288 -0
  55. data/lib/pescheck-client/api/webhooks_api.rb +278 -0
  56. data/lib/pescheck-client/api_client.rb +441 -0
  57. data/lib/pescheck-client/api_error.rb +58 -0
  58. data/lib/pescheck-client/api_model_base.rb +88 -0
  59. data/lib/pescheck-client/configuration.rb +429 -0
  60. data/lib/pescheck-client/models/custom_token_obtain_pair.rb +191 -0
  61. data/lib/pescheck-client/models/division_read_only.rb +469 -0
  62. data/lib/pescheck-client/models/division_write.rb +436 -0
  63. data/lib/pescheck-client/models/jwt_generation.rb +213 -0
  64. data/lib/pescheck-client/models/jwt_response.rb +285 -0
  65. data/lib/pescheck-client/models/o_auth_application.rb +265 -0
  66. data/lib/pescheck-client/models/o_auth_application_response.rb +379 -0
  67. data/lib/pescheck-client/models/paginated_division_read_only_list.rb +216 -0
  68. data/lib/pescheck-client/models/paginated_v2_profile_list_item_list.rb +216 -0
  69. data/lib/pescheck-client/models/paginated_v2_screening_list_item_list.rb +216 -0
  70. data/lib/pescheck-client/models/patched_division_write.rb +360 -0
  71. data/lib/pescheck-client/models/patched_v2_profile_partial_update.rb +176 -0
  72. data/lib/pescheck-client/models/token_refresh.rb +173 -0
  73. data/lib/pescheck-client/models/v2_candidate.rb +390 -0
  74. data/lib/pescheck-client/models/v2_check_field.rb +246 -0
  75. data/lib/pescheck-client/models/v2_check_info.rb +438 -0
  76. data/lib/pescheck-client/models/v2_document.rb +308 -0
  77. data/lib/pescheck-client/models/v2_document_content.rb +175 -0
  78. data/lib/pescheck-client/models/v2_money.rb +210 -0
  79. data/lib/pescheck-client/models/v2_profile_check.rb +201 -0
  80. data/lib/pescheck-client/models/v2_profile_check_entry.rb +349 -0
  81. data/lib/pescheck-client/models/v2_profile_create.rb +212 -0
  82. data/lib/pescheck-client/models/v2_profile_detail.rb +401 -0
  83. data/lib/pescheck-client/models/v2_profile_list_item.rb +291 -0
  84. data/lib/pescheck-client/models/v2_profile_update.rb +213 -0
  85. data/lib/pescheck-client/models/v2_profile_update_check.rb +210 -0
  86. data/lib/pescheck-client/models/v2_screening_check.rb +221 -0
  87. data/lib/pescheck-client/models/v2_screening_check_entry.rb +376 -0
  88. data/lib/pescheck-client/models/v2_screening_check_list_item.rb +242 -0
  89. data/lib/pescheck-client/models/v2_screening_create.rb +201 -0
  90. data/lib/pescheck-client/models/v2_screening_detail.rb +348 -0
  91. data/lib/pescheck-client/models/v2_screening_detail_profile.rb +156 -0
  92. data/lib/pescheck-client/models/v2_screening_list_item.rb +330 -0
  93. data/lib/pescheck-client/models/verify_webhook.rb +166 -0
  94. data/lib/pescheck-client/models/webhook.rb +265 -0
  95. data/lib/pescheck-client/models/webhook_response.rb +353 -0
  96. data/lib/pescheck-client/version.rb +15 -0
  97. data/lib/pescheck-client.rb +83 -0
  98. data/pescheck-client.gemspec +41 -0
  99. data/spec/api/authentication_api_spec.rb +68 -0
  100. data/spec/api/checks_api_spec.rb +56 -0
  101. data/spec/api/divisions_api_spec.rb +94 -0
  102. data/spec/api/o_auth_api_spec.rb +67 -0
  103. data/spec/api/profiles_api_spec.rb +105 -0
  104. data/spec/api/screenings_api_spec.rb +81 -0
  105. data/spec/api/webhooks_api_spec.rb +81 -0
  106. data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
  107. data/spec/models/division_read_only_spec.rb +120 -0
  108. data/spec/models/division_write_spec.rb +102 -0
  109. data/spec/models/jwt_generation_spec.rb +54 -0
  110. data/spec/models/jwt_response_spec.rb +66 -0
  111. data/spec/models/o_auth_application_response_spec.rb +86 -0
  112. data/spec/models/o_auth_application_spec.rb +68 -0
  113. data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
  114. data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
  115. data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
  116. data/spec/models/patched_division_write_spec.rb +102 -0
  117. data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
  118. data/spec/models/token_refresh_spec.rb +42 -0
  119. data/spec/models/v2_candidate_spec.rb +94 -0
  120. data/spec/models/v2_check_field_spec.rb +60 -0
  121. data/spec/models/v2_check_info_spec.rb +102 -0
  122. data/spec/models/v2_document_content_spec.rb +42 -0
  123. data/spec/models/v2_document_spec.rb +70 -0
  124. data/spec/models/v2_money_spec.rb +42 -0
  125. data/spec/models/v2_profile_check_entry_spec.rb +76 -0
  126. data/spec/models/v2_profile_check_spec.rb +46 -0
  127. data/spec/models/v2_profile_create_spec.rb +48 -0
  128. data/spec/models/v2_profile_detail_spec.rb +96 -0
  129. data/spec/models/v2_profile_list_item_spec.rb +72 -0
  130. data/spec/models/v2_profile_update_check_spec.rb +52 -0
  131. data/spec/models/v2_profile_update_spec.rb +48 -0
  132. data/spec/models/v2_screening_check_entry_spec.rb +88 -0
  133. data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
  134. data/spec/models/v2_screening_check_spec.rb +58 -0
  135. data/spec/models/v2_screening_create_spec.rb +48 -0
  136. data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
  137. data/spec/models/v2_screening_detail_spec.rb +84 -0
  138. data/spec/models/v2_screening_list_item_spec.rb +84 -0
  139. data/spec/models/verify_webhook_spec.rb +36 -0
  140. data/spec/models/webhook_response_spec.rb +90 -0
  141. data/spec/models/webhook_spec.rb +64 -0
  142. data/spec/spec_helper.rb +111 -0
  143. metadata +299 -0
@@ -0,0 +1,469 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pescheck
17
+ class DivisionReadOnly < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :parent
23
+
24
+ attr_accessor :created_at
25
+
26
+ attr_accessor :updated_at
27
+
28
+ attr_accessor :city
29
+
30
+ attr_accessor :address
31
+
32
+ attr_accessor :postal
33
+
34
+ attr_accessor :phone
35
+
36
+ attr_accessor :contact_name
37
+
38
+ attr_accessor :contact_email
39
+
40
+ attr_accessor :invoice_email
41
+
42
+ attr_accessor :use_parent_on_email
43
+
44
+ attr_accessor :use_parent_on_billing
45
+
46
+ attr_accessor :use_parent_on_report
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'name' => :'name',
53
+ :'parent' => :'parent',
54
+ :'created_at' => :'created_at',
55
+ :'updated_at' => :'updated_at',
56
+ :'city' => :'city',
57
+ :'address' => :'address',
58
+ :'postal' => :'postal',
59
+ :'phone' => :'phone',
60
+ :'contact_name' => :'contact_name',
61
+ :'contact_email' => :'contact_email',
62
+ :'invoice_email' => :'invoice_email',
63
+ :'use_parent_on_email' => :'use_parent_on_email',
64
+ :'use_parent_on_billing' => :'use_parent_on_billing',
65
+ :'use_parent_on_report' => :'use_parent_on_report'
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
+ :'id' => :'String',
83
+ :'name' => :'String',
84
+ :'parent' => :'String',
85
+ :'created_at' => :'Time',
86
+ :'updated_at' => :'Time',
87
+ :'city' => :'String',
88
+ :'address' => :'String',
89
+ :'postal' => :'String',
90
+ :'phone' => :'String',
91
+ :'contact_name' => :'String',
92
+ :'contact_email' => :'String',
93
+ :'invoice_email' => :'String',
94
+ :'use_parent_on_email' => :'Boolean',
95
+ :'use_parent_on_billing' => :'Boolean',
96
+ :'use_parent_on_report' => :'Boolean'
97
+ }
98
+ end
99
+
100
+ # List of attributes with nullable: true
101
+ def self.openapi_nullable
102
+ Set.new([
103
+ :'name',
104
+ :'city',
105
+ :'address',
106
+ :'postal',
107
+ :'phone',
108
+ :'contact_name',
109
+ :'contact_email',
110
+ :'invoice_email',
111
+ ])
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ if (!attributes.is_a?(Hash))
118
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::DivisionReadOnly` initialize method"
119
+ end
120
+
121
+ # check to see if the attribute exists and convert string to symbol for hash key
122
+ acceptable_attribute_map = self.class.acceptable_attribute_map
123
+ attributes = attributes.each_with_object({}) { |(k, v), h|
124
+ if (!acceptable_attribute_map.key?(k.to_sym))
125
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::DivisionReadOnly`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
126
+ end
127
+ h[k.to_sym] = v
128
+ }
129
+
130
+ if attributes.key?(:'id')
131
+ self.id = attributes[:'id']
132
+ else
133
+ self.id = nil
134
+ end
135
+
136
+ if attributes.key?(:'name')
137
+ self.name = attributes[:'name']
138
+ end
139
+
140
+ if attributes.key?(:'parent')
141
+ self.parent = attributes[:'parent']
142
+ else
143
+ self.parent = nil
144
+ end
145
+
146
+ if attributes.key?(:'created_at')
147
+ self.created_at = attributes[:'created_at']
148
+ else
149
+ self.created_at = nil
150
+ end
151
+
152
+ if attributes.key?(:'updated_at')
153
+ self.updated_at = attributes[:'updated_at']
154
+ else
155
+ self.updated_at = nil
156
+ end
157
+
158
+ if attributes.key?(:'city')
159
+ self.city = attributes[:'city']
160
+ end
161
+
162
+ if attributes.key?(:'address')
163
+ self.address = attributes[:'address']
164
+ end
165
+
166
+ if attributes.key?(:'postal')
167
+ self.postal = attributes[:'postal']
168
+ end
169
+
170
+ if attributes.key?(:'phone')
171
+ self.phone = attributes[:'phone']
172
+ end
173
+
174
+ if attributes.key?(:'contact_name')
175
+ self.contact_name = attributes[:'contact_name']
176
+ end
177
+
178
+ if attributes.key?(:'contact_email')
179
+ self.contact_email = attributes[:'contact_email']
180
+ end
181
+
182
+ if attributes.key?(:'invoice_email')
183
+ self.invoice_email = attributes[:'invoice_email']
184
+ end
185
+
186
+ if attributes.key?(:'use_parent_on_email')
187
+ self.use_parent_on_email = attributes[:'use_parent_on_email']
188
+ end
189
+
190
+ if attributes.key?(:'use_parent_on_billing')
191
+ self.use_parent_on_billing = attributes[:'use_parent_on_billing']
192
+ end
193
+
194
+ if attributes.key?(:'use_parent_on_report')
195
+ self.use_parent_on_report = attributes[:'use_parent_on_report']
196
+ end
197
+ end
198
+
199
+ # Show invalid properties with the reasons. Usually used together with valid?
200
+ # @return Array for valid properties with the reasons
201
+ def list_invalid_properties
202
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
203
+ invalid_properties = Array.new
204
+ if @id.nil?
205
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
206
+ end
207
+
208
+ if !@name.nil? && @name.to_s.length > 255
209
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
210
+ end
211
+
212
+ if @parent.nil?
213
+ invalid_properties.push('invalid value for "parent", parent cannot be nil.')
214
+ end
215
+
216
+ if @created_at.nil?
217
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
218
+ end
219
+
220
+ if @updated_at.nil?
221
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
222
+ end
223
+
224
+ if !@city.nil? && @city.to_s.length > 255
225
+ invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 255.')
226
+ end
227
+
228
+ if !@address.nil? && @address.to_s.length > 255
229
+ invalid_properties.push('invalid value for "address", the character length must be smaller than or equal to 255.')
230
+ end
231
+
232
+ if !@postal.nil? && @postal.to_s.length > 20
233
+ invalid_properties.push('invalid value for "postal", the character length must be smaller than or equal to 20.')
234
+ end
235
+
236
+ if !@phone.nil? && @phone.to_s.length > 20
237
+ invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 20.')
238
+ end
239
+
240
+ if !@contact_name.nil? && @contact_name.to_s.length > 255
241
+ invalid_properties.push('invalid value for "contact_name", the character length must be smaller than or equal to 255.')
242
+ end
243
+
244
+ if !@contact_email.nil? && @contact_email.to_s.length > 254
245
+ invalid_properties.push('invalid value for "contact_email", the character length must be smaller than or equal to 254.')
246
+ end
247
+
248
+ if !@invoice_email.nil? && @invoice_email.to_s.length > 254
249
+ invalid_properties.push('invalid value for "invoice_email", the character length must be smaller than or equal to 254.')
250
+ end
251
+
252
+ invalid_properties
253
+ end
254
+
255
+ # Check to see if the all the properties in the model are valid
256
+ # @return true if the model is valid
257
+ def valid?
258
+ warn '[DEPRECATED] the `valid?` method is obsolete'
259
+ return false if @id.nil?
260
+ return false if !@name.nil? && @name.to_s.length > 255
261
+ return false if @parent.nil?
262
+ return false if @created_at.nil?
263
+ return false if @updated_at.nil?
264
+ return false if !@city.nil? && @city.to_s.length > 255
265
+ return false if !@address.nil? && @address.to_s.length > 255
266
+ return false if !@postal.nil? && @postal.to_s.length > 20
267
+ return false if !@phone.nil? && @phone.to_s.length > 20
268
+ return false if !@contact_name.nil? && @contact_name.to_s.length > 255
269
+ return false if !@contact_email.nil? && @contact_email.to_s.length > 254
270
+ return false if !@invoice_email.nil? && @invoice_email.to_s.length > 254
271
+ true
272
+ end
273
+
274
+ # Custom attribute writer method with validation
275
+ # @param [Object] id Value to be assigned
276
+ def id=(id)
277
+ if id.nil?
278
+ fail ArgumentError, 'id cannot be nil'
279
+ end
280
+
281
+ @id = id
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] name Value to be assigned
286
+ def name=(name)
287
+ if !name.nil? && name.to_s.length > 255
288
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
289
+ end
290
+
291
+ @name = name
292
+ end
293
+
294
+ # Custom attribute writer method with validation
295
+ # @param [Object] parent Value to be assigned
296
+ def parent=(parent)
297
+ if parent.nil?
298
+ fail ArgumentError, 'parent cannot be nil'
299
+ end
300
+
301
+ @parent = parent
302
+ end
303
+
304
+ # Custom attribute writer method with validation
305
+ # @param [Object] created_at Value to be assigned
306
+ def created_at=(created_at)
307
+ if created_at.nil?
308
+ fail ArgumentError, 'created_at cannot be nil'
309
+ end
310
+
311
+ @created_at = created_at
312
+ end
313
+
314
+ # Custom attribute writer method with validation
315
+ # @param [Object] updated_at Value to be assigned
316
+ def updated_at=(updated_at)
317
+ if updated_at.nil?
318
+ fail ArgumentError, 'updated_at cannot be nil'
319
+ end
320
+
321
+ @updated_at = updated_at
322
+ end
323
+
324
+ # Custom attribute writer method with validation
325
+ # @param [Object] city Value to be assigned
326
+ def city=(city)
327
+ if !city.nil? && city.to_s.length > 255
328
+ fail ArgumentError, 'invalid value for "city", the character length must be smaller than or equal to 255.'
329
+ end
330
+
331
+ @city = city
332
+ end
333
+
334
+ # Custom attribute writer method with validation
335
+ # @param [Object] address Value to be assigned
336
+ def address=(address)
337
+ if !address.nil? && address.to_s.length > 255
338
+ fail ArgumentError, 'invalid value for "address", the character length must be smaller than or equal to 255.'
339
+ end
340
+
341
+ @address = address
342
+ end
343
+
344
+ # Custom attribute writer method with validation
345
+ # @param [Object] postal Value to be assigned
346
+ def postal=(postal)
347
+ if !postal.nil? && postal.to_s.length > 20
348
+ fail ArgumentError, 'invalid value for "postal", the character length must be smaller than or equal to 20.'
349
+ end
350
+
351
+ @postal = postal
352
+ end
353
+
354
+ # Custom attribute writer method with validation
355
+ # @param [Object] phone Value to be assigned
356
+ def phone=(phone)
357
+ if !phone.nil? && phone.to_s.length > 20
358
+ fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 20.'
359
+ end
360
+
361
+ @phone = phone
362
+ end
363
+
364
+ # Custom attribute writer method with validation
365
+ # @param [Object] contact_name Value to be assigned
366
+ def contact_name=(contact_name)
367
+ if !contact_name.nil? && contact_name.to_s.length > 255
368
+ fail ArgumentError, 'invalid value for "contact_name", the character length must be smaller than or equal to 255.'
369
+ end
370
+
371
+ @contact_name = contact_name
372
+ end
373
+
374
+ # Custom attribute writer method with validation
375
+ # @param [Object] contact_email Value to be assigned
376
+ def contact_email=(contact_email)
377
+ if !contact_email.nil? && contact_email.to_s.length > 254
378
+ fail ArgumentError, 'invalid value for "contact_email", the character length must be smaller than or equal to 254.'
379
+ end
380
+
381
+ @contact_email = contact_email
382
+ end
383
+
384
+ # Custom attribute writer method with validation
385
+ # @param [Object] invoice_email Value to be assigned
386
+ def invoice_email=(invoice_email)
387
+ if !invoice_email.nil? && invoice_email.to_s.length > 254
388
+ fail ArgumentError, 'invalid value for "invoice_email", the character length must be smaller than or equal to 254.'
389
+ end
390
+
391
+ @invoice_email = invoice_email
392
+ end
393
+
394
+ # Checks equality by comparing each attribute.
395
+ # @param [Object] Object to be compared
396
+ def ==(o)
397
+ return true if self.equal?(o)
398
+ self.class == o.class &&
399
+ id == o.id &&
400
+ name == o.name &&
401
+ parent == o.parent &&
402
+ created_at == o.created_at &&
403
+ updated_at == o.updated_at &&
404
+ city == o.city &&
405
+ address == o.address &&
406
+ postal == o.postal &&
407
+ phone == o.phone &&
408
+ contact_name == o.contact_name &&
409
+ contact_email == o.contact_email &&
410
+ invoice_email == o.invoice_email &&
411
+ use_parent_on_email == o.use_parent_on_email &&
412
+ use_parent_on_billing == o.use_parent_on_billing &&
413
+ use_parent_on_report == o.use_parent_on_report
414
+ end
415
+
416
+ # @see the `==` method
417
+ # @param [Object] Object to be compared
418
+ def eql?(o)
419
+ self == o
420
+ end
421
+
422
+ # Calculates hash code according to all attributes.
423
+ # @return [Integer] Hash code
424
+ def hash
425
+ [id, name, parent, created_at, updated_at, city, address, postal, phone, contact_name, contact_email, invoice_email, use_parent_on_email, use_parent_on_billing, use_parent_on_report].hash
426
+ end
427
+
428
+ # Builds the object from hash
429
+ # @param [Hash] attributes Model attributes in the form of hash
430
+ # @return [Object] Returns the model itself
431
+ def self.build_from_hash(attributes)
432
+ return nil unless attributes.is_a?(Hash)
433
+ attributes = attributes.transform_keys(&:to_sym)
434
+ transformed_hash = {}
435
+ openapi_types.each_pair do |key, type|
436
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
437
+ transformed_hash["#{key}"] = nil
438
+ elsif type =~ /\AArray<(.*)>/i
439
+ # check to ensure the input is an array given that the attribute
440
+ # is documented as an array but the input is not
441
+ if attributes[attribute_map[key]].is_a?(Array)
442
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
443
+ end
444
+ elsif !attributes[attribute_map[key]].nil?
445
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
446
+ end
447
+ end
448
+ new(transformed_hash)
449
+ end
450
+
451
+ # Returns the object in the form of hash
452
+ # @return [Hash] Returns the object in the form of hash
453
+ def to_hash
454
+ hash = {}
455
+ self.class.attribute_map.each_pair do |attr, param|
456
+ value = self.send(attr)
457
+ if value.nil?
458
+ is_nullable = self.class.openapi_nullable.include?(attr)
459
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
460
+ end
461
+
462
+ hash[param] = _to_hash(value)
463
+ end
464
+ hash
465
+ end
466
+
467
+ end
468
+
469
+ end