Class: EcfDgii::Generated::Ecf46IdDoc

Inherits:
ApiModelBase show all
Defined in:
lib/ecf_dgii/generated/models/ecf46_id_doc.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Ecf46IdDoc

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 140

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `EcfDgii::Generated::Ecf46IdDoc` 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::Ecf46IdDoc`. 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?(:'tipoe_cf')
    self.tipoe_cf = attributes[:'tipoe_cf']
  else
    self.tipoe_cf = nil
  end

  if attributes.key?(:'encf')
    self.encf = attributes[:'encf']
  else
    self.encf = nil
  end

  if attributes.key?(:'fecha_vencimiento_secuencia')
    self.fecha_vencimiento_secuencia = attributes[:'fecha_vencimiento_secuencia']
  end

  if attributes.key?(:'indicador_envio_diferido')
    self.indicador_envio_diferido = attributes[:'indicador_envio_diferido']
  end

  if attributes.key?(:'tipo_ingresos')
    self.tipo_ingresos = attributes[:'tipo_ingresos']
  else
    self.tipo_ingresos = nil
  end

  if attributes.key?(:'tipo_pago')
    self.tipo_pago = attributes[:'tipo_pago']
  else
    self.tipo_pago = nil
  end

  if attributes.key?(:'fecha_limite_pago')
    self.fecha_limite_pago = attributes[:'fecha_limite_pago']
  end

  if attributes.key?(:'termino_pago')
    self.termino_pago = attributes[:'termino_pago']
  end

  if attributes.key?(:'tabla_formas_pago')
    if (value = attributes[:'tabla_formas_pago']).is_a?(Array)
      self.tabla_formas_pago = value
    end
  end

  if attributes.key?(:'tipo_cuenta_pago')
    self.tipo_cuenta_pago = attributes[:'tipo_cuenta_pago']
  end

  if attributes.key?(:'numero_cuenta_pago')
    self.numero_cuenta_pago = attributes[:'numero_cuenta_pago']
  end

  if attributes.key?(:'banco_pago')
    self.banco_pago = attributes[:'banco_pago']
  end

  if attributes.key?(:'fecha_desde')
    self.fecha_desde = attributes[:'fecha_desde']
  end

  if attributes.key?(:'fecha_hasta')
    self.fecha_hasta = attributes[:'fecha_hasta']
  end

  if attributes.key?(:'total_paginas')
    self.total_paginas = attributes[:'total_paginas']
  end
end

Instance Attribute Details

#banco_pagoObject

Returns the value of attribute banco_pago.



40
41
42
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 40

def banco_pago
  @banco_pago
end

#encfObject

Returns the value of attribute encf.



20
21
22
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 20

def encf
  @encf
end

#fecha_desdeObject

Returns the value of attribute fecha_desde.



42
43
44
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 42

def fecha_desde
  @fecha_desde
end

#fecha_hastaObject

Returns the value of attribute fecha_hasta.



44
45
46
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 44

def fecha_hasta
  @fecha_hasta
end

#fecha_limite_pagoObject

Returns the value of attribute fecha_limite_pago.



30
31
32
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 30

def fecha_limite_pago
  @fecha_limite_pago
end

#fecha_vencimiento_secuenciaObject

Returns the value of attribute fecha_vencimiento_secuencia.



22
23
24
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 22

def fecha_vencimiento_secuencia
  @fecha_vencimiento_secuencia
end

#indicador_envio_diferidoObject

Returns the value of attribute indicador_envio_diferido.



24
25
26
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 24

def indicador_envio_diferido
  @indicador_envio_diferido
end

#numero_cuenta_pagoObject

Returns the value of attribute numero_cuenta_pago.



38
39
40
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 38

def numero_cuenta_pago
  @numero_cuenta_pago
end

#tabla_formas_pagoObject

Returns the value of attribute tabla_formas_pago.



34
35
36
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 34

def tabla_formas_pago
  @tabla_formas_pago
end

#termino_pagoObject

Returns the value of attribute termino_pago.



32
33
34
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 32

def termino_pago
  @termino_pago
end

#tipo_cuenta_pagoObject

Returns the value of attribute tipo_cuenta_pago.



36
37
38
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 36

def tipo_cuenta_pago
  @tipo_cuenta_pago
end

#tipo_ingresosObject

Returns the value of attribute tipo_ingresos.



26
27
28
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 26

def tipo_ingresos
  @tipo_ingresos
end

#tipo_pagoObject

Returns the value of attribute tipo_pago.



28
29
30
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 28

def tipo_pago
  @tipo_pago
end

#tipoe_cfObject

Returns the value of attribute tipoe_cf.



18
19
20
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 18

def tipoe_cf
  @tipoe_cf
end

#total_paginasObject

Returns the value of attribute total_paginas.



46
47
48
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 46

def total_paginas
  @total_paginas
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



92
93
94
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 92

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



97
98
99
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 97

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 71

def self.attribute_map
  {
    :'tipoe_cf' => :'tipoeCF',
    :'encf' => :'encf',
    :'fecha_vencimiento_secuencia' => :'fechaVencimientoSecuencia',
    :'indicador_envio_diferido' => :'indicadorEnvioDiferido',
    :'tipo_ingresos' => :'tipoIngresos',
    :'tipo_pago' => :'tipoPago',
    :'fecha_limite_pago' => :'fechaLimitePago',
    :'termino_pago' => :'terminoPago',
    :'tabla_formas_pago' => :'tablaFormasPago',
    :'tipo_cuenta_pago' => :'tipoCuentaPago',
    :'numero_cuenta_pago' => :'numeroCuentaPago',
    :'banco_pago' => :'bancoPago',
    :'fecha_desde' => :'fechaDesde',
    :'fecha_hasta' => :'fechaHasta',
    :'total_paginas' => :'totalPaginas'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 337

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_nullableObject

List of attributes with nullable: true



123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 123

def self.openapi_nullable
  Set.new([
    :'indicador_envio_diferido',
    :'fecha_limite_pago',
    :'termino_pago',
    :'tabla_formas_pago',
    :'tipo_cuenta_pago',
    :'numero_cuenta_pago',
    :'banco_pago',
    :'fecha_desde',
    :'fecha_hasta',
    :'total_paginas'
  ])
end

.openapi_typesObject

Attribute type mapping.



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 102

def self.openapi_types
  {
    :'tipoe_cf' => :'TipoeCFType',
    :'encf' => :'String',
    :'fecha_vencimiento_secuencia' => :'Time',
    :'indicador_envio_diferido' => :'IndicadorEnvioDiferidoType',
    :'tipo_ingresos' => :'Ecf46TipoIngresosValidationType',
    :'tipo_pago' => :'Ecf46TipoPagoType',
    :'fecha_limite_pago' => :'Time',
    :'termino_pago' => :'String',
    :'tabla_formas_pago' => :'Array<Ecf46FormaDePago>',
    :'tipo_cuenta_pago' => :'TipoCuentaPagoType',
    :'numero_cuenta_pago' => :'String',
    :'banco_pago' => :'String',
    :'fecha_desde' => :'Time',
    :'fecha_hasta' => :'Time',
    :'total_paginas' => :'AcecfSummaryDtoReceptorHttpStatus'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 302

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      tipoe_cf == o.tipoe_cf &&
      encf == o.encf &&
      fecha_vencimiento_secuencia == o.fecha_vencimiento_secuencia &&
      indicador_envio_diferido == o.indicador_envio_diferido &&
      tipo_ingresos == o.tipo_ingresos &&
      tipo_pago == o.tipo_pago &&
      fecha_limite_pago == o.fecha_limite_pago &&
      termino_pago == o.termino_pago &&
      tabla_formas_pago == o.tabla_formas_pago &&
      tipo_cuenta_pago == o.tipo_cuenta_pago &&
      numero_cuenta_pago == o.numero_cuenta_pago &&
      banco_pago == o.banco_pago &&
      fecha_desde == o.fecha_desde &&
      fecha_hasta == o.fecha_hasta &&
      total_paginas == o.total_paginas
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


324
325
326
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 324

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



330
331
332
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 330

def hash
  [tipoe_cf, encf, fecha_vencimiento_secuencia, indicador_envio_diferido, tipo_ingresos, tipo_pago, fecha_limite_pago, termino_pago, tabla_formas_pago, tipo_cuenta_pago, numero_cuenta_pago, banco_pago, fecha_desde, fecha_hasta, total_paginas].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 227

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @tipoe_cf.nil?
    invalid_properties.push('invalid value for "tipoe_cf", tipoe_cf cannot be nil.')
  end

  if @encf.nil?
    invalid_properties.push('invalid value for "encf", encf cannot be nil.')
  end

  if @tipo_ingresos.nil?
    invalid_properties.push('invalid value for "tipo_ingresos", tipo_ingresos cannot be nil.')
  end

  if @tipo_pago.nil?
    invalid_properties.push('invalid value for "tipo_pago", tipo_pago cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 359

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

Returns:

  • (Boolean)

    true if the model is valid



251
252
253
254
255
256
257
258
# File 'lib/ecf_dgii/generated/models/ecf46_id_doc.rb', line 251

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @tipoe_cf.nil?
  return false if @encf.nil?
  return false if @tipo_ingresos.nil?
  return false if @tipo_pago.nil?
  true
end