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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/GENERADO.md +1 -1
- data/README.md +1 -1
- data/lib/trevol/client.rb +6 -1
- data/lib/trevol/transporte.rb +1 -0
- data/lib/trevol_generado/api/account_api.rb +2 -2
- data/lib/trevol_generado/api/balance_api.rb +2 -2
- data/lib/trevol_generado/api/catalogs_api.rb +164 -0
- data/lib/trevol_generado/api/company_settings_api.rb +384 -0
- data/lib/trevol_generado/api/credit_notes_api.rb +79 -0
- data/lib/trevol_generado/api/debit_notes_api.rb +79 -0
- data/lib/trevol_generado/api/dian_documents_api.rb +8 -2
- data/lib/trevol_generado/api/dian_syncs_api.rb +2 -2
- data/lib/trevol_generado/api/equivalent_document_adjustments_api.rb +79 -0
- data/lib/trevol_generado/api/equivalent_documents_api.rb +79 -0
- data/lib/trevol_generado/api/invoices_api.rb +79 -0
- data/lib/trevol_generado/api/payroll_adjustments_api.rb +6 -0
- data/lib/trevol_generado/api/payrolls_api.rb +6 -0
- data/lib/trevol_generado/api/pdf_designs_api.rb +357 -0
- data/lib/trevol_generado/api/pdf_templates_api.rb +79 -0
- data/lib/trevol_generado/api/radian_events_api.rb +6 -0
- data/lib/trevol_generado/api/support_document_adjustments_api.rb +6 -0
- data/lib/trevol_generado/api/support_documents_api.rb +6 -0
- data/lib/trevol_generado/models/account_api_key_input.rb +1 -1
- data/lib/trevol_generado/models/account_company.rb +11 -1
- data/lib/trevol_generado/models/account_company_onboarding.rb +1 -1
- data/lib/trevol_generado/models/balance.rb +2 -2
- data/lib/trevol_generado/models/balance_operation_prices.rb +1 -1
- data/lib/trevol_generado/models/code_list.rb +245 -0
- data/lib/trevol_generado/models/code_list_entry.rb +353 -0
- data/lib/trevol_generado/models/code_list_entry_list.rb +191 -0
- data/lib/trevol_generado/models/code_list_list.rb +191 -0
- data/lib/trevol_generado/models/code_list_rates.rb +174 -0
- data/lib/trevol_generado/models/company.rb +11 -1
- data/lib/trevol_generado/models/company_logo.rb +217 -0
- data/lib/trevol_generado/models/company_logo_deleted.rb +170 -0
- data/lib/trevol_generado/models/company_logo_input.rb +178 -0
- data/lib/trevol_generado/models/delivery.rb +16 -5
- data/lib/trevol_generado/models/delivery_email_resends.rb +171 -0
- data/lib/trevol_generado/models/document.rb +37 -5
- data/lib/trevol_generado/models/document_totals_item.rb +1 -0
- data/lib/trevol_generado/models/email_resend.rb +256 -0
- data/lib/trevol_generado/models/email_resend_delivery.rb +183 -0
- data/lib/trevol_generado/models/email_resend_request.rb +163 -0
- data/lib/trevol_generado/models/email_resend_summary.rb +256 -0
- data/lib/trevol_generado/models/equivalent_document.rb +27 -5
- data/lib/trevol_generado/models/equivalent_document_adjustment.rb +26 -4
- data/lib/trevol_generado/models/equivalent_document_adjustment_input.rb +15 -4
- data/lib/trevol_generado/models/equivalent_document_input.rb +15 -4
- data/lib/trevol_generado/models/event.rb +12 -2
- data/lib/trevol_generado/models/invoice_batch.rb +11 -1
- data/lib/trevol_generado/models/invoice_batch_invoice_input.rb +24 -5
- data/lib/trevol_generado/models/invoice_input.rb +24 -4
- data/lib/trevol_generado/models/note_input.rb +15 -4
- data/lib/trevol_generado/models/numbering.rb +1 -1
- data/lib/trevol_generado/models/pdf_design.rb +297 -0
- data/lib/trevol_generado/models/pdf_design_applied.rb +193 -0
- data/lib/trevol_generado/models/pdf_design_input.rb +277 -0
- data/lib/trevol_generado/models/pdf_design_list.rb +191 -0
- data/lib/trevol_generado/models/pdf_design_update.rb +246 -0
- data/lib/trevol_generado/models/pdf_settings.rb +202 -0
- data/lib/trevol_generado/models/pdf_settings_update.rb +170 -0
- data/lib/trevol_generado/models/pdf_template.rb +210 -0
- data/lib/trevol_generado/models/pdf_template_list.rb +191 -0
- data/lib/trevol_generado/models/preview.rb +11 -1
- data/lib/trevol_generado/models/preview_numbering.rb +161 -0
- data/lib/trevol_generado/models/problem.rb +26 -4
- data/lib/trevol_generado/models/problem_finding.rb +172 -0
- data/lib/trevol_generado/models/support_document.rb +11 -1
- data/lib/trevol_generado/models/support_document_adjustment.rb +11 -1
- data/lib/trevol_generado/models/webhook_endpoint.rb +13 -3
- data/lib/trevol_generado/models/webhook_endpoint_input.rb +15 -5
- data/lib/trevol_generado/models/webhook_endpoint_update.rb +12 -2
- data/lib/trevol_generado/tablas.rb +30 -1
- data/lib/trevol_generado/version.rb +1 -1
- data/lib/trevol_generado.rb +28 -0
- 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 PdfTemplateList < 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<PdfTemplate>',
|
|
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::PdfTemplateList` 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::PdfTemplateList`. 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
|
|
@@ -25,6 +25,9 @@ module TrevolGenerado
|
|
|
25
25
|
# Valores conocidos: `test`, `live`.
|
|
26
26
|
attr_accessor :environment
|
|
27
27
|
|
|
28
|
+
# Solo en la factura que pide `numbering`: la numeración que la numeraría (el prefijo normalizado), ya comprobada. No reserva número.
|
|
29
|
+
attr_accessor :numbering
|
|
30
|
+
|
|
28
31
|
# Los totales calculados: la misma forma que `totals` del documento (en nómina, devengados, deducciones y total del comprobante).
|
|
29
32
|
attr_accessor :totals
|
|
30
33
|
|
|
@@ -34,6 +37,7 @@ module TrevolGenerado
|
|
|
34
37
|
:'object' => :'object',
|
|
35
38
|
:'document' => :'document',
|
|
36
39
|
:'environment' => :'environment',
|
|
40
|
+
:'numbering' => :'numbering',
|
|
37
41
|
:'totals' => :'totals'
|
|
38
42
|
}
|
|
39
43
|
end
|
|
@@ -54,6 +58,7 @@ module TrevolGenerado
|
|
|
54
58
|
:'object' => :'String',
|
|
55
59
|
:'document' => :'String',
|
|
56
60
|
:'environment' => :'String',
|
|
61
|
+
:'numbering' => :'PreviewNumbering',
|
|
57
62
|
:'totals' => :'Hash<String, Object>'
|
|
58
63
|
}
|
|
59
64
|
end
|
|
@@ -103,6 +108,10 @@ module TrevolGenerado
|
|
|
103
108
|
self.environment = attributes[:'environment']
|
|
104
109
|
end
|
|
105
110
|
|
|
111
|
+
if attributes.key?(:'numbering')
|
|
112
|
+
self.numbering = attributes[:'numbering']
|
|
113
|
+
end
|
|
114
|
+
|
|
106
115
|
if attributes.key?(:'totals')
|
|
107
116
|
if (value = attributes[:'totals']).is_a?(Hash)
|
|
108
117
|
self.totals = value
|
|
@@ -133,6 +142,7 @@ module TrevolGenerado
|
|
|
133
142
|
object == o.object &&
|
|
134
143
|
document == o.document &&
|
|
135
144
|
environment == o.environment &&
|
|
145
|
+
numbering == o.numbering &&
|
|
136
146
|
totals == o.totals
|
|
137
147
|
end
|
|
138
148
|
|
|
@@ -145,7 +155,7 @@ module TrevolGenerado
|
|
|
145
155
|
# Calculates hash code according to all attributes.
|
|
146
156
|
# @return [Integer] Hash code
|
|
147
157
|
def hash
|
|
148
|
-
[object, document, environment, totals].hash
|
|
158
|
+
[object, document, environment, numbering, totals].hash
|
|
149
159
|
end
|
|
150
160
|
|
|
151
161
|
# Builds the object from hash
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
# Solo en la factura que pide `numbering`: la numeración que la numeraría (el prefijo normalizado), ya comprobada. No reserva número.
|
|
18
|
+
class PreviewNumbering < ApiModelBase
|
|
19
|
+
attr_accessor :prefix
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'prefix' => :'prefix'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'prefix' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns attribute type mapping
|
|
52
|
+
def self.acceptable_openapi_types
|
|
53
|
+
openapi_types
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns the nullable attributes
|
|
57
|
+
def self.acceptable_openapi_nullable
|
|
58
|
+
openapi_nullable
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::PreviewNumbering` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::PreviewNumbering`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'prefix')
|
|
78
|
+
self.prefix = attributes[:'prefix']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
prefix == o.prefix
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[prefix].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
123
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
124
|
+
map = acceptable_attribute_map
|
|
125
|
+
transformed_hash = {}
|
|
126
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
127
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
128
|
+
transformed_hash["#{key}"] = nil
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
130
|
+
# check to ensure the input is an array given that the attribute
|
|
131
|
+
# is documented as an array but the input is not
|
|
132
|
+
if attributes[map[key]].is_a?(Array)
|
|
133
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
134
|
+
end
|
|
135
|
+
elsif !attributes[map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
new(transformed_hash)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns the object in the form of hash
|
|
143
|
+
# @return [Hash] Returns the object in the form of hash
|
|
144
|
+
def to_hash
|
|
145
|
+
hash = {}
|
|
146
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
147
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
148
|
+
value = self.send(attr)
|
|
149
|
+
if value.nil?
|
|
150
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
151
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
hash[param] = _to_hash(value)
|
|
155
|
+
end
|
|
156
|
+
hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
end
|
|
@@ -21,7 +21,7 @@ module TrevolGenerado
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :status
|
|
23
23
|
|
|
24
|
-
# Valores conocidos: `authentication_required`, `automatic_mode_unavailable`, `certificate_problem`, `company_busy`, `company_exists`, `company_limit_reached`, `company_not_enabled`, `confirmation_required`, `dian_rejected`, `dian_unavailable`, `duplicate_customer`, `duplicate_document`, `duplicate_product`, `external_id_in_use`, `file_unavailable`, `idempotency_key_required`, `idempotency_key_reused`, `insufficient_balance`, `internal_error`, `invalid_api_key`, `invalid_json`, `invalid_request`, `invalid_state`, `key_limit_reached`, `method_not_allowed`, `not_found`, `numbering_request_in_progress`, `numbering_unavailable`, `paper_numbering_limit_reached`, `permission_denied`, `portal_read_required`, `previous_event_pending`, `range_protected`, `rate_limited`, `report_too_large`, `request_in_progress`, `tacit_acceptance_not_due`, `top_up_above_maximum`, `top_up_below_minimum`, `top_ups_unavailable`, `unsupported_version`, `validation_error`, `webhook_limit_reached`.
|
|
24
|
+
# Valores conocidos: `authentication_required`, `automatic_mode_unavailable`, `certificate_problem`, `company_busy`, `company_exists`, `company_limit_reached`, `company_not_enabled`, `confirmation_required`, `dian_rejected`, `dian_unavailable`, `duplicate_customer`, `duplicate_document`, `duplicate_product`, `external_id_in_use`, `file_unavailable`, `idempotency_key_required`, `idempotency_key_reused`, `insufficient_balance`, `internal_error`, `invalid_api_key`, `invalid_json`, `invalid_request`, `invalid_state`, `key_limit_reached`, `logo_invalid`, `method_not_allowed`, `not_found`, `numbering_request_in_progress`, `numbering_unavailable`, `paper_numbering_limit_reached`, `pdf_design_archived`, `pdf_design_in_use`, `pdf_design_invalid`, `pdf_design_limit_reached`, `pdf_design_outdated`, `permission_denied`, `portal_read_required`, `previous_event_pending`, `range_protected`, `rate_limited`, `report_too_large`, `request_in_progress`, `tacit_acceptance_not_due`, `top_up_above_maximum`, `top_up_below_minimum`, `top_ups_unavailable`, `unsupported_version`, `validation_error`, `webhook_limit_reached`.
|
|
25
25
|
attr_accessor :code
|
|
26
26
|
|
|
27
27
|
attr_accessor :detail
|
|
@@ -39,7 +39,7 @@ module TrevolGenerado
|
|
|
39
39
|
# En `external_id_in_use` y `duplicate_document`: el id (con el prefijo de su clase) del recurso que ya existe. En `numbering_request_in_progress`: la solicitud en curso (`nreq_…`). En `duplicate_customer` y `duplicate_product`: el `cus_…` o `prod_…` que ya existe. No viene en un `duplicate_customer` por `document_number` pedido con una llave sin `customers:read` (diría de quién es ese documento).
|
|
40
40
|
attr_accessor :existing_id
|
|
41
41
|
|
|
42
|
-
# En `company_not_enabled` (`missing_legal_representative`, `missing_pin`, `missing_software`, `payroll_not_enabled`)
|
|
42
|
+
# En `company_not_enabled` (`missing_legal_representative`, `missing_pin`, `missing_software`, `payroll_not_enabled`), en `numbering_unavailable` (`missing_technical_key`, `no_contingency_numbering`, `no_resolution`, `prefix_in_use`, `resolution_exhausted`, `resolution_expired`, `resolution_not_yet_valid`) y en `invalid_state` al reenviar el correo (`delivery_incomplete`, `delivery_pending`, `email_suppressed`, `no_recipient`, `not_accepted`): por qué. En `automatic_mode_unavailable` (`credentials_missing`, `mandate_required`: falta el mandato para integraciones que se acepta en la app, `disabled`) y en `permission_denied` de una ruta que solo existe en producción (`live_mode_required`). En `permission_denied` de una llave de administración: `environment_mismatch` (`Trevol-Environment` no es el ambiente de la llave), `live_mode_required` (el alta de empresas pide una llave de producción) y `scope_list` (una llave con alcance de lista no da de alta empresas; como esa llave no puede tener `companies:write`, lo que llega en la práctica es el 403 con `required_permission: companies:write`). En `logo_invalid` (`animated`, `empty`, `svg_not_supported`, `too_large`, `too_many_pixels`, `too_small`, `unreadable`, `unsupported_format`) y en `permission_denied` del diseño del PDF (`pdf_design_writes_disabled`: el titular no permitió en la app que la API lo cambie). En `permission_denied` de una llave de la empresa simulada: `simulated_not_supported` (eso no existe en el entorno simulado: el adquiriente en la DIAN, RADIAN, el saldo y las recargas, el XML de un documento de la DIAN, el reenvío del correo, el documento equivalente y la nómina; o el entorno simulado está apagado). Valores conocidos: `animated`, `credentials_missing`, `delivery_incomplete`, `delivery_pending`, `disabled`, `email_suppressed`, `empty`, `environment_mismatch`, `live_mode_required`, `mandate_required`, `missing_legal_representative`, `missing_pin`, `missing_software`, `missing_technical_key`, `no_contingency_numbering`, `no_recipient`, `no_resolution`, `not_accepted`, `payroll_not_enabled`, `pdf_design_writes_disabled`, `prefix_in_use`, `resolution_exhausted`, `resolution_expired`, `resolution_not_yet_valid`, `scope_list`, `simulated_not_supported`, `svg_not_supported`, `too_large`, `too_many_pixels`, `too_small`, `unreadable`, `unsupported_format`.
|
|
43
43
|
attr_accessor :reason
|
|
44
44
|
|
|
45
45
|
# En `previous_event_pending`: el evento que la DIAN todavía no muestra.
|
|
@@ -57,7 +57,7 @@ module TrevolGenerado
|
|
|
57
57
|
# En `insufficient_balance` de una operación cobrada: lo que cuesta la operación, en pesos.
|
|
58
58
|
attr_accessor :price_cop
|
|
59
59
|
|
|
60
|
-
# En `rate_limited`: qué límite se
|
|
60
|
+
# En `rate_limited`: qué límite se pasó (`email_resend`: los reenvíos del correo de un documento o de la empresa en el día; `pdf_design`: los cambios de diseño del PDF o del logo seguidos, que no son la ventana de las cabeceras RateLimit). Con una llave de administración: `lecturas` (600 peticiones por minuto de la llave en `/v1/account`), `account_key` (el mismo contador, visto desde una ruta de empresa), `api_keys` (60 llaves de empresa creadas o revocadas por hora) y `account_queries` (60 consultas de documentos o eventos por minuto, sumando las llaves de la cuenta). En `company_limit_reached`: `hour` (20 altas por hora) o `day` (100 por día). `simulated`: un tope del entorno simulado (las peticiones por minuto de tu empresa simulada, sumando sus llaves; las de todas las cuentas en unos segundos o los envíos por hora; o demasiados documentos o webhooks por procesar en tu empresa simulada o en todo el entorno).
|
|
61
61
|
attr_accessor :limit
|
|
62
62
|
|
|
63
63
|
# En `tacit_acceptance_not_due`: desde cuándo procede la aceptación tácita. `null` si la DIAN todavía no muestra el recibo del bien (032) de la compradora: consulta de nuevo en unos minutos con `GET /v1/invoices/{id}/tacit_acceptance`.
|
|
@@ -78,6 +78,12 @@ module TrevolGenerado
|
|
|
78
78
|
# En `company_exists`: la empresa que ya está en la cuenta con ese NIT.
|
|
79
79
|
attr_accessor :company
|
|
80
80
|
|
|
81
|
+
# En `pdf_design_invalid`: qué no cabe y en qué tipos de documento.
|
|
82
|
+
attr_accessor :findings
|
|
83
|
+
|
|
84
|
+
# En `pdf_design_outdated`: la versión actual del diseño.
|
|
85
|
+
attr_accessor :current_version
|
|
86
|
+
|
|
81
87
|
# En `report_too_large`: cuántos documentos tiene lo pedido.
|
|
82
88
|
attr_accessor :rows
|
|
83
89
|
|
|
@@ -111,6 +117,8 @@ module TrevolGenerado
|
|
|
111
117
|
:'existing_active' => :'existing_active',
|
|
112
118
|
:'required_permission' => :'required_permission',
|
|
113
119
|
:'company' => :'company',
|
|
120
|
+
:'findings' => :'findings',
|
|
121
|
+
:'current_version' => :'current_version',
|
|
114
122
|
:'rows' => :'rows',
|
|
115
123
|
:'max_rows' => :'max_rows'
|
|
116
124
|
}
|
|
@@ -153,6 +161,8 @@ module TrevolGenerado
|
|
|
153
161
|
:'existing_active' => :'Boolean',
|
|
154
162
|
:'required_permission' => :'String',
|
|
155
163
|
:'company' => :'AccountCompany',
|
|
164
|
+
:'findings' => :'Array<ProblemFinding>',
|
|
165
|
+
:'current_version' => :'Integer',
|
|
156
166
|
:'rows' => :'Integer',
|
|
157
167
|
:'max_rows' => :'Integer'
|
|
158
168
|
}
|
|
@@ -293,6 +303,16 @@ module TrevolGenerado
|
|
|
293
303
|
self.company = attributes[:'company']
|
|
294
304
|
end
|
|
295
305
|
|
|
306
|
+
if attributes.key?(:'findings')
|
|
307
|
+
if (value = attributes[:'findings']).is_a?(Array)
|
|
308
|
+
self.findings = value
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'current_version')
|
|
313
|
+
self.current_version = attributes[:'current_version']
|
|
314
|
+
end
|
|
315
|
+
|
|
296
316
|
if attributes.key?(:'rows')
|
|
297
317
|
self.rows = attributes[:'rows']
|
|
298
318
|
end
|
|
@@ -346,6 +366,8 @@ module TrevolGenerado
|
|
|
346
366
|
existing_active == o.existing_active &&
|
|
347
367
|
required_permission == o.required_permission &&
|
|
348
368
|
company == o.company &&
|
|
369
|
+
findings == o.findings &&
|
|
370
|
+
current_version == o.current_version &&
|
|
349
371
|
rows == o.rows &&
|
|
350
372
|
max_rows == o.max_rows
|
|
351
373
|
end
|
|
@@ -359,7 +381,7 @@ module TrevolGenerado
|
|
|
359
381
|
# Calculates hash code according to all attributes.
|
|
360
382
|
# @return [Integer] Hash code
|
|
361
383
|
def hash
|
|
362
|
-
[type, title, status, code, detail, retryable, retry_after, request_id, errors, document, existing_id, reason, previous, minimum_cop, maximum_cop, balance_cop, price_cop, limit, available_from, rules, current_software, existing_active, required_permission, company, rows, max_rows].hash
|
|
384
|
+
[type, title, status, code, detail, retryable, retry_after, request_id, errors, document, existing_id, reason, previous, minimum_cop, maximum_cop, balance_cop, price_cop, limit, available_from, rules, current_software, existing_active, required_permission, company, findings, current_version, rows, max_rows].hash
|
|
363
385
|
end
|
|
364
386
|
|
|
365
387
|
# Builds the object from hash
|
|
@@ -0,0 +1,172 @@
|
|
|
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 ProblemFinding < ApiModelBase
|
|
18
|
+
# Valores conocidos: `header_too_tall`, `cannot_render`, `invalid_design`.
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
attr_accessor :document_types
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'code' => :'code',
|
|
27
|
+
:'document_types' => :'document_types'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'code' => :'String',
|
|
45
|
+
:'document_types' => :'Array<String>'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute type mapping
|
|
56
|
+
def self.acceptable_openapi_types
|
|
57
|
+
openapi_types
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns the nullable attributes
|
|
61
|
+
def self.acceptable_openapi_nullable
|
|
62
|
+
openapi_nullable
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::ProblemFinding` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::ProblemFinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'code')
|
|
82
|
+
self.code = attributes[:'code']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'document_types')
|
|
86
|
+
if (value = attributes[:'document_types']).is_a?(Array)
|
|
87
|
+
self.document_types = value
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
93
|
+
# @return Array for valid properties with the reasons
|
|
94
|
+
def list_invalid_properties
|
|
95
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
96
|
+
invalid_properties = Array.new
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
104
|
+
true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
code == o.code &&
|
|
113
|
+
document_types == o.document_types
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# @see the `==` method
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def eql?(o)
|
|
119
|
+
self == o
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Calculates hash code according to all attributes.
|
|
123
|
+
# @return [Integer] Hash code
|
|
124
|
+
def hash
|
|
125
|
+
[code, document_types].hash
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Builds the object from hash
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
# @return [Object] Returns the model itself
|
|
131
|
+
def self.build_from_hash(attributes)
|
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
|
133
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
134
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
135
|
+
map = acceptable_attribute_map
|
|
136
|
+
transformed_hash = {}
|
|
137
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
138
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
139
|
+
transformed_hash["#{key}"] = nil
|
|
140
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
141
|
+
# check to ensure the input is an array given that the attribute
|
|
142
|
+
# is documented as an array but the input is not
|
|
143
|
+
if attributes[map[key]].is_a?(Array)
|
|
144
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
145
|
+
end
|
|
146
|
+
elsif !attributes[map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
new(transformed_hash)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Returns the object in the form of hash
|
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
|
155
|
+
def to_hash
|
|
156
|
+
hash = {}
|
|
157
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
158
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
159
|
+
value = self.send(attr)
|
|
160
|
+
if value.nil?
|
|
161
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
162
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
hash[param] = _to_hash(value)
|
|
166
|
+
end
|
|
167
|
+
hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|