trevol 0.3.1 → 0.5.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/GENERADO.md +1 -1
  4. data/README.md +1 -1
  5. data/lib/trevol/client.rb +6 -1
  6. data/lib/trevol/transporte.rb +1 -0
  7. data/lib/trevol_generado/api/balance_api.rb +6 -6
  8. data/lib/trevol_generado/api/catalogs_api.rb +164 -0
  9. data/lib/trevol_generado/api/company_settings_api.rb +384 -0
  10. data/lib/trevol_generado/api/credit_notes_api.rb +79 -0
  11. data/lib/trevol_generado/api/debit_notes_api.rb +79 -0
  12. data/lib/trevol_generado/api/dian_documents_api.rb +8 -2
  13. data/lib/trevol_generado/api/equivalent_document_adjustments_api.rb +79 -0
  14. data/lib/trevol_generado/api/equivalent_documents_api.rb +79 -0
  15. data/lib/trevol_generado/api/invoices_api.rb +79 -0
  16. data/lib/trevol_generado/api/payroll_adjustments_api.rb +6 -0
  17. data/lib/trevol_generado/api/payrolls_api.rb +6 -0
  18. data/lib/trevol_generado/api/pdf_designs_api.rb +357 -0
  19. data/lib/trevol_generado/api/pdf_templates_api.rb +79 -0
  20. data/lib/trevol_generado/api/radian_events_api.rb +6 -0
  21. data/lib/trevol_generado/api/support_document_adjustments_api.rb +6 -0
  22. data/lib/trevol_generado/api/support_documents_api.rb +6 -0
  23. data/lib/trevol_generado/models/account_company.rb +11 -1
  24. data/lib/trevol_generado/models/balance.rb +13 -2
  25. data/lib/trevol_generado/models/balance_key_owner.rb +162 -0
  26. data/lib/trevol_generado/models/code_list.rb +245 -0
  27. data/lib/trevol_generado/models/code_list_entry.rb +353 -0
  28. data/lib/trevol_generado/models/code_list_entry_list.rb +191 -0
  29. data/lib/trevol_generado/models/code_list_list.rb +191 -0
  30. data/lib/trevol_generado/models/code_list_rates.rb +174 -0
  31. data/lib/trevol_generado/models/company.rb +11 -1
  32. data/lib/trevol_generado/models/company_logo.rb +217 -0
  33. data/lib/trevol_generado/models/company_logo_deleted.rb +170 -0
  34. data/lib/trevol_generado/models/company_logo_input.rb +178 -0
  35. data/lib/trevol_generado/models/delivery.rb +16 -5
  36. data/lib/trevol_generado/models/delivery_email_resends.rb +171 -0
  37. data/lib/trevol_generado/models/document.rb +37 -5
  38. data/lib/trevol_generado/models/document_totals_item.rb +1 -0
  39. data/lib/trevol_generado/models/email_resend.rb +256 -0
  40. data/lib/trevol_generado/models/email_resend_delivery.rb +183 -0
  41. data/lib/trevol_generado/models/email_resend_request.rb +163 -0
  42. data/lib/trevol_generado/models/email_resend_summary.rb +256 -0
  43. data/lib/trevol_generado/models/equivalent_document.rb +27 -5
  44. data/lib/trevol_generado/models/equivalent_document_adjustment.rb +26 -4
  45. data/lib/trevol_generado/models/equivalent_document_adjustment_input.rb +15 -4
  46. data/lib/trevol_generado/models/equivalent_document_input.rb +15 -4
  47. data/lib/trevol_generado/models/event.rb +11 -1
  48. data/lib/trevol_generado/models/invoice_batch.rb +11 -1
  49. data/lib/trevol_generado/models/invoice_batch_invoice_input.rb +24 -5
  50. data/lib/trevol_generado/models/invoice_input.rb +24 -4
  51. data/lib/trevol_generado/models/note_input.rb +15 -4
  52. data/lib/trevol_generado/models/numbering.rb +1 -1
  53. data/lib/trevol_generado/models/pdf_design.rb +297 -0
  54. data/lib/trevol_generado/models/pdf_design_applied.rb +193 -0
  55. data/lib/trevol_generado/models/pdf_design_input.rb +277 -0
  56. data/lib/trevol_generado/models/pdf_design_list.rb +191 -0
  57. data/lib/trevol_generado/models/pdf_design_update.rb +246 -0
  58. data/lib/trevol_generado/models/pdf_settings.rb +202 -0
  59. data/lib/trevol_generado/models/pdf_settings_update.rb +170 -0
  60. data/lib/trevol_generado/models/pdf_template.rb +210 -0
  61. data/lib/trevol_generado/models/pdf_template_list.rb +191 -0
  62. data/lib/trevol_generado/models/preview.rb +11 -1
  63. data/lib/trevol_generado/models/preview_numbering.rb +161 -0
  64. data/lib/trevol_generado/models/problem.rb +27 -5
  65. data/lib/trevol_generado/models/problem_finding.rb +172 -0
  66. data/lib/trevol_generado/models/support_document.rb +11 -1
  67. data/lib/trevol_generado/models/support_document_adjustment.rb +11 -1
  68. data/lib/trevol_generado/models/webhook_endpoint.rb +12 -2
  69. data/lib/trevol_generado/models/webhook_endpoint_input.rb +14 -4
  70. data/lib/trevol_generado/models/webhook_endpoint_update.rb +11 -1
  71. data/lib/trevol_generado/tablas.rb +30 -1
  72. data/lib/trevol_generado/version.rb +1 -1
  73. data/lib/trevol_generado.rb +29 -0
  74. metadata +30 -1
