trevol 0.3.0 → 0.4.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -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/account_api.rb +2 -2
  8. data/lib/trevol_generado/api/balance_api.rb +2 -2
  9. data/lib/trevol_generado/api/catalogs_api.rb +164 -0
  10. data/lib/trevol_generado/api/company_settings_api.rb +384 -0
  11. data/lib/trevol_generado/api/credit_notes_api.rb +79 -0
  12. data/lib/trevol_generado/api/debit_notes_api.rb +79 -0
  13. data/lib/trevol_generado/api/dian_documents_api.rb +8 -2
  14. data/lib/trevol_generado/api/dian_syncs_api.rb +2 -2
  15. data/lib/trevol_generado/api/equivalent_document_adjustments_api.rb +79 -0
  16. data/lib/trevol_generado/api/equivalent_documents_api.rb +79 -0
  17. data/lib/trevol_generado/api/invoices_api.rb +79 -0
  18. data/lib/trevol_generado/api/payroll_adjustments_api.rb +6 -0
  19. data/lib/trevol_generado/api/payrolls_api.rb +6 -0
  20. data/lib/trevol_generado/api/pdf_designs_api.rb +357 -0
  21. data/lib/trevol_generado/api/pdf_templates_api.rb +79 -0
  22. data/lib/trevol_generado/api/radian_events_api.rb +6 -0
  23. data/lib/trevol_generado/api/support_document_adjustments_api.rb +6 -0
  24. data/lib/trevol_generado/api/support_documents_api.rb +6 -0
  25. data/lib/trevol_generado/models/account_api_key_input.rb +1 -1
  26. data/lib/trevol_generado/models/account_company.rb +11 -1
  27. data/lib/trevol_generado/models/account_company_onboarding.rb +1 -1
  28. data/lib/trevol_generado/models/balance.rb +2 -2
  29. data/lib/trevol_generado/models/balance_operation_prices.rb +1 -1
  30. data/lib/trevol_generado/models/code_list.rb +245 -0
  31. data/lib/trevol_generado/models/code_list_entry.rb +353 -0
  32. data/lib/trevol_generado/models/code_list_entry_list.rb +191 -0
  33. data/lib/trevol_generado/models/code_list_list.rb +191 -0
  34. data/lib/trevol_generado/models/code_list_rates.rb +174 -0
  35. data/lib/trevol_generado/models/company.rb +11 -1
  36. data/lib/trevol_generado/models/company_logo.rb +217 -0
  37. data/lib/trevol_generado/models/company_logo_deleted.rb +170 -0
  38. data/lib/trevol_generado/models/company_logo_input.rb +178 -0
  39. data/lib/trevol_generado/models/delivery.rb +16 -5
  40. data/lib/trevol_generado/models/delivery_email_resends.rb +171 -0
  41. data/lib/trevol_generado/models/document.rb +37 -5
  42. data/lib/trevol_generado/models/document_totals_item.rb +1 -0
  43. data/lib/trevol_generado/models/email_resend.rb +256 -0
  44. data/lib/trevol_generado/models/email_resend_delivery.rb +183 -0
  45. data/lib/trevol_generado/models/email_resend_request.rb +163 -0
  46. data/lib/trevol_generado/models/email_resend_summary.rb +256 -0
  47. data/lib/trevol_generado/models/equivalent_document.rb +27 -5
  48. data/lib/trevol_generado/models/equivalent_document_adjustment.rb +26 -4
  49. data/lib/trevol_generado/models/equivalent_document_adjustment_input.rb +15 -4
  50. data/lib/trevol_generado/models/equivalent_document_input.rb +15 -4
  51. data/lib/trevol_generado/models/event.rb +12 -2
  52. data/lib/trevol_generado/models/invoice_batch.rb +11 -1
  53. data/lib/trevol_generado/models/invoice_batch_invoice_input.rb +24 -5
  54. data/lib/trevol_generado/models/invoice_input.rb +24 -4
  55. data/lib/trevol_generado/models/note_input.rb +15 -4
  56. data/lib/trevol_generado/models/numbering.rb +1 -1
  57. data/lib/trevol_generado/models/pdf_design.rb +297 -0
  58. data/lib/trevol_generado/models/pdf_design_applied.rb +193 -0
  59. data/lib/trevol_generado/models/pdf_design_input.rb +277 -0
  60. data/lib/trevol_generado/models/pdf_design_list.rb +191 -0
  61. data/lib/trevol_generado/models/pdf_design_update.rb +246 -0
  62. data/lib/trevol_generado/models/pdf_settings.rb +202 -0
  63. data/lib/trevol_generado/models/pdf_settings_update.rb +170 -0
  64. data/lib/trevol_generado/models/pdf_template.rb +210 -0
  65. data/lib/trevol_generado/models/pdf_template_list.rb +191 -0
  66. data/lib/trevol_generado/models/preview.rb +11 -1
  67. data/lib/trevol_generado/models/preview_numbering.rb +161 -0
  68. data/lib/trevol_generado/models/problem.rb +26 -4
  69. data/lib/trevol_generado/models/problem_finding.rb +172 -0
  70. data/lib/trevol_generado/models/support_document.rb +11 -1
  71. data/lib/trevol_generado/models/support_document_adjustment.rb +11 -1
  72. data/lib/trevol_generado/models/webhook_endpoint.rb +13 -3
  73. data/lib/trevol_generado/models/webhook_endpoint_input.rb +15 -5
  74. data/lib/trevol_generado/models/webhook_endpoint_update.rb +12 -2
  75. data/lib/trevol_generado/tablas.rb +30 -1
  76. data/lib/trevol_generado/version.rb +1 -1
  77. data/lib/trevol_generado.rb +28 -0
  78. metadata +29 -1
