Class: EcfDgii::Generated::AnulacionListResponse

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/ecf_dgii/generated/models/anulacion_list_response.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 = {}) ⇒ AnulacionListResponse

Initializes the object

Parameters:

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

    Model attributes in the form of hash



102
103
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
166
167
168
169
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 102

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#anulacion_idObject

Returns the value of attribute anulacion_id.



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

def anulacion_id
  @anulacion_id
end

#cantidade_ncf_anuladosObject

Returns the value of attribute cantidade_ncf_anulados.



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

def cantidade_ncf_anulados
  @cantidade_ncf_anulados
end

#company_rncObject

Returns the value of attribute company_rnc.



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

def company_rnc
  @company_rnc
end

#created_byObject

Returns the value of attribute created_by.



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

def created_by
  @created_by
end

#created_onObject

Returns the value of attribute created_on.



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

def created_on
  @created_on
end

#detalle_anulacionObject

Returns the value of attribute detalle_anulacion.



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

def detalle_anulacion
  @detalle_anulacion
end

#fecha_hora_anulacione_ncfObject

Returns the value of attribute fecha_hora_anulacione_ncf.



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

def fecha_hora_anulacione_ncf
  @fecha_hora_anulacione_ncf
end

#file_nameObject

Returns the value of attribute file_name.



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

def file_name
  @file_name
end

#responseObject

Returns the value of attribute response.



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

def response
  @response
end

#status_codeObject

Returns the value of attribute status_code.



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

def status_code
  @status_code
end

#tenant_idObject

Returns the value of attribute tenant_id.



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

def tenant_id
  @tenant_id
end

#updated_byObject

Returns the value of attribute updated_by.



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

def updated_by
  @updated_by
end

#updated_onObject

Returns the value of attribute updated_on.



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

def updated_on
  @updated_on
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



64
65
66
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 64

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



69
70
71
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 69

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'anulacion_id' => :'anulacionId',
    :'tenant_id' => :'tenantId',
    :'company_rnc' => :'companyRnc',
    :'cantidade_ncf_anulados' => :'cantidadeNCFAnulados',
    :'detalle_anulacion' => :'detalleAnulacion',
    :'response' => :'response',
    :'status_code' => :'statusCode',
    :'file_name' => :'fileName',
    :'fecha_hora_anulacione_ncf' => :'fechaHoraAnulacioneNCF',
    :'created_on' => :'createdOn',
    :'updated_on' => :'updatedOn',
    :'created_by' => :'createdBy',
    :'updated_by' => :'updatedBy'
  }
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



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 221

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



93
94
95
96
97
98
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 93

def self.openapi_nullable
  Set.new([
    :'detalle_anulacion',
    :'response',
  ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'anulacion_id' => :'String',
    :'tenant_id' => :'String',
    :'company_rnc' => :'String',
    :'cantidade_ncf_anulados' => :'SearchEcfReceptionRequestsTiposEcfsParameterInner',
    :'detalle_anulacion' => :'Array<DetalleAnulacionRequestDto>',
    :'response' => :'RespuestaAnulacionRango',
    :'status_code' => :'SearchEcfReceptionRequestsTiposEcfsParameterInner',
    :'file_name' => :'String',
    :'fecha_hora_anulacione_ncf' => :'Time',
    :'created_on' => :'Time',
    :'updated_on' => :'Time',
    :'created_by' => :'String',
    :'updated_by' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 188

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      anulacion_id == o.anulacion_id &&
      tenant_id == o.tenant_id &&
      company_rnc == o.company_rnc &&
      cantidade_ncf_anulados == o.cantidade_ncf_anulados &&
      detalle_anulacion == o.detalle_anulacion &&
      response == o.response &&
      status_code == o.status_code &&
      file_name == o.file_name &&
      fecha_hora_anulacione_ncf == o.fecha_hora_anulacione_ncf &&
      created_on == o.created_on &&
      updated_on == o.updated_on &&
      created_by == o.created_by &&
      updated_by == o.updated_by
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


208
209
210
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 208

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



214
215
216
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 214

def hash
  [anulacion_id, tenant_id, company_rnc, cantidade_ncf_anulados, detalle_anulacion, response, status_code, file_name, fecha_hora_anulacione_ncf, created_on, updated_on, created_by, updated_by].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



173
174
175
176
177
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 173

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



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

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



181
182
183
184
# File 'lib/ecf_dgii/generated/models/anulacion_list_response.rb', line 181

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