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
15
16
17
18
19
20
21
22
23
24
# File 'lib/models/transport.rb', line 6

def initialize(options = {})
  @cnpj         = options[:cnpj]
  @company_name = options[:company_name]
  @ie           = options[:ie]
  @cpf          = options[:cpf]
  @name         = options[:name]
  @address      = options[:address]
  @uf           = options[:uf]
  @city         = options[:city]
  @cep          = options[:cep]
  @board        = options[:board]
  @uf_vehicle   = options[:uf_vehicle]
  @rntc         = options[:rntc]
  @volume       = options[:volume]
  @kind         = options[:kind]
  @mark         = options[:mark]
  @numeration   = options[:numeration]
  @seals        = options[:seals]
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



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/models/transport.rb', line 26

def to_hash
  {
    cnpj: @cnpj,
    razao_social: @company_name,
    ie: @ie,
    cpf: @cpf,
    nome_completo: @name,
    endereco: @address,
    uf: @uf,
    cidade: @city,
    cep: @cep,
    placa: @board,
    uf_veiculo: @uf_vehicle,
    rntc: @rntc,
    volume: @volume,
    especie: @kind,
    mark: @mark,
    numeracao: @numeration,
    lacres: @seals
  }
end