Class: EcfDgii::Generated::CompanyResponse

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



99
100
101
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
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 99

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

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

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

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

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

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

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

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

Instance Attribute Details

#created_byObject

Returns the value of attribute created_by.



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

def created_by
  @created_by
end

#created_onObject

Returns the value of attribute created_on.



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

def created_on
  @created_on
end

Returns the value of attribute legal_name.



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

def legal_name
  @legal_name
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#receptor_idObject

Returns the value of attribute receptor_id.



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

def receptor_id
  @receptor_id
end

#rncObject

Returns the value of attribute rnc.



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

def rnc
  @rnc
end

#tenant_idObject

Returns the value of attribute tenant_id.



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

def tenant_id
  @tenant_id
end

#updated_byObject

Returns the value of attribute updated_by.



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

def updated_by
  @updated_by
end

#updated_onObject

Returns the value of attribute updated_on.



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

def updated_on
  @updated_on
end

#url_aprobacion_comercialObject

Returns the value of attribute url_aprobacion_comercial.



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

def url_aprobacion_comercial
  @url_aprobacion_comercial
end

#url_autenticacionObject

Returns the value of attribute url_autenticacion.



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

def url_autenticacion
  @url_autenticacion
end

#url_recepcionObject

Returns the value of attribute url_recepcion.



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

def url_recepcion
  @url_recepcion
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



61
62
63
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 61

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



66
67
68
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 66

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'rnc' => :'rnc',
    :'legal_name' => :'legalName',
    :'name' => :'name',
    :'created_on' => :'createdOn',
    :'updated_on' => :'updatedOn',
    :'created_by' => :'createdBy',
    :'updated_by' => :'updatedBy',
    :'tenant_id' => :'tenantId',
    :'receptor_id' => :'receptorId',
    :'url_recepcion' => :'urlRecepcion',
    :'url_aprobacion_comercial' => :'urlAprobacionComercial',
    :'url_autenticacion' => :'urlAutenticacion'
  }
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



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 211

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



89
90
91
92
93
94
95
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 89

def self.openapi_nullable
  Set.new([
    :'url_recepcion',
    :'url_aprobacion_comercial',
    :'url_autenticacion'
  ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'rnc' => :'String',
    :'legal_name' => :'String',
    :'name' => :'String',
    :'created_on' => :'Time',
    :'updated_on' => :'Time',
    :'created_by' => :'String',
    :'updated_by' => :'String',
    :'tenant_id' => :'String',
    :'receptor_id' => :'String',
    :'url_recepcion' => :'String',
    :'url_aprobacion_comercial' => :'String',
    :'url_autenticacion' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 179

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      rnc == o.rnc &&
      legal_name == o.legal_name &&
      name == o.name &&
      created_on == o.created_on &&
      updated_on == o.updated_on &&
      created_by == o.created_by &&
      updated_by == o.updated_by &&
      tenant_id == o.tenant_id &&
      receptor_id == o.receptor_id &&
      url_recepcion == o.url_recepcion &&
      url_aprobacion_comercial == o.url_aprobacion_comercial &&
      url_autenticacion == o.url_autenticacion
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


198
199
200
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 198

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



204
205
206
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 204

def hash
  [rnc, legal_name, name, created_on, updated_on, created_by, updated_by, tenant_id, receptor_id, url_recepcion, url_aprobacion_comercial, url_autenticacion].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



164
165
166
167
168
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 164

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



233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 233

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



172
173
174
175
# File 'lib/ecf_dgii/generated/models/company_response.rb', line 172

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