@@ -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
@@ -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 CodeListList < 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<CodeList>',
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::CodeListList` 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::CodeListList`. 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
@@ -0,0 +1,174 @@
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
+ # Las tarifas de un tributo en un recurso.
18
+ class CodeListRates < ApiModelBase
19
+ # Las tarifas de la tabla de la DIAN, como texto decimal; null si la tabla no las fija.
20
+ attr_accessor :rates
21
+
22
+ attr_accessor :strict_rates
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'rates' => :'rates',
28
+ :'strict_rates' => :'strict_rates'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'rates' => :'Array<String>',
46
+ :'strict_rates' => :'Boolean'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ :'rates',
54
+ ])
55
+ end
56
+
57
+ # Returns attribute type mapping
58
+ def self.acceptable_openapi_types
59
+ openapi_types
60
+ end
61
+
62
+ # Returns the nullable attributes
63
+ def self.acceptable_openapi_nullable
64
+ openapi_nullable
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::CodeListRates` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::CodeListRates`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'rates')
84
+ if (value = attributes[:'rates']).is_a?(Array)
85
+ self.rates = value
86
+ end
87
+ end
88
+
89
+ if attributes.key?(:'strict_rates')
90
+ self.strict_rates = attributes[:'strict_rates']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ rates == o.rates &&
115
+ strict_rates == o.strict_rates
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [rates, strict_rates].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ attributes = attributes.transform_keys(&:to_sym)
136
+ # include attributes inherited from allOf parents (the nearest declaration wins)
137
+ map = acceptable_attribute_map
138
+ transformed_hash = {}
139
+ acceptable_openapi_types.each_pair do |key, type|
140
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ # include attributes inherited from allOf parents (the nearest declaration wins)
160
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -36,6 +36,9 @@ module TrevolGenerado
36
36
  # Valores conocidos: `test`, `live`.
37
37
  attr_accessor :environment
38
38
 
39
+ # Solo en el entorno SIMULADO (la empresa simulada de la cuenta): el objeto se validó, se calculó y se firmó como siempre, pero nunca llegó a la DIAN ni tiene validez. Un objeto real no lleva esta propiedad.
40
+ attr_accessor :simulated
41
+
39
42
  # Las numeraciones (resoluciones) activas del ambiente de la llave.
40
43
  attr_accessor :numbering
41
44
 
@@ -56,6 +59,7 @@ module TrevolGenerado
56
59
  :'trade_name' => :'trade_name',
57
60
  :'status' => :'status',
58
61
  :'environment' => :'environment',
62
+ :'simulated' => :'simulated',
59
63
  :'numbering' => :'numbering',
60
64
  :'key' => :'key',
61
65
  :'capabilities' => :'capabilities'
@@ -83,6 +87,7 @@ module TrevolGenerado
83
87
  :'trade_name' => :'String',
84
88
  :'status' => :'String',
85
89
  :'environment' => :'String',
90
+ :'simulated' => :'Boolean',
86
91
  :'numbering' => :'Array<CompanyNumbering>',
87
92
  :'key' => :'CompanyKey',
88
93
  :'capabilities' => :'Hash<String, Object>'
@@ -158,6 +163,10 @@ module TrevolGenerado
158
163
  self.environment = attributes[:'environment']
159
164
  end
160
165
 
166
+ if attributes.key?(:'simulated')
167
+ self.simulated = attributes[:'simulated']
168
+ end
169
+
161
170
  if attributes.key?(:'numbering')
162
171
  if (value = attributes[:'numbering']).is_a?(Array)
163
172
  self.numbering = value
@@ -203,6 +212,7 @@ module TrevolGenerado
203
212
  trade_name == o.trade_name &&
204
213
  status == o.status &&
205
214
  environment == o.environment &&
215
+ simulated == o.simulated &&
206
216
  numbering == o.numbering &&
207
217
  key == o.key &&
208
218
  capabilities == o.capabilities
@@ -217,7 +227,7 @@ module TrevolGenerado
217
227
  # Calculates hash code according to all attributes.
218
228
  # @return [Integer] Hash code
219
229
  def hash
220
- [object, id, nit, check_digit, name, trade_name, status, environment, numbering, key, capabilities].hash
230
+ [object, id, nit, check_digit, name, trade_name, status, environment, simulated, numbering, key, capabilities].hash
221
231
  end
222
232
 
223
233
  # Builds the object from hash