@@ -0,0 +1,353 @@
1
+ =begin
2
+ #API de Trevol
3
+
4
+ #Trevol API. Documentación: https://platform.trevol.si/docs
5
+
6
+ The version of the OpenAPI document: 2026-11-18
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 TrevolGenerado
17
+ # Una entrada de una lista de valores: siempre `code` y `name`; los demás campos, según la lista.
18
+ class CodeListEntry < ApiModelBase
19
+ # Valores conocidos: `catalog_entry`.
20
+ attr_accessor :object
21
+
22
+ # El valor que va en el pedido.
23
+ attr_accessor :code
24
+
25
+ # El nombre de la tabla de la DIAN.
26
+ attr_accessor :name
27
+
28
+ attr_accessor :description
29
+
30
+ # `municipalities` y `postal_codes`: el departamento.
31
+ attr_accessor :department_code
32
+
33
+ attr_accessor :department_name
34
+
35
+ # Los recursos donde vale este código (las listas que cambian según el documento).
36
+ attr_accessor :resources
37
+
38
+ # `taxes`: impuesto o retención; `discount_charge_codes`: descuento o recargo. Valores conocidos: `tax`, `withholding`, `discount`, `charge`.
39
+ attr_accessor :kind
40
+
41
+ # `taxes`: porcentual (`rate`), por unidad (`unit_amount`) o los dos. Valores conocidos: `percentage`, `per_unit`, `both`.
42
+ attr_accessor :calculation
43
+
44
+ # `taxes`: la tarifa va por mil (ICA y ReteICA).
45
+ attr_accessor :per_thousand
46
+
47
+ # `taxes`: la unidad por defecto de un tributo por unidad.
48
+ attr_accessor :default_unit
49
+
50
+ # Las tarifas de la tabla de la DIAN, como texto decimal; null si la tabla no las fija.
51
+ attr_accessor :rates
52
+
53
+ # `taxes`: true si solo se aceptan las tarifas de `rates`.
54
+ attr_accessor :strict_rates
55
+
56
+ # `taxes`: las tarifas que fija la ley para cada año (IBUA e ICUI). Informativo: Trevol acepta cualquiera de `rates` sin mirar la fecha del documento.
57
+ attr_accessor :rates_by_year
58
+
59
+ # `taxes`: las tarifas de un recurso cuando no son las de `rates`.
60
+ attr_accessor :rates_by_resource
61
+
62
+ # `payment_forms`: el código de la DIAN de la forma de pago.
63
+ attr_accessor :dian_code
64
+
65
+ # `document_types` del documento equivalente: las operaciones que admite (`operation_type`); la primera es la de por defecto.
66
+ attr_accessor :operation_types
67
+
68
+ # `identity_document_types`: en el documento soporte, para qué vendedor vale.
69
+ attr_accessor :seller_residency
70
+
71
+ # `payroll_overtime_types`: el porcentaje fijo de la hora.
72
+ attr_accessor :percent
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'object' => :'object',
78
+ :'code' => :'code',
79
+ :'name' => :'name',
80
+ :'description' => :'description',
81
+ :'department_code' => :'department_code',
82
+ :'department_name' => :'department_name',
83
+ :'resources' => :'resources',
84
+ :'kind' => :'kind',
85
+ :'calculation' => :'calculation',
86
+ :'per_thousand' => :'per_thousand',
87
+ :'default_unit' => :'default_unit',
88
+ :'rates' => :'rates',
89
+ :'strict_rates' => :'strict_rates',
90
+ :'rates_by_year' => :'rates_by_year',
91
+ :'rates_by_resource' => :'rates_by_resource',
92
+ :'dian_code' => :'dian_code',
93
+ :'operation_types' => :'operation_types',
94
+ :'seller_residency' => :'seller_residency',
95
+ :'percent' => :'percent'
96
+ }
97
+ end
98
+
99
+ # Returns attribute mapping this model knows about
100
+ def self.acceptable_attribute_map
101
+ attribute_map
102
+ end
103
+
104
+ # Returns all the JSON keys this model knows about
105
+ def self.acceptable_attributes
106
+ acceptable_attribute_map.values
107
+ end
108
+
109
+ # Attribute type mapping.
110
+ def self.openapi_types
111
+ {
112
+ :'object' => :'String',
113
+ :'code' => :'String',
114
+ :'name' => :'String',
115
+ :'description' => :'String',
116
+ :'department_code' => :'String',
117
+ :'department_name' => :'String',
118
+ :'resources' => :'Array<String>',
119
+ :'kind' => :'String',
120
+ :'calculation' => :'String',
121
+ :'per_thousand' => :'Boolean',
122
+ :'default_unit' => :'String',
123
+ :'rates' => :'Array<String>',
124
+ :'strict_rates' => :'Boolean',
125
+ :'rates_by_year' => :'Hash<String, Array<String>>',
126
+ :'rates_by_resource' => :'Hash<String, CodeListRates>',
127
+ :'dian_code' => :'String',
128
+ :'operation_types' => :'Array<String>',
129
+ :'seller_residency' => :'Array<String>',
130
+ :'percent' => :'String'
131
+ }
132
+ end
133
+
134
+ # List of attributes with nullable: true
135
+ def self.openapi_nullable
136
+ Set.new([
137
+ :'rates',
138
+ ])
139
+ end
140
+
141
+ # Returns attribute type mapping
142
+ def self.acceptable_openapi_types
143
+ openapi_types
144
+ end
145
+
146
+ # Returns the nullable attributes
147
+ def self.acceptable_openapi_nullable
148
+ openapi_nullable
149
+ end
150
+
151
+ # Initializes the object
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ def initialize(attributes = {})
154
+ if (!attributes.is_a?(Hash))
155
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::CodeListEntry` initialize method"
156
+ end
157
+
158
+ # check to see if the attribute exists and convert string to symbol for hash key
159
+ acceptable_attribute_map = self.class.acceptable_attribute_map
160
+ attributes = attributes.each_with_object({}) { |(k, v), h|
161
+ if (!acceptable_attribute_map.key?(k.to_sym))
162
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::CodeListEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
163
+ end
164
+ h[k.to_sym] = v
165
+ }
166
+
167
+ if attributes.key?(:'object')
168
+ self.object = attributes[:'object']
169
+ end
170
+
171
+ if attributes.key?(:'code')
172
+ self.code = attributes[:'code']
173
+ end
174
+
175
+ if attributes.key?(:'name')
176
+ self.name = attributes[:'name']
177
+ end
178
+
179
+ if attributes.key?(:'description')
180
+ self.description = attributes[:'description']
181
+ end
182
+
183
+ if attributes.key?(:'department_code')
184
+ self.department_code = attributes[:'department_code']
185
+ end
186
+
187
+ if attributes.key?(:'department_name')
188
+ self.department_name = attributes[:'department_name']
189
+ end
190
+
191
+ if attributes.key?(:'resources')
192
+ if (value = attributes[:'resources']).is_a?(Array)
193
+ self.resources = value
194
+ end
195
+ end
196
+
197
+ if attributes.key?(:'kind')
198
+ self.kind = attributes[:'kind']
199
+ end
200
+
201
+ if attributes.key?(:'calculation')
202
+ self.calculation = attributes[:'calculation']
203
+ end
204
+
205
+ if attributes.key?(:'per_thousand')
206
+ self.per_thousand = attributes[:'per_thousand']
207
+ end
208
+
209
+ if attributes.key?(:'default_unit')
210
+ self.default_unit = attributes[:'default_unit']
211
+ end
212
+
213
+ if attributes.key?(:'rates')
214
+ if (value = attributes[:'rates']).is_a?(Array)
215
+ self.rates = value
216
+ end
217
+ end
218
+
219
+ if attributes.key?(:'strict_rates')
220
+ self.strict_rates = attributes[:'strict_rates']
221
+ end
222
+
223
+ if attributes.key?(:'rates_by_year')
224
+ if (value = attributes[:'rates_by_year']).is_a?(Hash)
225
+ self.rates_by_year = value
226
+ end
227
+ end
228
+
229
+ if attributes.key?(:'rates_by_resource')
230
+ if (value = attributes[:'rates_by_resource']).is_a?(Hash)
231
+ self.rates_by_resource = value
232
+ end
233
+ end
234
+
235
+ if attributes.key?(:'dian_code')
236
+ self.dian_code = attributes[:'dian_code']
237
+ end
238
+
239
+ if attributes.key?(:'operation_types')
240
+ if (value = attributes[:'operation_types']).is_a?(Array)
241
+ self.operation_types = value
242
+ end
243
+ end
244
+
245
+ if attributes.key?(:'seller_residency')
246
+ if (value = attributes[:'seller_residency']).is_a?(Array)
247
+ self.seller_residency = value
248
+ end
249
+ end
250
+
251
+ if attributes.key?(:'percent')
252
+ self.percent = attributes[:'percent']
253
+ end
254
+ end
255
+
256
+ # Show invalid properties with the reasons. Usually used together with valid?
257
+ # @return Array for valid properties with the reasons
258
+ def list_invalid_properties
259
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
260
+ invalid_properties = Array.new
261
+ invalid_properties
262
+ end
263
+
264
+ # Check to see if the all the properties in the model are valid
265
+ # @return true if the model is valid
266
+ def valid?
267
+ warn '[DEPRECATED] the `valid?` method is obsolete'
268
+ true
269
+ end
270
+
271
+ # Checks equality by comparing each attribute.
272
+ # @param [Object] Object to be compared
273
+ def ==(o)
274
+ return true if self.equal?(o)
275
+ self.class == o.class &&
276
+ object == o.object &&
277
+ code == o.code &&
278
+ name == o.name &&
279
+ description == o.description &&
280
+ department_code == o.department_code &&
281
+ department_name == o.department_name &&
282
+ resources == o.resources &&
283
+ kind == o.kind &&
284
+ calculation == o.calculation &&
285
+ per_thousand == o.per_thousand &&
286
+ default_unit == o.default_unit &&
287
+ rates == o.rates &&
288
+ strict_rates == o.strict_rates &&
289
+ rates_by_year == o.rates_by_year &&
290
+ rates_by_resource == o.rates_by_resource &&
291
+ dian_code == o.dian_code &&
292
+ operation_types == o.operation_types &&
293
+ seller_residency == o.seller_residency &&
294
+ percent == o.percent
295
+ end
296
+
297
+ # @see the `==` method
298
+ # @param [Object] Object to be compared
299
+ def eql?(o)
300
+ self == o
301
+ end
302
+
303
+ # Calculates hash code according to all attributes.
304
+ # @return [Integer] Hash code
305
+ def hash
306
+ [object, code, name, description, department_code, department_name, resources, kind, calculation, per_thousand, default_unit, rates, strict_rates, rates_by_year, rates_by_resource, dian_code, operation_types, seller_residency, percent].hash
307
+ end
308
+
309
+ # Builds the object from hash
310
+ # @param [Hash] attributes Model attributes in the form of hash
311
+ # @return [Object] Returns the model itself
312
+ def self.build_from_hash(attributes)
313
+ return nil unless attributes.is_a?(Hash)
314
+ attributes = attributes.transform_keys(&:to_sym)
315
+ # include attributes inherited from allOf parents (the nearest declaration wins)
316
+ map = acceptable_attribute_map
317
+ transformed_hash = {}
318
+ acceptable_openapi_types.each_pair do |key, type|
319
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
320
+ transformed_hash["#{key}"] = nil
321
+ elsif type =~ /\AArray<(.*)>/i
322
+ # check to ensure the input is an array given that the attribute
323
+ # is documented as an array but the input is not
324
+ if attributes[map[key]].is_a?(Array)
325
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
326
+ end
327
+ elsif !attributes[map[key]].nil?
328
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
329
+ end
330
+ end
331
+ new(transformed_hash)
332
+ end
333
+
334
+ # Returns the object in the form of hash
335
+ # @return [Hash] Returns the object in the form of hash
336
+ def to_hash
337
+ hash = {}
338
+ # include attributes inherited from allOf parents (the nearest declaration wins)
339
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
340
+ value = self.send(attr)
341
+ if value.nil?
342
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
343
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
344
+ end
345
+
346
+ hash[param] = _to_hash(value)
347
+ end
348
+ hash
349
+ end
350
+
351
+ end
352
+
353
+ end
@@ -0,0 +1,191 @@
1
+ =begin
2
+ #API de Trevol
3
+
4
+ #Trevol API. Documentación: https://platform.trevol.si/docs
5
+
6
+ The version of the OpenAPI document: 2026-11-18
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 TrevolGenerado
17
+ class CodeListEntryList < ApiModelBase
18
+ # Valores conocidos: `list`.
19
+ attr_accessor :object
20
+
21
+ attr_accessor :data
22
+
23
+ attr_accessor :has_more
24
+
25
+ attr_accessor :next_cursor
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'object' => :'object',
31
+ :'data' => :'data',
32
+ :'has_more' => :'has_more',
33
+ :'next_cursor' => :'next_cursor'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'object' => :'String',
51
+ :'data' => :'Array<CodeListEntry>',
52
+ :'has_more' => :'Boolean',
53
+ :'next_cursor' => :'String'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ :'next_cursor'
61
+ ])
62
+ end
63
+
64
+ # Returns attribute type mapping
65
+ def self.acceptable_openapi_types
66
+ openapi_types
67
+ end
68
+
69
+ # Returns the nullable attributes
70
+ def self.acceptable_openapi_nullable
71
+ openapi_nullable
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::CodeListEntryList` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::CodeListEntryList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'object')
91
+ self.object = attributes[:'object']
92
+ end
93
+
94
+ if attributes.key?(:'data')
95
+ if (value = attributes[:'data']).is_a?(Array)
96
+ self.data = value
97
+ end
98
+ end
99
+
100
+ if attributes.key?(:'has_more')
101
+ self.has_more = attributes[:'has_more']
102
+ end
103
+
104
+ if attributes.key?(:'next_cursor')
105
+ self.next_cursor = attributes[:'next_cursor']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ object == o.object &&
130
+ data == o.data &&
131
+ has_more == o.has_more &&
132
+ next_cursor == o.next_cursor
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Integer] Hash code
143
+ def hash
144
+ [object, data, has_more, next_cursor].hash
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def self.build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ attributes = attributes.transform_keys(&:to_sym)
153
+ # include attributes inherited from allOf parents (the nearest declaration wins)
154
+ map = acceptable_attribute_map
155
+ transformed_hash = {}
156
+ acceptable_openapi_types.each_pair do |key, type|
157
+ if attributes.key?(map[key]) && attributes[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[map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[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
+ # include attributes inherited from allOf parents (the nearest declaration wins)
177
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ end
190
+
191
+ end