Class: EcfDgii::Generated::Ecf32Item
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- EcfDgii::Generated::Ecf32Item
- Defined in:
- lib/ecf_dgii/generated/models/ecf32_item.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#cantidad_item ⇒ Object
Returns the value of attribute cantidad_item.
-
#cantidad_referencia ⇒ Object
Returns the value of attribute cantidad_referencia.
-
#descripcion_item ⇒ Object
Returns the value of attribute descripcion_item.
-
#descuento_monto ⇒ Object
Returns the value of attribute descuento_monto.
-
#fecha_elaboracion ⇒ Object
Returns the value of attribute fecha_elaboracion.
-
#fecha_vencimiento_item ⇒ Object
Returns the value of attribute fecha_vencimiento_item.
-
#grados_alcohol ⇒ Object
Returns the value of attribute grados_alcohol.
-
#indicador_bieno_servicio ⇒ Object
Returns the value of attribute indicador_bieno_servicio.
-
#indicador_facturacion ⇒ Object
Returns the value of attribute indicador_facturacion.
-
#mineria ⇒ Object
Returns the value of attribute mineria.
-
#monto_item ⇒ Object
Returns the value of attribute monto_item.
-
#nombre_item ⇒ Object
Returns the value of attribute nombre_item.
-
#numero_linea ⇒ Object
Returns the value of attribute numero_linea.
-
#otra_moneda_detalle ⇒ Object
Returns the value of attribute otra_moneda_detalle.
-
#precio_unitario_item ⇒ Object
Returns the value of attribute precio_unitario_item.
-
#precio_unitario_referencia ⇒ Object
Returns the value of attribute precio_unitario_referencia.
-
#recargo_monto ⇒ Object
Returns the value of attribute recargo_monto.
-
#tabla_codigos_item ⇒ Object
Returns the value of attribute tabla_codigos_item.
-
#tabla_impuesto_adicional ⇒ Object
Returns the value of attribute tabla_impuesto_adicional.
-
#tabla_sub_descuento ⇒ Object
Returns the value of attribute tabla_sub_descuento.
-
#tabla_sub_recargo ⇒ Object
Returns the value of attribute tabla_sub_recargo.
-
#tabla_subcantidad ⇒ Object
Returns the value of attribute tabla_subcantidad.
-
#unidad_medida ⇒ Object
Returns the value of attribute unidad_medida.
-
#unidad_referencia ⇒ Object
Returns the value of attribute unidad_referencia.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Ecf32Item
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Ecf32Item
Initializes the object
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 183 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `EcfDgii::Generated::Ecf32Item` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `EcfDgii::Generated::Ecf32Item`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'numero_linea') self.numero_linea = attributes[:'numero_linea'] else self.numero_linea = nil end if attributes.key?(:'tabla_codigos_item') if (value = attributes[:'tabla_codigos_item']).is_a?(Array) self.tabla_codigos_item = value end end if attributes.key?(:'indicador_facturacion') self.indicador_facturacion = attributes[:'indicador_facturacion'] else self.indicador_facturacion = nil end if attributes.key?(:'nombre_item') self.nombre_item = attributes[:'nombre_item'] else self.nombre_item = nil end if attributes.key?(:'indicador_bieno_servicio') self.indicador_bieno_servicio = attributes[:'indicador_bieno_servicio'] else self.indicador_bieno_servicio = nil end if attributes.key?(:'descripcion_item') self.descripcion_item = attributes[:'descripcion_item'] end if attributes.key?(:'cantidad_item') self.cantidad_item = attributes[:'cantidad_item'] else self.cantidad_item = nil end if attributes.key?(:'unidad_medida') self.unidad_medida = attributes[:'unidad_medida'] end if attributes.key?(:'cantidad_referencia') self.cantidad_referencia = attributes[:'cantidad_referencia'] end if attributes.key?(:'unidad_referencia') self.unidad_referencia = attributes[:'unidad_referencia'] end if attributes.key?(:'tabla_subcantidad') if (value = attributes[:'tabla_subcantidad']).is_a?(Array) self.tabla_subcantidad = value end end if attributes.key?(:'grados_alcohol') self.grados_alcohol = attributes[:'grados_alcohol'] end if attributes.key?(:'precio_unitario_referencia') self.precio_unitario_referencia = attributes[:'precio_unitario_referencia'] end if attributes.key?(:'fecha_elaboracion') self.fecha_elaboracion = attributes[:'fecha_elaboracion'] end if attributes.key?(:'fecha_vencimiento_item') self.fecha_vencimiento_item = attributes[:'fecha_vencimiento_item'] end if attributes.key?(:'mineria') self.mineria = attributes[:'mineria'] end if attributes.key?(:'precio_unitario_item') self.precio_unitario_item = attributes[:'precio_unitario_item'] else self.precio_unitario_item = nil end if attributes.key?(:'descuento_monto') self.descuento_monto = attributes[:'descuento_monto'] end if attributes.key?(:'tabla_sub_descuento') if (value = attributes[:'tabla_sub_descuento']).is_a?(Array) self.tabla_sub_descuento = value end end if attributes.key?(:'recargo_monto') self.recargo_monto = attributes[:'recargo_monto'] end if attributes.key?(:'tabla_sub_recargo') if (value = attributes[:'tabla_sub_recargo']).is_a?(Array) self.tabla_sub_recargo = value end end if attributes.key?(:'tabla_impuesto_adicional') if (value = attributes[:'tabla_impuesto_adicional']).is_a?(Array) self.tabla_impuesto_adicional = value end end if attributes.key?(:'otra_moneda_detalle') self.otra_moneda_detalle = attributes[:'otra_moneda_detalle'] end if attributes.key?(:'monto_item') self.monto_item = attributes[:'monto_item'] else self.monto_item = nil end end |
Instance Attribute Details
#cantidad_item ⇒ Object
Returns the value of attribute cantidad_item.
30 31 32 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 30 def cantidad_item @cantidad_item end |
#cantidad_referencia ⇒ Object
Returns the value of attribute cantidad_referencia.
34 35 36 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 34 def cantidad_referencia @cantidad_referencia end |
#descripcion_item ⇒ Object
Returns the value of attribute descripcion_item.
28 29 30 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 28 def descripcion_item @descripcion_item end |
#descuento_monto ⇒ Object
Returns the value of attribute descuento_monto.
52 53 54 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 52 def descuento_monto @descuento_monto end |
#fecha_elaboracion ⇒ Object
Returns the value of attribute fecha_elaboracion.
44 45 46 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 44 def fecha_elaboracion @fecha_elaboracion end |
#fecha_vencimiento_item ⇒ Object
Returns the value of attribute fecha_vencimiento_item.
46 47 48 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 46 def fecha_vencimiento_item @fecha_vencimiento_item end |
#grados_alcohol ⇒ Object
Returns the value of attribute grados_alcohol.
40 41 42 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 40 def grados_alcohol @grados_alcohol end |
#indicador_bieno_servicio ⇒ Object
Returns the value of attribute indicador_bieno_servicio.
26 27 28 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 26 def indicador_bieno_servicio @indicador_bieno_servicio end |
#indicador_facturacion ⇒ Object
Returns the value of attribute indicador_facturacion.
22 23 24 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 22 def indicador_facturacion @indicador_facturacion end |
#mineria ⇒ Object
Returns the value of attribute mineria.
48 49 50 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 48 def mineria @mineria end |
#monto_item ⇒ Object
Returns the value of attribute monto_item.
64 65 66 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 64 def monto_item @monto_item end |
#nombre_item ⇒ Object
Returns the value of attribute nombre_item.
24 25 26 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 24 def nombre_item @nombre_item end |
#numero_linea ⇒ Object
Returns the value of attribute numero_linea.
18 19 20 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 18 def numero_linea @numero_linea end |
#otra_moneda_detalle ⇒ Object
Returns the value of attribute otra_moneda_detalle.
62 63 64 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 62 def otra_moneda_detalle @otra_moneda_detalle end |
#precio_unitario_item ⇒ Object
Returns the value of attribute precio_unitario_item.
50 51 52 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 50 def precio_unitario_item @precio_unitario_item end |
#precio_unitario_referencia ⇒ Object
Returns the value of attribute precio_unitario_referencia.
42 43 44 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 42 def precio_unitario_referencia @precio_unitario_referencia end |
#recargo_monto ⇒ Object
Returns the value of attribute recargo_monto.
56 57 58 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 56 def recargo_monto @recargo_monto end |
#tabla_codigos_item ⇒ Object
Returns the value of attribute tabla_codigos_item.
20 21 22 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 20 def tabla_codigos_item @tabla_codigos_item end |
#tabla_impuesto_adicional ⇒ Object
Returns the value of attribute tabla_impuesto_adicional.
60 61 62 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 60 def tabla_impuesto_adicional @tabla_impuesto_adicional end |
#tabla_sub_descuento ⇒ Object
Returns the value of attribute tabla_sub_descuento.
54 55 56 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 54 def tabla_sub_descuento @tabla_sub_descuento end |
#tabla_sub_recargo ⇒ Object
Returns the value of attribute tabla_sub_recargo.
58 59 60 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 58 def tabla_sub_recargo @tabla_sub_recargo end |
#tabla_subcantidad ⇒ Object
Returns the value of attribute tabla_subcantidad.
38 39 40 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 38 def tabla_subcantidad @tabla_subcantidad end |
#unidad_medida ⇒ Object
Returns the value of attribute unidad_medida.
32 33 34 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 32 def unidad_medida @unidad_medida end |
#unidad_referencia ⇒ Object
Returns the value of attribute unidad_referencia.
36 37 38 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 36 def unidad_referencia @unidad_referencia end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
119 120 121 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 119 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
124 125 126 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 124 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 89 def self.attribute_map { :'numero_linea' => :'numeroLinea', :'tabla_codigos_item' => :'tablaCodigosItem', :'indicador_facturacion' => :'indicadorFacturacion', :'nombre_item' => :'nombreItem', :'indicador_bieno_servicio' => :'indicadorBienoServicio', :'descripcion_item' => :'descripcionItem', :'cantidad_item' => :'cantidadItem', :'unidad_medida' => :'unidadMedida', :'cantidad_referencia' => :'cantidadReferencia', :'unidad_referencia' => :'unidadReferencia', :'tabla_subcantidad' => :'tablaSubcantidad', :'grados_alcohol' => :'gradosAlcohol', :'precio_unitario_referencia' => :'precioUnitarioReferencia', :'fecha_elaboracion' => :'fechaElaboracion', :'fecha_vencimiento_item' => :'fechaVencimientoItem', :'mineria' => :'mineria', :'precio_unitario_item' => :'precioUnitarioItem', :'descuento_monto' => :'descuentoMonto', :'tabla_sub_descuento' => :'tablaSubDescuento', :'recargo_monto' => :'recargoMonto', :'tabla_sub_recargo' => :'tablaSubRecargo', :'tabla_impuesto_adicional' => :'tablaImpuestoAdicional', :'otra_moneda_detalle' => :'otraMonedaDetalle', :'monto_item' => :'montoItem' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 484 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 159 def self.openapi_nullable Set.new([ :'tabla_codigos_item', :'descripcion_item', :'unidad_medida', :'cantidad_referencia', :'unidad_referencia', :'tabla_subcantidad', :'grados_alcohol', :'precio_unitario_referencia', :'fecha_elaboracion', :'fecha_vencimiento_item', :'mineria', :'descuento_monto', :'tabla_sub_descuento', :'recargo_monto', :'tabla_sub_recargo', :'tabla_impuesto_adicional', :'otra_moneda_detalle', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 129 def self.openapi_types { :'numero_linea' => :'SearchEcfReceptionRequestsTiposEcfsParameterInner', :'tabla_codigos_item' => :'Array<Ecf32CodigosItem>', :'indicador_facturacion' => :'Ecf32IndicadorFacturacionType', :'nombre_item' => :'String', :'indicador_bieno_servicio' => :'Ecf32IndicadorBienoServicioType', :'descripcion_item' => :'String', :'cantidad_item' => :'Ecf31ItemCantidadItem', :'unidad_medida' => :'UnidadMedidaType', :'cantidad_referencia' => :'Ecf31DescuentoORecargoMontoDescuentooRecargo', :'unidad_referencia' => :'UnidadMedidaType', :'tabla_subcantidad' => :'Array<Ecf32SubcantidadItem>', :'grados_alcohol' => :'Ecf31DescuentoORecargoValorDescuentooRecargo', :'precio_unitario_referencia' => :'Ecf31ImpuestoAdicional2MontoImpuestoSelectivoConsumoEspecifico', :'fecha_elaboracion' => :'Time', :'fecha_vencimiento_item' => :'Time', :'mineria' => :'Ecf32Mineria', :'precio_unitario_item' => :'Ecf31ItemPrecioUnitarioItem', :'descuento_monto' => :'Ecf31DescuentoORecargoMontoDescuentooRecargo', :'tabla_sub_descuento' => :'Array<Ecf32SubDescuento>', :'recargo_monto' => :'Ecf31DescuentoORecargoMontoDescuentooRecargo', :'tabla_sub_recargo' => :'Array<Ecf32SubRecargo>', :'tabla_impuesto_adicional' => :'Array<Ecf32ImpuestoAdicional>', :'otra_moneda_detalle' => :'Ecf32OtraMonedaDetalle', :'monto_item' => :'Ecf31FormaDePagoMontoPago' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 440 def ==(o) return true if self.equal?(o) self.class == o.class && numero_linea == o.numero_linea && tabla_codigos_item == o.tabla_codigos_item && indicador_facturacion == o.indicador_facturacion && nombre_item == o.nombre_item && indicador_bieno_servicio == o.indicador_bieno_servicio && descripcion_item == o.descripcion_item && cantidad_item == o.cantidad_item && unidad_medida == o.unidad_medida && cantidad_referencia == o.cantidad_referencia && unidad_referencia == o.unidad_referencia && tabla_subcantidad == o.tabla_subcantidad && grados_alcohol == o.grados_alcohol && precio_unitario_referencia == o.precio_unitario_referencia && fecha_elaboracion == o.fecha_elaboracion && fecha_vencimiento_item == o.fecha_vencimiento_item && mineria == o.mineria && precio_unitario_item == o.precio_unitario_item && descuento_monto == o.descuento_monto && tabla_sub_descuento == o.tabla_sub_descuento && recargo_monto == o.recargo_monto && tabla_sub_recargo == o.tabla_sub_recargo && tabla_impuesto_adicional == o.tabla_impuesto_adicional && otra_moneda_detalle == o.otra_moneda_detalle && monto_item == o.monto_item end |
#eql?(o) ⇒ Boolean
471 472 473 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 471 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
477 478 479 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 477 def hash [numero_linea, tabla_codigos_item, indicador_facturacion, nombre_item, indicador_bieno_servicio, descripcion_item, cantidad_item, unidad_medida, cantidad_referencia, unidad_referencia, tabla_subcantidad, grados_alcohol, precio_unitario_referencia, fecha_elaboracion, fecha_vencimiento_item, mineria, precio_unitario_item, descuento_monto, tabla_sub_descuento, recargo_monto, tabla_sub_recargo, tabla_impuesto_adicional, otra_moneda_detalle, monto_item].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 320 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @numero_linea.nil? invalid_properties.push('invalid value for "numero_linea", numero_linea cannot be nil.') end if @indicador_facturacion.nil? invalid_properties.push('invalid value for "indicador_facturacion", indicador_facturacion cannot be nil.') end if @nombre_item.nil? invalid_properties.push('invalid value for "nombre_item", nombre_item cannot be nil.') end if @indicador_bieno_servicio.nil? invalid_properties.push('invalid value for "indicador_bieno_servicio", indicador_bieno_servicio cannot be nil.') end if @cantidad_item.nil? invalid_properties.push('invalid value for "cantidad_item", cantidad_item cannot be nil.') end if @precio_unitario_item.nil? invalid_properties.push('invalid value for "precio_unitario_item", precio_unitario_item cannot be nil.') end if @monto_item.nil? invalid_properties.push('invalid value for "monto_item", monto_item cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 506 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/ecf_dgii/generated/models/ecf32_item.rb', line 356 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @numero_linea.nil? return false if @indicador_facturacion.nil? return false if @nombre_item.nil? return false if @indicador_bieno_servicio.nil? return false if @cantidad_item.nil? return false if @precio_unitario_item.nil? return false if @monto_item.nil? true end |