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,162 @@
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
+ # Cuando la llave paga primero con el saldo propio de su persona responsable (así nace cada llave; esa persona lo puede apagar en la app): el nivel de ese saldo propio, sin montos (quien tiene la llave no ve cuánto tiene esa persona). null si la llave paga con el saldo de la cuenta (por ejemplo, la del titular, o si su persona responsable no tiene saldo propio). Los demás campos siguen siendo los de la cuenta.
18
+ class BalanceKeyOwner < ApiModelBase
19
+ # ok, low (por debajo de su umbral de aviso) o empty (en cero o menos). Valores conocidos: `ok`, `low`, `empty`.
20
+ attr_accessor :level
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'level' => :'level'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'level' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Returns attribute type mapping
53
+ def self.acceptable_openapi_types
54
+ openapi_types
55
+ end
56
+
57
+ # Returns the nullable attributes
58
+ def self.acceptable_openapi_nullable
59
+ openapi_nullable
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::BalanceKeyOwner` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::BalanceKeyOwner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'level')
79
+ self.level = attributes[:'level']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ level == o.level
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [level].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ # include attributes inherited from allOf parents (the nearest declaration wins)
125
+ map = acceptable_attribute_map
126
+ transformed_hash = {}
127
+ acceptable_openapi_types.each_pair do |key, type|
128
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
138
+ end
139
+ end
140
+ new(transformed_hash)
141
+ end
142
+
143
+ # Returns the object in the form of hash
144
+ # @return [Hash] Returns the object in the form of hash
145
+ def to_hash
146
+ hash = {}
147
+ # include attributes inherited from allOf parents (the nearest declaration wins)
148
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
149
+ value = self.send(attr)
150
+ if value.nil?
151
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
152
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
153
+ end
154
+
155
+ hash[param] = _to_hash(value)
156
+ end
157
+ hash
158
+ end
159
+
160
+ end
161
+
162
+ end
@@ -0,0 +1,245 @@
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 lista de valores (sin sus entradas: están en `GET /v1/catalogs/{name}`).
18
+ class CodeList < ApiModelBase
19
+ # Valores conocidos: `catalog`.
20
+ attr_accessor :object
21
+
22
+ # El nombre de la lista: va en la ruta.
23
+ attr_accessor :id
24
+
25
+ # El nombre en español.
26
+ attr_accessor :name
27
+
28
+ attr_accessor :description
29
+
30
+ # La tabla de la DIAN de donde sale.
31
+ attr_accessor :source
32
+
33
+ # Los campos de los pedidos que la usan.
34
+ attr_accessor :used_in
35
+
36
+ # Los filtros que admite `GET /v1/catalogs/{name}` en esta lista.
37
+ attr_accessor :filters
38
+
39
+ # Cuántas entradas tiene.
40
+ attr_accessor :count
41
+
42
+ # Cambia si cambia el contenido de la lista: guárdalo para saber cuándo volver a bajarla.
43
+ attr_accessor :content_hash
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'object' => :'object',
49
+ :'id' => :'id',
50
+ :'name' => :'name',
51
+ :'description' => :'description',
52
+ :'source' => :'source',
53
+ :'used_in' => :'used_in',
54
+ :'filters' => :'filters',
55
+ :'count' => :'count',
56
+ :'content_hash' => :'content_hash'
57
+ }
58
+ end
59
+
60
+ # Returns attribute mapping this model knows about
61
+ def self.acceptable_attribute_map
62
+ attribute_map
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ acceptable_attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'object' => :'String',
74
+ :'id' => :'String',
75
+ :'name' => :'String',
76
+ :'description' => :'String',
77
+ :'source' => :'String',
78
+ :'used_in' => :'Array<String>',
79
+ :'filters' => :'Array<String>',
80
+ :'count' => :'Integer',
81
+ :'content_hash' => :'String'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Returns attribute type mapping
92
+ def self.acceptable_openapi_types
93
+ openapi_types
94
+ end
95
+
96
+ # Returns the nullable attributes
97
+ def self.acceptable_openapi_nullable
98
+ openapi_nullable
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::CodeList` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ acceptable_attribute_map = self.class.acceptable_attribute_map
110
+ attributes = attributes.each_with_object({}) { |(k, v), h|
111
+ if (!acceptable_attribute_map.key?(k.to_sym))
112
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::CodeList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
113
+ end
114
+ h[k.to_sym] = v
115
+ }
116
+
117
+ if attributes.key?(:'object')
118
+ self.object = attributes[:'object']
119
+ end
120
+
121
+ if attributes.key?(:'id')
122
+ self.id = attributes[:'id']
123
+ end
124
+
125
+ if attributes.key?(:'name')
126
+ self.name = attributes[:'name']
127
+ end
128
+
129
+ if attributes.key?(:'description')
130
+ self.description = attributes[:'description']
131
+ end
132
+
133
+ if attributes.key?(:'source')
134
+ self.source = attributes[:'source']
135
+ end
136
+
137
+ if attributes.key?(:'used_in')
138
+ if (value = attributes[:'used_in']).is_a?(Array)
139
+ self.used_in = value
140
+ end
141
+ end
142
+
143
+ if attributes.key?(:'filters')
144
+ if (value = attributes[:'filters']).is_a?(Array)
145
+ self.filters = value
146
+ end
147
+ end
148
+
149
+ if attributes.key?(:'count')
150
+ self.count = attributes[:'count']
151
+ end
152
+
153
+ if attributes.key?(:'content_hash')
154
+ self.content_hash = attributes[:'content_hash']
155
+ end
156
+ end
157
+
158
+ # Show invalid properties with the reasons. Usually used together with valid?
159
+ # @return Array for valid properties with the reasons
160
+ def list_invalid_properties
161
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
162
+ invalid_properties = Array.new
163
+ invalid_properties
164
+ end
165
+
166
+ # Check to see if the all the properties in the model are valid
167
+ # @return true if the model is valid
168
+ def valid?
169
+ warn '[DEPRECATED] the `valid?` method is obsolete'
170
+ true
171
+ end
172
+
173
+ # Checks equality by comparing each attribute.
174
+ # @param [Object] Object to be compared
175
+ def ==(o)
176
+ return true if self.equal?(o)
177
+ self.class == o.class &&
178
+ object == o.object &&
179
+ id == o.id &&
180
+ name == o.name &&
181
+ description == o.description &&
182
+ source == o.source &&
183
+ used_in == o.used_in &&
184
+ filters == o.filters &&
185
+ count == o.count &&
186
+ content_hash == o.content_hash
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [object, id, name, description, source, used_in, filters, count, content_hash].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ # include attributes inherited from allOf parents (the nearest declaration wins)
208
+ map = acceptable_attribute_map
209
+ transformed_hash = {}
210
+ acceptable_openapi_types.each_pair do |key, type|
211
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
213
+ elsif type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
221
+ end
222
+ end
223
+ new(transformed_hash)
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ # include attributes inherited from allOf parents (the nearest declaration wins)
231
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ end
244
+
245
+ end