Class: Nfe::Generated::NfProdutoV2::TransportVehicleResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransportVehicleResource

Returns a new instance of TransportVehicleResource.

Parameters:

  • plate: (String, nil)
  • rntc: (String, nil)
  • state: (String, nil)


13
# File 'sig/nfe/generated/nf_produto_v2/transport_vehicle_resource.rbs', line 13

def initialize: (?plate: String?, ?rntc: String?, ?state: String?) -> void

Instance Attribute Details

#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/transport_vehicle_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/transport_vehicle_resource.rb', line 9

def rntc
  @rntc
end

#stateObject (readonly)

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



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

def state
  @state
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
# File 'lib/nfe/generated/nf_produto_v2/transport_vehicle_resource.rb', line 10

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

  new(
    plate: payload["plate"],
    rntc: payload["rntc"],
    state: payload["state"],
  )
end

.newinstance

Parameters:

  • plate: (String, nil)
  • rntc: (String, nil)
  • state: (String, nil)

Returns:

  • (instance)


12
# File 'sig/nfe/generated/nf_produto_v2/transport_vehicle_resource.rbs', line 12

def self.new: (?plate: String?, ?rntc: String?, ?state: String?) -> instance