trevol 0.3.1 → 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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -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/catalogs_api.rb +164 -0
  8. data/lib/trevol_generado/api/company_settings_api.rb +384 -0
  9. data/lib/trevol_generado/api/credit_notes_api.rb +79 -0
  10. data/lib/trevol_generado/api/debit_notes_api.rb +79 -0
  11. data/lib/trevol_generado/api/dian_documents_api.rb +8 -2
  12. data/lib/trevol_generado/api/equivalent_document_adjustments_api.rb +79 -0
  13. data/lib/trevol_generado/api/equivalent_documents_api.rb +79 -0
  14. data/lib/trevol_generado/api/invoices_api.rb +79 -0
  15. data/lib/trevol_generado/api/payroll_adjustments_api.rb +6 -0
  16. data/lib/trevol_generado/api/payrolls_api.rb +6 -0
  17. data/lib/trevol_generado/api/pdf_designs_api.rb +357 -0
  18. data/lib/trevol_generado/api/pdf_templates_api.rb +79 -0
  19. data/lib/trevol_generado/api/radian_events_api.rb +6 -0
  20. data/lib/trevol_generado/api/support_document_adjustments_api.rb +6 -0
  21. data/lib/trevol_generado/api/support_documents_api.rb +6 -0
  22. data/lib/trevol_generado/models/account_company.rb +11 -1
  23. data/lib/trevol_generado/models/code_list.rb +245 -0
  24. data/lib/trevol_generado/models/code_list_entry.rb +353 -0
  25. data/lib/trevol_generado/models/code_list_entry_list.rb +191 -0
  26. data/lib/trevol_generado/models/code_list_list.rb +191 -0
  27. data/lib/trevol_generado/models/code_list_rates.rb +174 -0
  28. data/lib/trevol_generado/models/company.rb +11 -1
  29. data/lib/trevol_generado/models/company_logo.rb +217 -0
  30. data/lib/trevol_generado/models/company_logo_deleted.rb +170 -0
  31. data/lib/trevol_generado/models/company_logo_input.rb +178 -0
  32. data/lib/trevol_generado/models/delivery.rb +16 -5
  33. data/lib/trevol_generado/models/delivery_email_resends.rb +171 -0
  34. data/lib/trevol_generado/models/document.rb +37 -5
  35. data/lib/trevol_generado/models/document_totals_item.rb +1 -0
  36. data/lib/trevol_generado/models/email_resend.rb +256 -0
  37. data/lib/trevol_generado/models/email_resend_delivery.rb +183 -0
  38. data/lib/trevol_generado/models/email_resend_request.rb +163 -0
  39. data/lib/trevol_generado/models/email_resend_summary.rb +256 -0
  40. data/lib/trevol_generado/models/equivalent_document.rb +27 -5
  41. data/lib/trevol_generado/models/equivalent_document_adjustment.rb +26 -4
  42. data/lib/trevol_generado/models/equivalent_document_adjustment_input.rb +15 -4
  43. data/lib/trevol_generado/models/equivalent_document_input.rb +15 -4
  44. data/lib/trevol_generado/models/event.rb +11 -1
  45. data/lib/trevol_generado/models/invoice_batch.rb +11 -1
  46. data/lib/trevol_generado/models/invoice_batch_invoice_input.rb +24 -5
  47. data/lib/trevol_generado/models/invoice_input.rb +24 -4
  48. data/lib/trevol_generado/models/note_input.rb +15 -4
  49. data/lib/trevol_generado/models/numbering.rb +1 -1
  50. data/lib/trevol_generado/models/pdf_design.rb +297 -0
  51. data/lib/trevol_generado/models/pdf_design_applied.rb +193 -0
  52. data/lib/trevol_generado/models/pdf_design_input.rb +277 -0
  53. data/lib/trevol_generado/models/pdf_design_list.rb +191 -0
  54. data/lib/trevol_generado/models/pdf_design_update.rb +246 -0
  55. data/lib/trevol_generado/models/pdf_settings.rb +202 -0
  56. data/lib/trevol_generado/models/pdf_settings_update.rb +170 -0
  57. data/lib/trevol_generado/models/pdf_template.rb +210 -0
  58. data/lib/trevol_generado/models/pdf_template_list.rb +191 -0
  59. data/lib/trevol_generado/models/preview.rb +11 -1
  60. data/lib/trevol_generado/models/preview_numbering.rb +161 -0
  61. data/lib/trevol_generado/models/problem.rb +26 -4
  62. data/lib/trevol_generado/models/problem_finding.rb +172 -0
  63. data/lib/trevol_generado/models/support_document.rb +11 -1
  64. data/lib/trevol_generado/models/support_document_adjustment.rb +11 -1
  65. data/lib/trevol_generado/models/webhook_endpoint.rb +12 -2
  66. data/lib/trevol_generado/models/webhook_endpoint_input.rb +14 -4
  67. data/lib/trevol_generado/models/webhook_endpoint_update.rb +11 -1
  68. data/lib/trevol_generado/tablas.rb +30 -1
  69. data/lib/trevol_generado/version.rb +1 -1
  70. data/lib/trevol_generado.rb +28 -0
  71. metadata +29 -1
