Class: EcfDgii::Generated::Ecf47IdDoc

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
195
196
197
198
199
200
201
202
203
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 132

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



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

def banco_pago
  @banco_pago
end

#encfObject

Returns the value of attribute encf.



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

def encf
  @encf
end

#fecha_desdeObject

Returns the value of attribute fecha_desde.



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

def fecha_desde
  @fecha_desde
end

#fecha_hastaObject

Returns the value of attribute fecha_hasta.



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

def fecha_hasta
  @fecha_hasta
end

#fecha_limite_pagoObject

Returns the value of attribute fecha_limite_pago.



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

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

def fecha_vencimiento_secuencia
  @fecha_vencimiento_secuencia
end

#numero_cuenta_pagoObject

Returns the value of attribute numero_cuenta_pago.



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

def numero_cuenta_pago
  @numero_cuenta_pago
end

#tabla_formas_pagoObject

Returns the value of attribute tabla_formas_pago.



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

def tabla_formas_pago
  @tabla_formas_pago
end

#termino_pagoObject

Returns the value of attribute termino_pago.



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

def termino_pago
  @termino_pago
end

#tipo_cuenta_pagoObject

Returns the value of attribute tipo_cuenta_pago.



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

def tipo_cuenta_pago
  @tipo_cuenta_pago
end

#tipo_pagoObject

Returns the value of attribute tipo_pago.



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

def tipo_pago
  @tipo_pago
end

#tipoe_cfObject

Returns the value of attribute tipoe_cf.



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

def tipoe_cf
  @tipoe_cf
end

#total_paginasObject

Returns the value of attribute total_paginas.



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

def total_paginas
  @total_paginas
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



86
87
88
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 86

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



91
92
93
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 91

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 67

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



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 285

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



115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 115

def self.openapi_nullable
  Set.new([
    :'tipo_pago',
    :'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.



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 96

def self.openapi_types
  {
    :'tipoe_cf' => :'TipoeCFType',
    :'encf' => :'String',
    :'fecha_vencimiento_secuencia' => :'Time',
    :'tipo_pago' => :'TipoPagoType',
    :'fecha_limite_pago' => :'Time',
    :'termino_pago' => :'String',
    :'tabla_formas_pago' => :'Array<Ecf47FormaDePago>',
    :'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



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 252

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


272
273
274
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 272

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



278
279
280
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 278

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



207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 207

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



307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 307

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



223
224
225
226
227
228
# File 'lib/ecf_dgii/generated/models/ecf47_id_doc.rb', line 223

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