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,297 @@
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 PdfDesign < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ # Valores conocidos: `pdf_design`.
21
+ attr_accessor :object
22
+
23
+ attr_accessor :name
24
+
25
+ # `letter` (carta: todos los documentos), `receipt_80mm` o `receipt_57mm` (tirilla: solo el documento equivalente POS y su nota de ajuste). Valores conocidos: `letter`, `receipt_80mm`, `receipt_57mm`.
26
+ attr_accessor :format
27
+
28
+ # La plantilla de la que salió (null: hecho en la app).
29
+ attr_accessor :template
30
+
31
+ # La versión actual. Cada cambio de tema o logo crea una nueva.
32
+ attr_accessor :version
33
+
34
+ # Si es el predeterminado de su formato (carta o tirilla).
35
+ attr_accessor :default
36
+
37
+ # Si es el predeterminado o una numeración lo usa (no se archiva).
38
+ attr_accessor :in_use
39
+
40
+ # El color de acento, #rrggbb, con contraste de 4,5:1 como mínimo sobre blanco.
41
+ attr_accessor :accent_color
42
+
43
+ # Valores conocidos: `helvetica`, `inter`.
44
+ attr_accessor :font
45
+
46
+ # Si lleva un logo.
47
+ attr_accessor :logo
48
+
49
+ attr_accessor :archived
50
+
51
+ attr_accessor :archived_at
52
+
53
+ attr_accessor :created_at
54
+
55
+ attr_accessor :updated_at
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'id' => :'id',
61
+ :'object' => :'object',
62
+ :'name' => :'name',
63
+ :'format' => :'format',
64
+ :'template' => :'template',
65
+ :'version' => :'version',
66
+ :'default' => :'default',
67
+ :'in_use' => :'in_use',
68
+ :'accent_color' => :'accent_color',
69
+ :'font' => :'font',
70
+ :'logo' => :'logo',
71
+ :'archived' => :'archived',
72
+ :'archived_at' => :'archived_at',
73
+ :'created_at' => :'created_at',
74
+ :'updated_at' => :'updated_at'
75
+ }
76
+ end
77
+
78
+ # Returns attribute mapping this model knows about
79
+ def self.acceptable_attribute_map
80
+ attribute_map
81
+ end
82
+
83
+ # Returns all the JSON keys this model knows about
84
+ def self.acceptable_attributes
85
+ acceptable_attribute_map.values
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.openapi_types
90
+ {
91
+ :'id' => :'String',
92
+ :'object' => :'String',
93
+ :'name' => :'String',
94
+ :'format' => :'String',
95
+ :'template' => :'String',
96
+ :'version' => :'Integer',
97
+ :'default' => :'Boolean',
98
+ :'in_use' => :'Boolean',
99
+ :'accent_color' => :'String',
100
+ :'font' => :'String',
101
+ :'logo' => :'Boolean',
102
+ :'archived' => :'Boolean',
103
+ :'archived_at' => :'Time',
104
+ :'created_at' => :'Time',
105
+ :'updated_at' => :'Time'
106
+ }
107
+ end
108
+
109
+ # List of attributes with nullable: true
110
+ def self.openapi_nullable
111
+ Set.new([
112
+ :'template',
113
+ :'archived_at',
114
+ ])
115
+ end
116
+
117
+ # Returns attribute type mapping
118
+ def self.acceptable_openapi_types
119
+ openapi_types
120
+ end
121
+
122
+ # Returns the nullable attributes
123
+ def self.acceptable_openapi_nullable
124
+ openapi_nullable
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::PdfDesign` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ acceptable_attribute_map = self.class.acceptable_attribute_map
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!acceptable_attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::PdfDesign`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'id')
144
+ self.id = attributes[:'id']
145
+ end
146
+
147
+ if attributes.key?(:'object')
148
+ self.object = attributes[:'object']
149
+ end
150
+
151
+ if attributes.key?(:'name')
152
+ self.name = attributes[:'name']
153
+ end
154
+
155
+ if attributes.key?(:'format')
156
+ self.format = attributes[:'format']
157
+ end
158
+
159
+ if attributes.key?(:'template')
160
+ self.template = attributes[:'template']
161
+ end
162
+
163
+ if attributes.key?(:'version')
164
+ self.version = attributes[:'version']
165
+ end
166
+
167
+ if attributes.key?(:'default')
168
+ self.default = attributes[:'default']
169
+ end
170
+
171
+ if attributes.key?(:'in_use')
172
+ self.in_use = attributes[:'in_use']
173
+ end
174
+
175
+ if attributes.key?(:'accent_color')
176
+ self.accent_color = attributes[:'accent_color']
177
+ end
178
+
179
+ if attributes.key?(:'font')
180
+ self.font = attributes[:'font']
181
+ end
182
+
183
+ if attributes.key?(:'logo')
184
+ self.logo = attributes[:'logo']
185
+ end
186
+
187
+ if attributes.key?(:'archived')
188
+ self.archived = attributes[:'archived']
189
+ end
190
+
191
+ if attributes.key?(:'archived_at')
192
+ self.archived_at = attributes[:'archived_at']
193
+ end
194
+
195
+ if attributes.key?(:'created_at')
196
+ self.created_at = attributes[:'created_at']
197
+ end
198
+
199
+ if attributes.key?(:'updated_at')
200
+ self.updated_at = attributes[:'updated_at']
201
+ end
202
+ end
203
+
204
+ # Show invalid properties with the reasons. Usually used together with valid?
205
+ # @return Array for valid properties with the reasons
206
+ def list_invalid_properties
207
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
208
+ invalid_properties = Array.new
209
+ invalid_properties
210
+ end
211
+
212
+ # Check to see if the all the properties in the model are valid
213
+ # @return true if the model is valid
214
+ def valid?
215
+ warn '[DEPRECATED] the `valid?` method is obsolete'
216
+ true
217
+ end
218
+
219
+ # Checks equality by comparing each attribute.
220
+ # @param [Object] Object to be compared
221
+ def ==(o)
222
+ return true if self.equal?(o)
223
+ self.class == o.class &&
224
+ id == o.id &&
225
+ object == o.object &&
226
+ name == o.name &&
227
+ format == o.format &&
228
+ template == o.template &&
229
+ version == o.version &&
230
+ default == o.default &&
231
+ in_use == o.in_use &&
232
+ accent_color == o.accent_color &&
233
+ font == o.font &&
234
+ logo == o.logo &&
235
+ archived == o.archived &&
236
+ archived_at == o.archived_at &&
237
+ created_at == o.created_at &&
238
+ updated_at == o.updated_at
239
+ end
240
+
241
+ # @see the `==` method
242
+ # @param [Object] Object to be compared
243
+ def eql?(o)
244
+ self == o
245
+ end
246
+
247
+ # Calculates hash code according to all attributes.
248
+ # @return [Integer] Hash code
249
+ def hash
250
+ [id, object, name, format, template, version, default, in_use, accent_color, font, logo, archived, archived_at, created_at, updated_at].hash
251
+ end
252
+
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def self.build_from_hash(attributes)
257
+ return nil unless attributes.is_a?(Hash)
258
+ attributes = attributes.transform_keys(&:to_sym)
259
+ # include attributes inherited from allOf parents (the nearest declaration wins)
260
+ map = acceptable_attribute_map
261
+ transformed_hash = {}
262
+ acceptable_openapi_types.each_pair do |key, type|
263
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
264
+ transformed_hash["#{key}"] = nil
265
+ elsif type =~ /\AArray<(.*)>/i
266
+ # check to ensure the input is an array given that the attribute
267
+ # is documented as an array but the input is not
268
+ if attributes[map[key]].is_a?(Array)
269
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
270
+ end
271
+ elsif !attributes[map[key]].nil?
272
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
273
+ end
274
+ end
275
+ new(transformed_hash)
276
+ end
277
+
278
+ # Returns the object in the form of hash
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_hash
281
+ hash = {}
282
+ # include attributes inherited from allOf parents (the nearest declaration wins)
283
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
284
+ value = self.send(attr)
285
+ if value.nil?
286
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
287
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
288
+ end
289
+
290
+ hash[param] = _to_hash(value)
291
+ end
292
+ hash
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -0,0 +1,193 @@
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
+ # El diseño fijado al emitir; null mientras está pendiente.
18
+ class PdfDesignApplied < ApiModelBase
19
+ # `pdd_…` o `classic`.
20
+ attr_accessor :id
21
+
22
+ attr_accessor :version
23
+
24
+ # Si salió con el `pdf_design_id` pedido.
25
+ attr_accessor :requested_applied
26
+
27
+ attr_accessor :fallback_to_classic
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'id' => :'id',
33
+ :'version' => :'version',
34
+ :'requested_applied' => :'requested_applied',
35
+ :'fallback_to_classic' => :'fallback_to_classic'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'id' => :'String',
53
+ :'version' => :'Integer',
54
+ :'requested_applied' => :'Boolean',
55
+ :'fallback_to_classic' => :'Boolean'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ :'id',
63
+ :'version',
64
+ :'requested_applied',
65
+ ])
66
+ end
67
+
68
+ # Returns attribute type mapping
69
+ def self.acceptable_openapi_types
70
+ openapi_types
71
+ end
72
+
73
+ # Returns the nullable attributes
74
+ def self.acceptable_openapi_nullable
75
+ openapi_nullable
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::PdfDesignApplied` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::PdfDesignApplied`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ end
97
+
98
+ if attributes.key?(:'version')
99
+ self.version = attributes[:'version']
100
+ end
101
+
102
+ if attributes.key?(:'requested_applied')
103
+ self.requested_applied = attributes[:'requested_applied']
104
+ end
105
+
106
+ if attributes.key?(:'fallback_to_classic')
107
+ self.fallback_to_classic = attributes[:'fallback_to_classic']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ id == o.id &&
132
+ version == o.version &&
133
+ requested_applied == o.requested_applied &&
134
+ fallback_to_classic == o.fallback_to_classic
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [id, version, requested_applied, fallback_to_classic].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ # include attributes inherited from allOf parents (the nearest declaration wins)
156
+ map = acceptable_attribute_map
157
+ transformed_hash = {}
158
+ acceptable_openapi_types.each_pair do |key, type|
159
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ # include attributes inherited from allOf parents (the nearest declaration wins)
179
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end