@@ -368,6 +368,8 @@ module TrevolGenerado
368
368
  # @option opts [String] :employee_code
369
369
  # @option opts [String] :period_end_from
370
370
  # @option opts [String] :period_end_to
371
+ # @option opts [String] :number El número completo exacto, como sale en `number` (p. ej. `SETP990000123`; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
372
+ # @option opts [String] :prefix El prefijo exacto, como sale en `prefix`. Solo, lista una numeración; con `number`, quita la ambigüedad.
371
373
  # @return [PayrollList]
372
374
  def list_payrolls(opts = {})
373
375
  data, _status_code, _headers = list_payrolls_with_http_info(opts)
@@ -386,6 +388,8 @@ module TrevolGenerado
386
388
  # @option opts [String] :employee_code
387
389
  # @option opts [String] :period_end_from
388
390
  # @option opts [String] :period_end_to
391
+ # @option opts [String] :number El número completo exacto, como sale en `number` (p. ej. `SETP990000123`; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
392
+ # @option opts [String] :prefix El prefijo exacto, como sale en `prefix`. Solo, lista una numeración; con `number`, quita la ambigüedad.
389
393
  # @return [Array<(PayrollList, Integer, Hash)>] PayrollList data, response status code and response headers
390
394
  def list_payrolls_with_http_info(opts = {})
391
395
  if @api_client.config.debugging
@@ -405,6 +409,8 @@ module TrevolGenerado
405
409
  query_params[:'employee_code'] = opts[:'employee_code'] if !opts[:'employee_code'].nil?
406
410
  query_params[:'period_end_from'] = opts[:'period_end_from'] if !opts[:'period_end_from'].nil?
407
411
  query_params[:'period_end_to'] = opts[:'period_end_to'] if !opts[:'period_end_to'].nil?
412
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
413
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
408
414
 
409
415
  # header parameters
410
416
  header_params = opts[:header_params] || {}
