Class: EcfDgii::Generated::AcecfSummaryDto

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

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 = {}) ⇒ AcecfSummaryDto

Initializes the object

Parameters:

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

    Model attributes in the form of hash



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 104

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#acecf_idObject

Returns the value of attribute acecf_id.



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

def acecf_id
  @acecf_id
end

#created_onObject

Returns the value of attribute created_on.



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

def created_on
  @created_on
end

#detalle_motivo_rechazoObject

Returns the value of attribute detalle_motivo_rechazo.



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

def detalle_motivo_rechazo
  @detalle_motivo_rechazo
end

#dgii_codigo_responseObject

Returns the value of attribute dgii_codigo_response.



37
38
39
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 37

def dgii_codigo_response
  @dgii_codigo_response
end

#dgii_estado_responseObject

Returns the value of attribute dgii_estado_response.



39
40
41
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 39

def dgii_estado_response
  @dgii_estado_response
end

#dgii_mensajes_responseObject

Returns the value of attribute dgii_mensajes_response.



41
42
43
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 41

def dgii_mensajes_response
  @dgii_mensajes_response
end

#error_messageObject

Last failure reason when Progress = Failed.



33
34
35
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 33

def error_message
  @error_message
end

#estadoObject

Returns the value of attribute estado.



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

def estado
  @estado
end

#fecha_hora_aprobacion_comercialObject

Returns the value of attribute fecha_hora_aprobacion_comercial.



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

def fecha_hora_aprobacion_comercial
  @fecha_hora_aprobacion_comercial
end

#file_nameObject

Returns the value of attribute file_name.



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

def file_name
  @file_name
end

#progressObject

Returns the value of attribute progress.



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

def progress
  @progress
end

#receptor_http_statusObject

Returns the value of attribute receptor_http_status.



35
36
37
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 35

def receptor_http_status
  @receptor_http_status
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



62
63
64
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 62

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



67
68
69
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 67

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 44

def self.attribute_map
  {
    :'acecf_id' => :'acecfId',
    :'estado' => :'estado',
    :'detalle_motivo_rechazo' => :'detalleMotivoRechazo',
    :'fecha_hora_aprobacion_comercial' => :'fechaHoraAprobacionComercial',
    :'file_name' => :'fileName',
    :'created_on' => :'createdOn',
    :'progress' => :'progress',
    :'error_message' => :'errorMessage',
    :'receptor_http_status' => :'receptorHttpStatus',
    :'dgii_codigo_response' => :'dgiiCodigoResponse',
    :'dgii_estado_response' => :'dgiiEstadoResponse',
    :'dgii_mensajes_response' => :'dgiiMensajesResponse'
  }
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



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 216

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



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 90

def self.openapi_nullable
  Set.new([
    :'detalle_motivo_rechazo',
    :'file_name',
    :'error_message',
    :'receptor_http_status',
    :'dgii_codigo_response',
    :'dgii_estado_response',
    :'dgii_mensajes_response'
  ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'acecf_id' => :'String',
    :'estado' => :'SearchEcfReceptionRequestsTiposEcfsParameterInner',
    :'detalle_motivo_rechazo' => :'String',
    :'fecha_hora_aprobacion_comercial' => :'Time',
    :'file_name' => :'String',
    :'created_on' => :'Time',
    :'progress' => :'SearchEcfReceptionRequestsTiposEcfsParameterInner',
    :'error_message' => :'String',
    :'receptor_http_status' => :'AcecfSummaryDtoReceptorHttpStatus',
    :'dgii_codigo_response' => :'String',
    :'dgii_estado_response' => :'String',
    :'dgii_mensajes_response' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 184

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      acecf_id == o.acecf_id &&
      estado == o.estado &&
      detalle_motivo_rechazo == o.detalle_motivo_rechazo &&
      fecha_hora_aprobacion_comercial == o.fecha_hora_aprobacion_comercial &&
      file_name == o.file_name &&
      created_on == o.created_on &&
      progress == o.progress &&
      error_message == o.error_message &&
      receptor_http_status == o.receptor_http_status &&
      dgii_codigo_response == o.dgii_codigo_response &&
      dgii_estado_response == o.dgii_estado_response &&
      dgii_mensajes_response == o.dgii_mensajes_response
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


203
204
205
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 203

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



209
210
211
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 209

def hash
  [acecf_id, estado, detalle_motivo_rechazo, fecha_hora_aprobacion_comercial, file_name, created_on, progress, error_message, receptor_http_status, dgii_codigo_response, dgii_estado_response, dgii_mensajes_response].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



169
170
171
172
173
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 169

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 238

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



177
178
179
180
# File 'lib/ecf_dgii/generated/models/acecf_summary_dto.rb', line 177

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end