Class: Nfe::Generated::NfProdutoV2::VolumeResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfProdutoV2::VolumeResource
- Defined in:
- lib/nfe/generated/nf_produto_v2/volume_resource.rb,
sig/nfe/generated/nf_produto_v2/volume_resource.rbs
Instance Attribute Summary collapse
-
#brand ⇒ Object
readonly
Returns the value of attribute brand.
-
#gross_weight ⇒ Object
readonly
Returns the value of attribute gross_weight.
-
#net_weight ⇒ Object
readonly
Returns the value of attribute net_weight.
-
#species ⇒ Object
readonly
Returns the value of attribute species.
-
#volume_numeration ⇒ Object
readonly
Returns the value of attribute volume_numeration.
-
#volume_quantity ⇒ Object
readonly
Returns the value of attribute volume_quantity.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ VolumeResource
constructor
A new instance of VolumeResource.
Constructor Details
#initialize ⇒ VolumeResource
Returns a new instance of VolumeResource.
16 |
# File 'sig/nfe/generated/nf_produto_v2/volume_resource.rbs', line 16
def initialize: (?brand: String?, ?gross_weight: Float?, ?net_weight: Float?, ?species: String?, ?volume_numeration: String?, ?volume_quantity: Integer?) -> void
|
Instance Attribute Details
#brand ⇒ Object (readonly)
Returns the value of attribute brand
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def brand @brand end |
#gross_weight ⇒ Object (readonly)
Returns the value of attribute gross_weight
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def gross_weight @gross_weight end |
#net_weight ⇒ Object (readonly)
Returns the value of attribute net_weight
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def net_weight @net_weight end |
#species ⇒ Object (readonly)
Returns the value of attribute species
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def species @species end |
#volume_numeration ⇒ Object (readonly)
Returns the value of attribute volume_numeration
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def volume_numeration @volume_numeration end |
#volume_quantity ⇒ Object (readonly)
Returns the value of attribute volume_quantity
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 9 def volume_quantity @volume_quantity end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nfe/generated/nf_produto_v2/volume_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( brand: payload["brand"], gross_weight: payload["grossWeight"], net_weight: payload["netWeight"], species: payload["species"], volume_numeration: payload["volumeNumeration"], volume_quantity: payload["volumeQuantity"], ) end |
.new ⇒ instance
15 |
# File 'sig/nfe/generated/nf_produto_v2/volume_resource.rbs', line 15
def self.new: (?brand: String?, ?gross_weight: Float?, ?net_weight: Float?, ?species: String?, ?volume_numeration: String?, ?volume_quantity: Integer?) -> instance
|