@@ -0,0 +1,357 @@
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 'cgi'
14
+
15
+ module TrevolGenerado
16
+ class PdfDesignsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Archivar un diseño del PDF
23
+ # Deja de ofrecerse; los documentos que lo usaron no cambian. 409 `pdf_design_in_use` si es el predeterminado o una numeración lo usa.
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PdfDesign]
27
+ def archive_pdf_design(id, opts = {})
28
+ data, _status_code, _headers = archive_pdf_design_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Archivar un diseño del PDF
33
+ # Deja de ofrecerse; los documentos que lo usaron no cambian. 409 &#x60;pdf_design_in_use&#x60; si es el predeterminado o una numeración lo usa.
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PdfDesign, Integer, Hash)>] PdfDesign data, response status code and response headers
37
+ def archive_pdf_design_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PdfDesignsApi.archive_pdf_design ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling PdfDesignsApi.archive_pdf_design"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pdf_designs/{id}/archive'.sub('{id}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'PdfDesign'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['llave']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"PdfDesignsApi.archive_pdf_design",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: PdfDesignsApi#archive_pdf_design\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Crear un diseño del PDF
86
+ # Crea un diseño desde una plantilla, con el color, la letra y el logo de la empresa. Antes de guardarlo revisamos que quepa en todos los documentos de su formato con los datos de tu empresa (422 `pdf_design_invalid` si no). Hasta 20 diseños activos por empresa. Solo llaves de escritura de producción (`tvl_live_`), con el permiso del titular en la app, e `Idempotency-Key`.
87
+ # @param pdf_design_input [PdfDesignInput]
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :idempotency_key Obligatoria: 1 a 255 caracteres ASCII visibles, única por pedido (7 días).
90
+ # @return [PdfDesign]
91
+ def create_pdf_design(pdf_design_input, opts = {})
92
+ data, _status_code, _headers = create_pdf_design_with_http_info(pdf_design_input, opts)
93
+ data
94
+ end
95
+
96
+ # Crear un diseño del PDF
97
+ # Crea un diseño desde una plantilla, con el color, la letra y el logo de la empresa. Antes de guardarlo revisamos que quepa en todos los documentos de su formato con los datos de tu empresa (422 &#x60;pdf_design_invalid&#x60; si no). Hasta 20 diseños activos por empresa. Solo llaves de escritura de producción (&#x60;tvl_live_&#x60;), con el permiso del titular en la app, e &#x60;Idempotency-Key&#x60;.
98
+ # @param pdf_design_input [PdfDesignInput]
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [String] :idempotency_key Obligatoria: 1 a 255 caracteres ASCII visibles, única por pedido (7 días).
101
+ # @return [Array<(PdfDesign, Integer, Hash)>] PdfDesign data, response status code and response headers
102
+ def create_pdf_design_with_http_info(pdf_design_input, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: PdfDesignsApi.create_pdf_design ...'
105
+ end
106
+ # verify the required parameter 'pdf_design_input' is set
107
+ if @api_client.config.client_side_validation && pdf_design_input.nil?
108
+ fail ArgumentError, "Missing the required parameter 'pdf_design_input' when calling PdfDesignsApi.create_pdf_design"
109
+ end
110
+ # resource path
111
+ local_var_path = '/pdf_designs'
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+ # HTTP header 'Accept' (if needed)
119
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
120
+ # HTTP header 'Content-Type'
121
+ content_type = @api_client.select_header_content_type(['application/json'])
122
+ if !content_type.nil?
123
+ header_params['Content-Type'] = content_type
124
+ end
125
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pdf_design_input)
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'PdfDesign'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['llave']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"PdfDesignsApi.create_pdf_design",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: PdfDesignsApi#create_pdf_design\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Los diseños del PDF de la empresa
157
+ # Los diseños del PDF de la empresa (los mismos de la app), del más nuevo al más viejo. Los archivados solo con `include_archived=true`. Cualquier llave los lee: los diseños son de la empresa, no del ambiente.
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [Integer] :limit (default to 20)
160
+ # @option opts [String] :starting_after
161
+ # @option opts [Boolean] :include_archived (default to false)
162
+ # @return [PdfDesignList]
163
+ def list_pdf_designs(opts = {})
164
+ data, _status_code, _headers = list_pdf_designs_with_http_info(opts)
165
+ data
166
+ end
167
+
168
+ # Los diseños del PDF de la empresa
169
+ # Los diseños del PDF de la empresa (los mismos de la app), del más nuevo al más viejo. Los archivados solo con &#x60;include_archived&#x3D;true&#x60;. Cualquier llave los lee: los diseños son de la empresa, no del ambiente.
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [Integer] :limit (default to 20)
172
+ # @option opts [String] :starting_after
173
+ # @option opts [Boolean] :include_archived (default to false)
174
+ # @return [Array<(PdfDesignList, Integer, Hash)>] PdfDesignList data, response status code and response headers
175
+ def list_pdf_designs_with_http_info(opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: PdfDesignsApi.list_pdf_designs ...'
178
+ end
179
+ # resource path
180
+ local_var_path = '/pdf_designs'
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
185
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
186
+ query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil?
187
+
188
+ # header parameters
189
+ header_params = opts[:header_params] || {}
190
+ # HTTP header 'Accept' (if needed)
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
192
+
193
+ # form parameters
194
+ form_params = opts[:form_params] || {}
195
+
196
+ # http body (model)
197
+ post_body = opts[:debug_body]
198
+
199
+ # return_type
200
+ return_type = opts[:debug_return_type] || 'PdfDesignList'
201
+
202
+ # auth_names
203
+ auth_names = opts[:debug_auth_names] || ['llave']
204
+
205
+ new_options = opts.merge(
206
+ :operation => :"PdfDesignsApi.list_pdf_designs",
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: PdfDesignsApi#list_pdf_designs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Un diseño del PDF
223
+ # @param id [String]
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [PdfDesign]
226
+ def retrieve_pdf_design(id, opts = {})
227
+ data, _status_code, _headers = retrieve_pdf_design_with_http_info(id, opts)
228
+ data
229
+ end
230
+
231
+ # Un diseño del PDF
232
+ # @param id [String]
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [Array<(PdfDesign, Integer, Hash)>] PdfDesign data, response status code and response headers
235
+ def retrieve_pdf_design_with_http_info(id, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: PdfDesignsApi.retrieve_pdf_design ...'
238
+ end
239
+ # verify the required parameter 'id' is set
240
+ if @api_client.config.client_side_validation && id.nil?
241
+ fail ArgumentError, "Missing the required parameter 'id' when calling PdfDesignsApi.retrieve_pdf_design"
242
+ end
243
+ # resource path
244
+ local_var_path = '/pdf_designs/{id}'.sub('{id}', CGI.escape(id.to_s))
245
+
246
+ # query parameters
247
+ query_params = opts[:query_params] || {}
248
+
249
+ # header parameters
250
+ header_params = opts[:header_params] || {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
253
+
254
+ # form parameters
255
+ form_params = opts[:form_params] || {}
256
+
257
+ # http body (model)
258
+ post_body = opts[:debug_body]
259
+
260
+ # return_type
261
+ return_type = opts[:debug_return_type] || 'PdfDesign'
262
+
263
+ # auth_names
264
+ auth_names = opts[:debug_auth_names] || ['llave']
265
+
266
+ new_options = opts.merge(
267
+ :operation => :"PdfDesignsApi.retrieve_pdf_design",
268
+ :header_params => header_params,
269
+ :query_params => query_params,
270
+ :form_params => form_params,
271
+ :body => post_body,
272
+ :auth_names => auth_names,
273
+ :return_type => return_type
274
+ )
275
+
276
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "API called: PdfDesignsApi#retrieve_pdf_design\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
279
+ end
280
+ return data, status_code, headers
281
+ end
282
+
283
+ # Cambiar un diseño del PDF
284
+ # Cambia el nombre (sin versión nueva) o el tema y el logo (una versión nueva, revisada como al crear). Los documentos ya emitidos no cambian: cada uno conserva la versión con que salió. Con `expected_version`, 409 `pdf_design_outdated` si alguien lo cambió antes. Repetir el mismo cambio no crea otra versión.
285
+ # @param id [String]
286
+ # @param pdf_design_update [PdfDesignUpdate]
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [PdfDesign]
289
+ def update_pdf_design(id, pdf_design_update, opts = {})
290
+ data, _status_code, _headers = update_pdf_design_with_http_info(id, pdf_design_update, opts)
291
+ data
292
+ end
293
+
294
+ # Cambiar un diseño del PDF
295
+ # Cambia el nombre (sin versión nueva) o el tema y el logo (una versión nueva, revisada como al crear). Los documentos ya emitidos no cambian: cada uno conserva la versión con que salió. Con &#x60;expected_version&#x60;, 409 &#x60;pdf_design_outdated&#x60; si alguien lo cambió antes. Repetir el mismo cambio no crea otra versión.
296
+ # @param id [String]
297
+ # @param pdf_design_update [PdfDesignUpdate]
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Array<(PdfDesign, Integer, Hash)>] PdfDesign data, response status code and response headers
300
+ def update_pdf_design_with_http_info(id, pdf_design_update, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: PdfDesignsApi.update_pdf_design ...'
303
+ end
304
+ # verify the required parameter 'id' is set
305
+ if @api_client.config.client_side_validation && id.nil?
306
+ fail ArgumentError, "Missing the required parameter 'id' when calling PdfDesignsApi.update_pdf_design"
307
+ end
308
+ # verify the required parameter 'pdf_design_update' is set
309
+ if @api_client.config.client_side_validation && pdf_design_update.nil?
310
+ fail ArgumentError, "Missing the required parameter 'pdf_design_update' when calling PdfDesignsApi.update_pdf_design"
311
+ end
312
+ # resource path
313
+ local_var_path = '/pdf_designs/{id}'.sub('{id}', CGI.escape(id.to_s))
314
+
315
+ # query parameters
316
+ query_params = opts[:query_params] || {}
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
322
+ # HTTP header 'Content-Type'
323
+ content_type = @api_client.select_header_content_type(['application/json'])
324
+ if !content_type.nil?
325
+ header_params['Content-Type'] = content_type
326
+ end
327
+
328
+ # form parameters
329
+ form_params = opts[:form_params] || {}
330
+
331
+ # http body (model)
332
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pdf_design_update)
333
+
334
+ # return_type
335
+ return_type = opts[:debug_return_type] || 'PdfDesign'
336
+
337
+ # auth_names
338
+ auth_names = opts[:debug_auth_names] || ['llave']
339
+
340
+ new_options = opts.merge(
341
+ :operation => :"PdfDesignsApi.update_pdf_design",
342
+ :header_params => header_params,
343
+ :query_params => query_params,
344
+ :form_params => form_params,
345
+ :body => post_body,
346
+ :auth_names => auth_names,
347
+ :return_type => return_type
348
+ )
349
+
350
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug "API called: PdfDesignsApi#update_pdf_design\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
+ end
354
+ return data, status_code, headers
355
+ end
356
+ end
357
+ end
@@ -0,0 +1,79 @@
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 'cgi'
14
+
15
+ module TrevolGenerado
16
+ class PdfTemplatesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Las plantillas del PDF
23
+ # Las plantillas de las que se crea un diseño del PDF, y el Clásico (el diseño básico de Trevol, que no se crea). Cada plantilla es de un formato: `letter` (carta, todos los documentos) o `receipt_80mm` / `receipt_57mm` (tirilla, solo el documento equivalente POS y su nota de ajuste).
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [PdfTemplateList]
26
+ def list_pdf_templates(opts = {})
27
+ data, _status_code, _headers = list_pdf_templates_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Las plantillas del PDF
32
+ # Las plantillas de las que se crea un diseño del PDF, y el Clásico (el diseño básico de Trevol, que no se crea). Cada plantilla es de un formato: &#x60;letter&#x60; (carta, todos los documentos) o &#x60;receipt_80mm&#x60; / &#x60;receipt_57mm&#x60; (tirilla, solo el documento equivalente POS y su nota de ajuste).
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(PdfTemplateList, Integer, Hash)>] PdfTemplateList data, response status code and response headers
35
+ def list_pdf_templates_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PdfTemplatesApi.list_pdf_templates ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/pdf_templates'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'PdfTemplateList'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['llave']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"PdfTemplatesApi.list_pdf_templates",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: PdfTemplatesApi#list_pdf_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
@@ -164,6 +164,8 @@ module TrevolGenerado
164
164
  # @option opts [String] :created_to
165
165
  # @option opts [String] :event_code
166
166
  # @option opts [String] :invoice_cufe
167
+ # @option opts [String] :number El número completo exacto del EVENTO, como sale en &#x60;number&#x60; (p. ej. &#x60;AR994000123&#x60;), no el de la factura (esa va con &#x60;invoice_cufe&#x60;).
168
+ # @option opts [String] :prefix El prefijo exacto del evento, como sale en &#x60;prefix&#x60; (&#x60;AR&#x60;, &#x60;RC&#x60;, &#x60;RB&#x60;, &#x60;AE&#x60; o &#x60;E0xx&#x60;). Para filtrar por tipo es mejor &#x60;event_code&#x60;.
167
169
  # @return [RadianEventList]
168
170
  def list_radian_events(opts = {})
169
171
  data, _status_code, _headers = list_radian_events_with_http_info(opts)
@@ -181,6 +183,8 @@ module TrevolGenerado
181
183
  # @option opts [String] :created_to
182
184
  # @option opts [String] :event_code
183
185
  # @option opts [String] :invoice_cufe
186
+ # @option opts [String] :number El número completo exacto del EVENTO, como sale en &#x60;number&#x60; (p. ej. &#x60;AR994000123&#x60;), no el de la factura (esa va con &#x60;invoice_cufe&#x60;).
187
+ # @option opts [String] :prefix El prefijo exacto del evento, como sale en &#x60;prefix&#x60; (&#x60;AR&#x60;, &#x60;RC&#x60;, &#x60;RB&#x60;, &#x60;AE&#x60; o &#x60;E0xx&#x60;). Para filtrar por tipo es mejor &#x60;event_code&#x60;.
184
188
  # @return [Array<(RadianEventList, Integer, Hash)>] RadianEventList data, response status code and response headers
185
189
  def list_radian_events_with_http_info(opts = {})
186
190
  if @api_client.config.debugging
@@ -203,6 +207,8 @@ module TrevolGenerado
203
207
  query_params[:'created_to'] = opts[:'created_to'] if !opts[:'created_to'].nil?
204
208
  query_params[:'event_code'] = opts[:'event_code'] if !opts[:'event_code'].nil?
205
209
  query_params[:'invoice_cufe'] = opts[:'invoice_cufe'] if !opts[:'invoice_cufe'].nil?
210
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
211
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
206
212
 
207
213
  # header parameters
208
214
  header_params = opts[:header_params] || {}
@@ -302,6 +302,8 @@ module TrevolGenerado
302
302
  # @option opts [String] :external_id
303
303
  # @option opts [String] :created_from
304
304
  # @option opts [String] :created_to
305
+ # @option opts [String] :number El número completo exacto, como sale en &#x60;number&#x60; (p. ej. &#x60;SETP990000123&#x60;; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
306
+ # @option opts [String] :prefix El prefijo exacto, como sale en &#x60;prefix&#x60;. Solo, lista una numeración; con &#x60;number&#x60;, quita la ambigüedad.
305
307
  # @return [SupportDocumentAdjustmentList]
306
308
  def list_support_document_adjustments(opts = {})
307
309
  data, _status_code, _headers = list_support_document_adjustments_with_http_info(opts)
@@ -317,6 +319,8 @@ module TrevolGenerado
317
319
  # @option opts [String] :external_id
318
320
  # @option opts [String] :created_from
319
321
  # @option opts [String] :created_to
322
+ # @option opts [String] :number El número completo exacto, como sale en &#x60;number&#x60; (p. ej. &#x60;SETP990000123&#x60;; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
323
+ # @option opts [String] :prefix El prefijo exacto, como sale en &#x60;prefix&#x60;. Solo, lista una numeración; con &#x60;number&#x60;, quita la ambigüedad.
320
324
  # @return [Array<(SupportDocumentAdjustmentList, Integer, Hash)>] SupportDocumentAdjustmentList data, response status code and response headers
321
325
  def list_support_document_adjustments_with_http_info(opts = {})
322
326
  if @api_client.config.debugging
@@ -333,6 +337,8 @@ module TrevolGenerado
333
337
  query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil?
334
338
  query_params[:'created_from'] = opts[:'created_from'] if !opts[:'created_from'].nil?
335
339
  query_params[:'created_to'] = opts[:'created_to'] if !opts[:'created_to'].nil?
340
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
341
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
336
342
 
337
343
  # header parameters
338
344
  header_params = opts[:header_params] || {}
@@ -302,6 +302,8 @@ module TrevolGenerado
302
302
  # @option opts [String] :external_id
303
303
  # @option opts [String] :created_from
304
304
  # @option opts [String] :created_to
305
+ # @option opts [String] :number El número completo exacto, como sale en &#x60;number&#x60; (p. ej. &#x60;SETP990000123&#x60;; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
306
+ # @option opts [String] :prefix El prefijo exacto, como sale en &#x60;prefix&#x60;. Solo, lista una numeración; con &#x60;number&#x60;, quita la ambigüedad.
305
307
  # @return [SupportDocumentList]
306
308
  def list_support_documents(opts = {})
307
309
  data, _status_code, _headers = list_support_documents_with_http_info(opts)
@@ -317,6 +319,8 @@ module TrevolGenerado
317
319
  # @option opts [String] :external_id
318
320
  # @option opts [String] :created_from
319
321
  # @option opts [String] :created_to
322
+ # @option opts [String] :number El número completo exacto, como sale en &#x60;number&#x60; (p. ej. &#x60;SETP990000123&#x60;; sin prefijo, solo el consecutivo), sin ceros a la izquierda, espacios ni guiones. Puede traer más de un documento.
323
+ # @option opts [String] :prefix El prefijo exacto, como sale en &#x60;prefix&#x60;. Solo, lista una numeración; con &#x60;number&#x60;, quita la ambigüedad.
320
324
  # @return [Array<(SupportDocumentList, Integer, Hash)>] SupportDocumentList data, response status code and response headers
321
325
  def list_support_documents_with_http_info(opts = {})
322
326
  if @api_client.config.debugging
@@ -333,6 +337,8 @@ module TrevolGenerado
333
337
  query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil?
334
338
  query_params[:'created_from'] = opts[:'created_from'] if !opts[:'created_from'].nil?
335
339
  query_params[:'created_to'] = opts[:'created_to'] if !opts[:'created_to'].nil?
340
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
341
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
336
342
 
337
343
  # header parameters
338
344
  header_params = opts[:header_params] || {}
@@ -21,6 +21,9 @@ module TrevolGenerado
21
21
  # Valores conocidos: `company`.
22
22
  attr_accessor :object
23
23
 
24
+ # 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. En la empresa de `/v1/account/companies`: solo la ve una llave de administración de pruebas (`tva_test_…`); para una de producción no existe.
25
+ attr_accessor :simulated
26
+
24
27
  # El NIT, sin DV.
25
28
  attr_accessor :nit
26
29
 
@@ -58,6 +61,7 @@ module TrevolGenerado
58
61
  {
59
62
  :'id' => :'id',
60
63
  :'object' => :'object',
64
+ :'simulated' => :'simulated',
61
65
  :'nit' => :'nit',
62
66
  :'check_digit' => :'check_digit',
63
67
  :'name' => :'name',
@@ -87,6 +91,7 @@ module TrevolGenerado
87
91
  {
88
92
  :'id' => :'String',
89
93
  :'object' => :'String',
94
+ :'simulated' => :'Boolean',
90
95
  :'nit' => :'String',
91
96
  :'check_digit' => :'String',
92
97
  :'name' => :'String',
@@ -146,6 +151,10 @@ module TrevolGenerado
146
151
  self.object = attributes[:'object']
147
152
  end
148
153
 
154
+ if attributes.key?(:'simulated')
155
+ self.simulated = attributes[:'simulated']
156
+ end
157
+
149
158
  if attributes.key?(:'nit')
150
159
  self.nit = attributes[:'nit']
151
160
  end
@@ -213,6 +222,7 @@ module TrevolGenerado
213
222
  self.class == o.class &&
214
223
  id == o.id &&
215
224
  object == o.object &&
225
+ simulated == o.simulated &&
216
226
  nit == o.nit &&
217
227
  check_digit == o.check_digit &&
218
228
  name == o.name &&
@@ -235,7 +245,7 @@ module TrevolGenerado
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [id, object, nit, check_digit, name, trade_name, status, onboarding, emission_environment, created_at, enabled_at, onboarding_url, api_keys].hash
248
+ [id, object, simulated, nit, check_digit, name, trade_name, status, onboarding, emission_environment, created_at, enabled_at, onboarding_url, api_keys].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash