Class: WebmaniabrNfeRuby::Models::Transport

Inherits:
Object
  • Object
show all
Defined in:
lib/models/transport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Transport

Returns a new instance of Transport.



6
7
8
9
10
11
12
13
14
# File 'lib/models/transport.rb', line 6

def initialize(options = {})
  @cnpj         = options[:cnpj]
  @company_name = options[:company_name]
  @ie           = options[:ie]
  @address      = options[:address]
  @uf           = options[:uf]
  @city         = options[:city]
  @cep          = options[:cep]
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



4
5
6
# File 'lib/models/transport.rb', line 4

def address
  @address
end

#cepObject

Returns the value of attribute cep.



4
5
6
# File 'lib/models/transport.rb', line 4

def cep
  @cep
end

#cityObject

Returns the value of attribute city.



4
5
6
# File 'lib/models/transport.rb', line 4

def city
  @city
end

#cnpjObject

Returns the value of attribute cnpj.



4
5
6
# File 'lib/models/transport.rb', line 4

def cnpj
  @cnpj
end

#company_nameObject

Returns the value of attribute company_name.



4
5
6
# File 'lib/models/transport.rb', line 4

def company_name
  @company_name
end

#ieObject

Returns the value of attribute ie.



4
5
6
# File 'lib/models/transport.rb', line 4

def ie
  @ie
end

#ufObject

Returns the value of attribute uf.



4
5
6
# File 'lib/models/transport.rb', line 4

def uf
  @uf
end

Instance Method Details

#to_hashObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/models/transport.rb', line 16

def to_hash
  {
    cnpj: @cnpj,
    razao_social: @company_name,
    ie: @ie,
    endereco: @address,
    uf: @uf,
    cidade: @city,
    cep: @cep
  }
end