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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -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/balance_api.rb +6 -6
- 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/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_company.rb +11 -1
- data/lib/trevol_generado/models/balance.rb +13 -2
- data/lib/trevol_generado/models/balance_key_owner.rb +162 -0
- 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 +11 -1
- 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 +27 -5
- 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 +12 -2
- data/lib/trevol_generado/models/webhook_endpoint_input.rb +14 -4
- data/lib/trevol_generado/models/webhook_endpoint_update.rb +11 -1
- data/lib/trevol_generado/tablas.rb +30 -1
- data/lib/trevol_generado/version.rb +1 -1
- data/lib/trevol_generado.rb +29 -0
- metadata +30 -1
|
@@ -0,0 +1,163 @@
|
|
|
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 EmailResendRequest < ApiModelBase
|
|
18
|
+
# Opcional. A quién reenviarlo en vez del comprador (1 a 3 direcciones en ASCII; un correo por destinatario; las repetidas, también si solo cambian mayúsculas, se juntan). Solo en producción y con el permiso `customers:read`.
|
|
19
|
+
attr_accessor :to
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'to' => :'to'
|
|
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
|
+
:'to' => :'Array<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::EmailResendRequest` 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::EmailResendRequest`. 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?(:'to')
|
|
78
|
+
if (value = attributes[:'to']).is_a?(Array)
|
|
79
|
+
self.to = value
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
88
|
+
invalid_properties = Array.new
|
|
89
|
+
invalid_properties
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Check to see if the all the properties in the model are valid
|
|
93
|
+
# @return true if the model is valid
|
|
94
|
+
def valid?
|
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
96
|
+
true
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Checks equality by comparing each attribute.
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def ==(o)
|
|
102
|
+
return true if self.equal?(o)
|
|
103
|
+
self.class == o.class &&
|
|
104
|
+
to == o.to
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[to].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
125
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
126
|
+
map = acceptable_attribute_map
|
|
127
|
+
transformed_hash = {}
|
|
128
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
129
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
130
|
+
transformed_hash["#{key}"] = nil
|
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
132
|
+
# check to ensure the input is an array given that the attribute
|
|
133
|
+
# is documented as an array but the input is not
|
|
134
|
+
if attributes[map[key]].is_a?(Array)
|
|
135
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
136
|
+
end
|
|
137
|
+
elsif !attributes[map[key]].nil?
|
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
new(transformed_hash)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Returns the object in the form of hash
|
|
145
|
+
# @return [Hash] Returns the object in the form of hash
|
|
146
|
+
def to_hash
|
|
147
|
+
hash = {}
|
|
148
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
149
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
150
|
+
value = self.send(attr)
|
|
151
|
+
if value.nil?
|
|
152
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
153
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
hash[param] = _to_hash(value)
|
|
157
|
+
end
|
|
158
|
+
hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
@@ -0,0 +1,256 @@
|
|
|
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 último reenvío, con el estado de cada destinatario al día: un rebote o una queja que llega después se ve aquí, en `deliveries[].status` (`bounced` / `complained`).
|
|
18
|
+
class EmailResendSummary < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Valores conocidos: `email_resend`.
|
|
22
|
+
attr_accessor :object
|
|
23
|
+
|
|
24
|
+
# El documento (inv_…, cn_…, dn_…, pos_…, posa_…).
|
|
25
|
+
attr_accessor :document_id
|
|
26
|
+
|
|
27
|
+
# Valores conocidos: `credit_note`, `debit_note`, `equivalent_document`, `equivalent_document_adjustment`, `invoice`.
|
|
28
|
+
attr_accessor :document_object
|
|
29
|
+
|
|
30
|
+
# `customer`: el correo del comprador; `custom`: las direcciones de `to`; `issuer`: quien emitió (habilitación). Valores conocidos: `custom`, `customer`, `issuer`.
|
|
31
|
+
attr_accessor :recipient
|
|
32
|
+
|
|
33
|
+
# Las direcciones, enmascaradas (`c***@dominio.co`). null sin el permiso `customers:read`.
|
|
34
|
+
attr_accessor :to
|
|
35
|
+
|
|
36
|
+
# `sent`: salió a todos; `partially_sent`: a algunos; `failed`: a ninguno; `unconfirmed`: el envío se interrumpió y no sabemos si salió (no se repite solo); `sending`: todavía se está enviando. Valores conocidos: `sending`, `sent`, `partially_sent`, `failed`, `unconfirmed`.
|
|
37
|
+
attr_accessor :status
|
|
38
|
+
|
|
39
|
+
attr_accessor :created_at
|
|
40
|
+
|
|
41
|
+
attr_accessor :completed_at
|
|
42
|
+
|
|
43
|
+
# Una por destinatario, en el orden de `to`.
|
|
44
|
+
attr_accessor :deliveries
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'id' => :'id',
|
|
50
|
+
:'object' => :'object',
|
|
51
|
+
:'document_id' => :'document_id',
|
|
52
|
+
:'document_object' => :'document_object',
|
|
53
|
+
:'recipient' => :'recipient',
|
|
54
|
+
:'to' => :'to',
|
|
55
|
+
:'status' => :'status',
|
|
56
|
+
:'created_at' => :'created_at',
|
|
57
|
+
:'completed_at' => :'completed_at',
|
|
58
|
+
:'deliveries' => :'deliveries'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute mapping this model knows about
|
|
63
|
+
def self.acceptable_attribute_map
|
|
64
|
+
attribute_map
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns all the JSON keys this model knows about
|
|
68
|
+
def self.acceptable_attributes
|
|
69
|
+
acceptable_attribute_map.values
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute type mapping.
|
|
73
|
+
def self.openapi_types
|
|
74
|
+
{
|
|
75
|
+
:'id' => :'String',
|
|
76
|
+
:'object' => :'String',
|
|
77
|
+
:'document_id' => :'String',
|
|
78
|
+
:'document_object' => :'String',
|
|
79
|
+
:'recipient' => :'String',
|
|
80
|
+
:'to' => :'Array<String>',
|
|
81
|
+
:'status' => :'String',
|
|
82
|
+
:'created_at' => :'Time',
|
|
83
|
+
:'completed_at' => :'Time',
|
|
84
|
+
:'deliveries' => :'Array<EmailResendDelivery>'
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# List of attributes with nullable: true
|
|
89
|
+
def self.openapi_nullable
|
|
90
|
+
Set.new([
|
|
91
|
+
:'to',
|
|
92
|
+
:'created_at',
|
|
93
|
+
:'completed_at',
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Returns attribute type mapping
|
|
98
|
+
def self.acceptable_openapi_types
|
|
99
|
+
openapi_types
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Returns the nullable attributes
|
|
103
|
+
def self.acceptable_openapi_nullable
|
|
104
|
+
openapi_nullable
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
def initialize(attributes = {})
|
|
110
|
+
if (!attributes.is_a?(Hash))
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::EmailResendSummary` initialize method"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::EmailResendSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
119
|
+
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'id')
|
|
124
|
+
self.id = attributes[:'id']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'object')
|
|
128
|
+
self.object = attributes[:'object']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'document_id')
|
|
132
|
+
self.document_id = attributes[:'document_id']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'document_object')
|
|
136
|
+
self.document_object = attributes[:'document_object']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'recipient')
|
|
140
|
+
self.recipient = attributes[:'recipient']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'to')
|
|
144
|
+
if (value = attributes[:'to']).is_a?(Array)
|
|
145
|
+
self.to = value
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'status')
|
|
150
|
+
self.status = attributes[:'status']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'created_at')
|
|
154
|
+
self.created_at = attributes[:'created_at']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'completed_at')
|
|
158
|
+
self.completed_at = attributes[:'completed_at']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'deliveries')
|
|
162
|
+
if (value = attributes[:'deliveries']).is_a?(Array)
|
|
163
|
+
self.deliveries = value
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
169
|
+
# @return Array for valid properties with the reasons
|
|
170
|
+
def list_invalid_properties
|
|
171
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
172
|
+
invalid_properties = Array.new
|
|
173
|
+
invalid_properties
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Check to see if the all the properties in the model are valid
|
|
177
|
+
# @return true if the model is valid
|
|
178
|
+
def valid?
|
|
179
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
180
|
+
true
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Checks equality by comparing each attribute.
|
|
184
|
+
# @param [Object] Object to be compared
|
|
185
|
+
def ==(o)
|
|
186
|
+
return true if self.equal?(o)
|
|
187
|
+
self.class == o.class &&
|
|
188
|
+
id == o.id &&
|
|
189
|
+
object == o.object &&
|
|
190
|
+
document_id == o.document_id &&
|
|
191
|
+
document_object == o.document_object &&
|
|
192
|
+
recipient == o.recipient &&
|
|
193
|
+
to == o.to &&
|
|
194
|
+
status == o.status &&
|
|
195
|
+
created_at == o.created_at &&
|
|
196
|
+
completed_at == o.completed_at &&
|
|
197
|
+
deliveries == o.deliveries
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# @see the `==` method
|
|
201
|
+
# @param [Object] Object to be compared
|
|
202
|
+
def eql?(o)
|
|
203
|
+
self == o
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Calculates hash code according to all attributes.
|
|
207
|
+
# @return [Integer] Hash code
|
|
208
|
+
def hash
|
|
209
|
+
[id, object, document_id, document_object, recipient, to, status, created_at, completed_at, deliveries].hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Builds the object from hash
|
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
214
|
+
# @return [Object] Returns the model itself
|
|
215
|
+
def self.build_from_hash(attributes)
|
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
|
217
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
218
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
219
|
+
map = acceptable_attribute_map
|
|
220
|
+
transformed_hash = {}
|
|
221
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
222
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
223
|
+
transformed_hash["#{key}"] = nil
|
|
224
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
225
|
+
# check to ensure the input is an array given that the attribute
|
|
226
|
+
# is documented as an array but the input is not
|
|
227
|
+
if attributes[map[key]].is_a?(Array)
|
|
228
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
229
|
+
end
|
|
230
|
+
elsif !attributes[map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
new(transformed_hash)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the object in the form of hash
|
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
|
239
|
+
def to_hash
|
|
240
|
+
hash = {}
|
|
241
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
242
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
243
|
+
value = self.send(attr)
|
|
244
|
+
if value.nil?
|
|
245
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
246
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
hash[param] = _to_hash(value)
|
|
250
|
+
end
|
|
251
|
+
hash
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
@@ -90,6 +90,12 @@ module TrevolGenerado
|
|
|
90
90
|
|
|
91
91
|
attr_accessor :contingency
|
|
92
92
|
|
|
93
|
+
# El que pidió el documento, o null.
|
|
94
|
+
attr_accessor :pdf_design_id
|
|
95
|
+
|
|
96
|
+
# El diseño fijado al emitir; null mientras está pendiente.
|
|
97
|
+
attr_accessor :pdf_design
|
|
98
|
+
|
|
93
99
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
94
100
|
def self.attribute_map
|
|
95
101
|
{
|
|
@@ -124,7 +130,9 @@ module TrevolGenerado
|
|
|
124
130
|
:'pos' => :'pos',
|
|
125
131
|
:'extension' => :'extension',
|
|
126
132
|
:'origin_note' => :'origin_note',
|
|
127
|
-
:'contingency' => :'contingency'
|
|
133
|
+
:'contingency' => :'contingency',
|
|
134
|
+
:'pdf_design_id' => :'pdf_design_id',
|
|
135
|
+
:'pdf_design' => :'pdf_design'
|
|
128
136
|
}
|
|
129
137
|
end
|
|
130
138
|
|
|
@@ -172,7 +180,9 @@ module TrevolGenerado
|
|
|
172
180
|
:'pos' => :'Pos',
|
|
173
181
|
:'extension' => :'Extension',
|
|
174
182
|
:'origin_note' => :'OriginNote',
|
|
175
|
-
:'contingency' => :'EquivalentDocumentContingency'
|
|
183
|
+
:'contingency' => :'EquivalentDocumentContingency',
|
|
184
|
+
:'pdf_design_id' => :'String',
|
|
185
|
+
:'pdf_design' => :'PdfDesignApplied'
|
|
176
186
|
}
|
|
177
187
|
end
|
|
178
188
|
|
|
@@ -188,7 +198,9 @@ module TrevolGenerado
|
|
|
188
198
|
:'totals',
|
|
189
199
|
:'updated_at',
|
|
190
200
|
:'rounding',
|
|
191
|
-
:'contingency'
|
|
201
|
+
:'contingency',
|
|
202
|
+
:'pdf_design_id',
|
|
203
|
+
:'pdf_design'
|
|
192
204
|
])
|
|
193
205
|
end
|
|
194
206
|
|
|
@@ -355,6 +367,14 @@ module TrevolGenerado
|
|
|
355
367
|
if attributes.key?(:'contingency')
|
|
356
368
|
self.contingency = attributes[:'contingency']
|
|
357
369
|
end
|
|
370
|
+
|
|
371
|
+
if attributes.key?(:'pdf_design_id')
|
|
372
|
+
self.pdf_design_id = attributes[:'pdf_design_id']
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
if attributes.key?(:'pdf_design')
|
|
376
|
+
self.pdf_design = attributes[:'pdf_design']
|
|
377
|
+
end
|
|
358
378
|
end
|
|
359
379
|
|
|
360
380
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -408,7 +428,9 @@ module TrevolGenerado
|
|
|
408
428
|
pos == o.pos &&
|
|
409
429
|
extension == o.extension &&
|
|
410
430
|
origin_note == o.origin_note &&
|
|
411
|
-
contingency == o.contingency
|
|
431
|
+
contingency == o.contingency &&
|
|
432
|
+
pdf_design_id == o.pdf_design_id &&
|
|
433
|
+
pdf_design == o.pdf_design
|
|
412
434
|
end
|
|
413
435
|
|
|
414
436
|
# @see the `==` method
|
|
@@ -420,7 +442,7 @@ module TrevolGenerado
|
|
|
420
442
|
# Calculates hash code according to all attributes.
|
|
421
443
|
# @return [Integer] Hash code
|
|
422
444
|
def hash
|
|
423
|
-
[id, object, environment, status, number, prefix, external_id, origin, cude, qr, issued_at, customer, items, payment, document_type, operation_type, totals, dian, delivery, created_at, updated_at, notes, period, references, allowance_charges, prepayments, rounding, withholdings, pos, extension, origin_note, contingency].hash
|
|
445
|
+
[id, object, environment, status, number, prefix, external_id, origin, cude, qr, issued_at, customer, items, payment, document_type, operation_type, totals, dian, delivery, created_at, updated_at, notes, period, references, allowance_charges, prepayments, rounding, withholdings, pos, extension, origin_note, contingency, pdf_design_id, pdf_design].hash
|
|
424
446
|
end
|
|
425
447
|
|
|
426
448
|
# Builds the object from hash
|
|
@@ -84,6 +84,12 @@ module TrevolGenerado
|
|
|
84
84
|
|
|
85
85
|
attr_accessor :equivalent_document
|
|
86
86
|
|
|
87
|
+
# El que pidió el documento, o null.
|
|
88
|
+
attr_accessor :pdf_design_id
|
|
89
|
+
|
|
90
|
+
# El diseño fijado al emitir; null mientras está pendiente.
|
|
91
|
+
attr_accessor :pdf_design
|
|
92
|
+
|
|
87
93
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
88
94
|
def self.attribute_map
|
|
89
95
|
{
|
|
@@ -115,7 +121,9 @@ module TrevolGenerado
|
|
|
115
121
|
:'note_type' => :'note_type',
|
|
116
122
|
:'concept' => :'concept',
|
|
117
123
|
:'description' => :'description',
|
|
118
|
-
:'equivalent_document' => :'equivalent_document'
|
|
124
|
+
:'equivalent_document' => :'equivalent_document',
|
|
125
|
+
:'pdf_design_id' => :'pdf_design_id',
|
|
126
|
+
:'pdf_design' => :'pdf_design'
|
|
119
127
|
}
|
|
120
128
|
end
|
|
121
129
|
|
|
@@ -160,7 +168,9 @@ module TrevolGenerado
|
|
|
160
168
|
:'note_type' => :'String',
|
|
161
169
|
:'concept' => :'String',
|
|
162
170
|
:'description' => :'String',
|
|
163
|
-
:'equivalent_document' => :'EquivalentDocumentReference'
|
|
171
|
+
:'equivalent_document' => :'EquivalentDocumentReference',
|
|
172
|
+
:'pdf_design_id' => :'String',
|
|
173
|
+
:'pdf_design' => :'PdfDesignApplied'
|
|
164
174
|
}
|
|
165
175
|
end
|
|
166
176
|
|
|
@@ -176,6 +186,8 @@ module TrevolGenerado
|
|
|
176
186
|
:'totals',
|
|
177
187
|
:'updated_at',
|
|
178
188
|
:'rounding',
|
|
189
|
+
:'pdf_design_id',
|
|
190
|
+
:'pdf_design'
|
|
179
191
|
])
|
|
180
192
|
end
|
|
181
193
|
|
|
@@ -328,6 +340,14 @@ module TrevolGenerado
|
|
|
328
340
|
if attributes.key?(:'equivalent_document')
|
|
329
341
|
self.equivalent_document = attributes[:'equivalent_document']
|
|
330
342
|
end
|
|
343
|
+
|
|
344
|
+
if attributes.key?(:'pdf_design_id')
|
|
345
|
+
self.pdf_design_id = attributes[:'pdf_design_id']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if attributes.key?(:'pdf_design')
|
|
349
|
+
self.pdf_design = attributes[:'pdf_design']
|
|
350
|
+
end
|
|
331
351
|
end
|
|
332
352
|
|
|
333
353
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -378,7 +398,9 @@ module TrevolGenerado
|
|
|
378
398
|
note_type == o.note_type &&
|
|
379
399
|
concept == o.concept &&
|
|
380
400
|
description == o.description &&
|
|
381
|
-
equivalent_document == o.equivalent_document
|
|
401
|
+
equivalent_document == o.equivalent_document &&
|
|
402
|
+
pdf_design_id == o.pdf_design_id &&
|
|
403
|
+
pdf_design == o.pdf_design
|
|
382
404
|
end
|
|
383
405
|
|
|
384
406
|
# @see the `==` method
|
|
@@ -390,7 +412,7 @@ module TrevolGenerado
|
|
|
390
412
|
# Calculates hash code according to all attributes.
|
|
391
413
|
# @return [Integer] Hash code
|
|
392
414
|
def hash
|
|
393
|
-
[id, object, environment, status, number, prefix, external_id, origin, cude, qr, issued_at, customer, items, payment, totals, dian, delivery, created_at, updated_at, notes, period, references, allowance_charges, prepayments, rounding, note_type, concept, description, equivalent_document].hash
|
|
415
|
+
[id, object, environment, status, number, prefix, external_id, origin, cude, qr, issued_at, customer, items, payment, totals, dian, delivery, created_at, updated_at, notes, period, references, allowance_charges, prepayments, rounding, note_type, concept, description, equivalent_document, pdf_design_id, pdf_design].hash
|
|
394
416
|
end
|
|
395
417
|
|
|
396
418
|
# Builds the object from hash
|
|
@@ -53,6 +53,9 @@ module TrevolGenerado
|
|
|
53
53
|
# El documento que ajusta: {\"id\": \"pos_…\"} (de Trevol: validado, de la empresa y el ambiente de la llave) o {number, cude, issue_date, document_type, total?} si es de otra plataforma (`total` hace falta para anularlo).
|
|
54
54
|
attr_accessor :equivalent_document
|
|
55
55
|
|
|
56
|
+
# El diseño del PDF de este documento (`pdd_…` o `classic`); gana al de la numeración y al predeterminado. `null` es lo mismo que no mandarlo. Guía: Diseño del PDF.
|
|
57
|
+
attr_accessor :pdf_design_id
|
|
58
|
+
|
|
56
59
|
class EnumAttributeValidator
|
|
57
60
|
attr_reader :datatype
|
|
58
61
|
attr_reader :allowable_values
|
|
@@ -91,7 +94,8 @@ module TrevolGenerado
|
|
|
91
94
|
:'note_type' => :'note_type',
|
|
92
95
|
:'concept' => :'concept',
|
|
93
96
|
:'description' => :'description',
|
|
94
|
-
:'equivalent_document' => :'equivalent_document'
|
|
97
|
+
:'equivalent_document' => :'equivalent_document',
|
|
98
|
+
:'pdf_design_id' => :'pdf_design_id'
|
|
95
99
|
}
|
|
96
100
|
end
|
|
97
101
|
|
|
@@ -121,7 +125,8 @@ module TrevolGenerado
|
|
|
121
125
|
:'note_type' => :'String',
|
|
122
126
|
:'concept' => :'String',
|
|
123
127
|
:'description' => :'String',
|
|
124
|
-
:'equivalent_document' => :'EquivalentDocumentReference'
|
|
128
|
+
:'equivalent_document' => :'EquivalentDocumentReference',
|
|
129
|
+
:'pdf_design_id' => :'String'
|
|
125
130
|
}
|
|
126
131
|
end
|
|
127
132
|
|
|
@@ -129,6 +134,7 @@ module TrevolGenerado
|
|
|
129
134
|
def self.openapi_nullable
|
|
130
135
|
Set.new([
|
|
131
136
|
:'rounding',
|
|
137
|
+
:'pdf_design_id'
|
|
132
138
|
])
|
|
133
139
|
end
|
|
134
140
|
|
|
@@ -229,6 +235,10 @@ module TrevolGenerado
|
|
|
229
235
|
else
|
|
230
236
|
self.equivalent_document = nil
|
|
231
237
|
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'pdf_design_id')
|
|
240
|
+
self.pdf_design_id = attributes[:'pdf_design_id']
|
|
241
|
+
end
|
|
232
242
|
end
|
|
233
243
|
|
|
234
244
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -326,7 +336,8 @@ module TrevolGenerado
|
|
|
326
336
|
note_type == o.note_type &&
|
|
327
337
|
concept == o.concept &&
|
|
328
338
|
description == o.description &&
|
|
329
|
-
equivalent_document == o.equivalent_document
|
|
339
|
+
equivalent_document == o.equivalent_document &&
|
|
340
|
+
pdf_design_id == o.pdf_design_id
|
|
330
341
|
end
|
|
331
342
|
|
|
332
343
|
# @see the `==` method
|
|
@@ -338,7 +349,7 @@ module TrevolGenerado
|
|
|
338
349
|
# Calculates hash code according to all attributes.
|
|
339
350
|
# @return [Integer] Hash code
|
|
340
351
|
def hash
|
|
341
|
-
[external_id, customer, items, payment, notes, period, references, allowance_charges, prepayments, rounding, note_type, concept, description, equivalent_document].hash
|
|
352
|
+
[external_id, customer, items, payment, notes, period, references, allowance_charges, prepayments, rounding, note_type, concept, description, equivalent_document, pdf_design_id].hash
|
|
342
353
|
end
|
|
343
354
|
|
|
344
355
|
# Builds the object from hash
|