Class: Nfe::Generated::NfProdutoV2::ReboqueResource

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/nf_produto_v2/reboque_resource.rb,
sig/nfe/generated/nf_produto_v2/reboque_resource.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReboqueResource

Returns a new instance of ReboqueResource.

Parameters:

  • ferry: (String, nil)
  • plate: (String, nil)
  • rntc: (String, nil)
  • uf: (String, nil)
  • wagon: (String, nil)


15
# File 'sig/nfe/generated/nf_produto_v2/reboque_resource.rbs', line 15

def initialize: (?ferry: String?, ?plate: String?, ?rntc: String?, ?uf: String?, ?wagon: String?) -> void

Instance Attribute Details

#ferryObject (readonly)

Returns the value of attribute ferry

Returns:

  • (Object)

    the current value of ferry



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 9

def ferry
  @ferry
end

#plateObject (readonly)

Returns the value of attribute plate

Returns:

  • (Object)

    the current value of plate



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 9

def plate
  @plate
end

#rntcObject (readonly)

Returns the value of attribute rntc

Returns:

  • (Object)

    the current value of rntc



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 9

def rntc
  @rntc
end

#ufObject (readonly)

Returns the value of attribute uf

Returns:

  • (Object)

    the current value of uf



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 9

def uf
  @uf
end

#wagonObject (readonly)

Returns the value of attribute wagon

Returns:

  • (Object)

    the current value of wagon



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 9

def wagon
  @wagon
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
18
19
20
# File 'lib/nfe/generated/nf_produto_v2/reboque_resource.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    ferry: payload["ferry"],
    plate: payload["plate"],
    rntc: payload["rntc"],
    uf: payload["uf"],
    wagon: payload["wagon"],
  )
end

.newinstance

Parameters:

  • ferry: (String, nil)
  • plate: (String, nil)
  • rntc: (String, nil)
  • uf: (String, nil)
  • wagon: (String, nil)

Returns:

  • (instance)


14
# File 'sig/nfe/generated/nf_produto_v2/reboque_resource.rbs', line 14

def self.new: (?ferry: String?, ?plate: String?, ?rntc: String?, ?uf: String?, ?wagon: String?) -> instance