Class: EcfDgii::Generated::Ecf41IdDoc

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



127
128
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
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
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 127

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

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

Instance Attribute Details

#banco_pagoObject

Returns the value of attribute banco_pago.



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

def banco_pago
  @banco_pago
end

#encfObject

Returns the value of attribute encf.



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

def encf
  @encf
end

#fecha_limite_pagoObject

Returns the value of attribute fecha_limite_pago.



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

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/ecf41_id_doc.rb', line 22

def fecha_vencimiento_secuencia
  @fecha_vencimiento_secuencia
end

#indicador_monto_gravadoObject

Returns the value of attribute indicador_monto_gravado.



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

def indicador_monto_gravado
  @indicador_monto_gravado
end

#numero_cuenta_pagoObject

Returns the value of attribute numero_cuenta_pago.



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

def numero_cuenta_pago
  @numero_cuenta_pago
end

#tabla_formas_pagoObject

Returns the value of attribute tabla_formas_pago.



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

def tabla_formas_pago
  @tabla_formas_pago
end

#termino_pagoObject

Returns the value of attribute termino_pago.



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

def termino_pago
  @termino_pago
end

#tipo_cuenta_pagoObject

Returns the value of attribute tipo_cuenta_pago.



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

def tipo_cuenta_pago
  @tipo_cuenta_pago
end

#tipo_pagoObject

Returns the value of attribute tipo_pago.



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

def tipo_pago
  @tipo_pago
end

#tipoe_cfObject

Returns the value of attribute tipoe_cf.



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

def tipoe_cf
  @tipoe_cf
end

#total_paginasObject

Returns the value of attribute total_paginas.



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

def total_paginas
  @total_paginas
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



83
84
85
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 83

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



88
89
90
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 88

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 65

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



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 275

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



111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 111

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

.openapi_typesObject

Attribute type mapping.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 93

def self.openapi_types
  {
    :'tipoe_cf' => :'TipoeCFType',
    :'encf' => :'String',
    :'fecha_vencimiento_secuencia' => :'Time',
    :'indicador_monto_gravado' => :'IndicadorMontoGravadoType',
    :'tipo_pago' => :'TipoPagoType',
    :'fecha_limite_pago' => :'Time',
    :'termino_pago' => :'String',
    :'tabla_formas_pago' => :'Array<Ecf41FormaDePago>',
    :'tipo_cuenta_pago' => :'TipoCuentaPagoType',
    :'numero_cuenta_pago' => :'String',
    :'banco_pago' => :'String',
    :'total_paginas' => :'AcecfSummaryDtoReceptorHttpStatus'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

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_monto_gravado == o.indicador_monto_gravado &&
      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 &&
      total_paginas == o.total_paginas
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


262
263
264
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 262

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



268
269
270
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 268

def hash
  [tipoe_cf, encf, fecha_vencimiento_secuencia, indicador_monto_gravado, tipo_pago, fecha_limite_pago, termino_pago, tabla_formas_pago, tipo_cuenta_pago, numero_cuenta_pago, banco_pago, 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



198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 198

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

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 297

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



214
215
216
217
218
219
# File 'lib/ecf_dgii/generated/models/ecf41_id_doc.rb', line 214

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