Class: Nfe::Generated::ProductInvoiceRtcV1::TransportInformationResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransportInformationResource

Returns a new instance of TransportInformationResource.

Parameters:



17
# File 'sig/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rbs', line 17

def initialize: (?freight_modality: untyped, ?reboque: ReboqueResource, ?seal_number: String?, ?transp_rate: TransportRateResource, ?transport_group: TransportGroupResource, ?transport_vehicle: TransportVehicleResource, ?volume: VolumeResource) -> void

Instance Attribute Details

#freight_modalityObject (readonly)

Returns the value of attribute freight_modality

Returns:

  • (Object)

    the current value of freight_modality



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def freight_modality
  @freight_modality
end

#reboqueObject (readonly)

Returns the value of attribute reboque

Returns:

  • (Object)

    the current value of reboque



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def reboque
  @reboque
end

#seal_numberObject (readonly)

Returns the value of attribute seal_number

Returns:

  • (Object)

    the current value of seal_number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def seal_number
  @seal_number
end

#transp_rateObject (readonly)

Returns the value of attribute transp_rate

Returns:

  • (Object)

    the current value of transp_rate



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def transp_rate
  @transp_rate
end

#transport_groupObject (readonly)

Returns the value of attribute transport_group

Returns:

  • (Object)

    the current value of transport_group



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def transport_group
  @transport_group
end

#transport_vehicleObject (readonly)

Returns the value of attribute transport_vehicle

Returns:

  • (Object)

    the current value of transport_vehicle



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def transport_vehicle
  @transport_vehicle
end

#volumeObject (readonly)

Returns the value of attribute volume

Returns:

  • (Object)

    the current value of volume



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 9

def volume
  @volume
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
21
22
# File 'lib/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rb', line 10

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

  new(
    freight_modality: payload["freightModality"],
    reboque: ReboqueResource.from_api(payload["reboque"]),
    seal_number: payload["sealNumber"],
    transp_rate: TransportRateResource.from_api(payload["transpRate"]),
    transport_group: TransportGroupResource.from_api(payload["transportGroup"]),
    transport_vehicle: TransportVehicleResource.from_api(payload["transportVehicle"]),
    volume: VolumeResource.from_api(payload["volume"]),
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


16
# File 'sig/nfe/generated/product_invoice_rtc_v1/transport_information_resource.rbs', line 16

def self.new: (?freight_modality: untyped, ?reboque: ReboqueResource, ?seal_number: String?, ?transp_rate: TransportRateResource, ?transport_group: TransportGroupResource, ?transport_vehicle: TransportVehicleResource, ?volume: VolumeResource) -> instance