Class: EcfDgii::Generated::Ecf33IdDoc

Inherits:
ApiModelBase show all
Defined in:
lib/ecf_dgii/generated/models/ecf33_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 = {}) ⇒ Ecf33IdDoc

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 151

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

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

  if attributes.key?(:'tipo_ingresos')
    self.tipo_ingresos = attributes[:'tipo_ingresos']
  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.



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

def banco_pago
  @banco_pago
end

#encfObject

Returns the value of attribute encf.



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

def encf
  @encf
end

#fecha_desdeObject

Returns the value of attribute fecha_desde.



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

def fecha_desde
  @fecha_desde
end

#fecha_hastaObject

Returns the value of attribute fecha_hasta.



48
49
50
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 48

def fecha_hasta
  @fecha_hasta
end

#fecha_limite_pagoObject

Returns the value of attribute fecha_limite_pago.



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

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/ecf33_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/ecf33_id_doc.rb', line 24

def indicador_envio_diferido
  @indicador_envio_diferido
end

#indicador_monto_gravadoObject

Returns the value of attribute indicador_monto_gravado.



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

def indicador_monto_gravado
  @indicador_monto_gravado
end

#indicador_servicio_todo_incluidoObject

Returns the value of attribute indicador_servicio_todo_incluido.



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

def indicador_servicio_todo_incluido
  @indicador_servicio_todo_incluido
end

#numero_cuenta_pagoObject

Returns the value of attribute numero_cuenta_pago.



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

def numero_cuenta_pago
  @numero_cuenta_pago
end

#tabla_formas_pagoObject

Returns the value of attribute tabla_formas_pago.



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

def tabla_formas_pago
  @tabla_formas_pago
end

#termino_pagoObject

Returns the value of attribute termino_pago.



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

def termino_pago
  @termino_pago
end

#tipo_cuenta_pagoObject

Returns the value of attribute tipo_cuenta_pago.



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

def tipo_cuenta_pago
  @tipo_cuenta_pago
end

#tipo_ingresosObject

Returns the value of attribute tipo_ingresos.



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

def tipo_ingresos
  @tipo_ingresos
end

#tipo_pagoObject

Returns the value of attribute tipo_pago.



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

def tipo_pago
  @tipo_pago
end

#tipoe_cfObject

Returns the value of attribute tipoe_cf.



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

def tipoe_cf
  @tipoe_cf
end

#total_paginasObject

Returns the value of attribute total_paginas.



50
51
52
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 50

def total_paginas
  @total_paginas
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



98
99
100
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 98

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



103
104
105
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 103

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 75

def self.attribute_map
  {
    :'tipoe_cf' => :'tipoeCF',
    :'encf' => :'encf',
    :'fecha_vencimiento_secuencia' => :'fechaVencimientoSecuencia',
    :'indicador_envio_diferido' => :'indicadorEnvioDiferido',
    :'indicador_monto_gravado' => :'indicadorMontoGravado',
    :'indicador_servicio_todo_incluido' => :'indicadorServicioTodoIncluido',
    :'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



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 341

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



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 131

def self.openapi_nullable
  Set.new([
    :'indicador_envio_diferido',
    :'indicador_monto_gravado',
    :'indicador_servicio_todo_incluido',
    :'tipo_ingresos',
    :'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.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 108

def self.openapi_types
  {
    :'tipoe_cf' => :'TipoeCFType',
    :'encf' => :'String',
    :'fecha_vencimiento_secuencia' => :'Time',
    :'indicador_envio_diferido' => :'IndicadorEnvioDiferidoType',
    :'indicador_monto_gravado' => :'IndicadorMontoGravadoType',
    :'indicador_servicio_todo_incluido' => :'IndicadorServicioTodoIncluidoType',
    :'tipo_ingresos' => :'TipoIngresosValidationType',
    :'tipo_pago' => :'Ecf33TipoPagoType',
    :'fecha_limite_pago' => :'Time',
    :'termino_pago' => :'String',
    :'tabla_formas_pago' => :'Array<Ecf33FormaDePago>',
    :'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



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 304

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 &&
      indicador_monto_gravado == o.indicador_monto_gravado &&
      indicador_servicio_todo_incluido == o.indicador_servicio_todo_incluido &&
      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


328
329
330
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 328

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



334
335
336
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 334

def hash
  [tipoe_cf, encf, fecha_vencimiento_secuencia, indicador_envio_diferido, indicador_monto_gravado, indicador_servicio_todo_incluido, 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



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 244

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_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



363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 363

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



264
265
266
267
268
269
270
# File 'lib/ecf_dgii/generated/models/ecf33_id_doc.rb', line 264

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