Class: Nfe::Generated::NfProdutoV2::FuelResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfProdutoV2::FuelResource
- Defined in:
- lib/nfe/generated/nf_produto_v2/fuel_resource.rb,
sig/nfe/generated/nf_produto_v2/fuel_resource.rbs
Instance Attribute Summary collapse
-
#amount_temp ⇒ Object
readonly
Returns the value of attribute amount_temp.
-
#cide ⇒ Object
readonly
Returns the value of attribute cide.
-
#code_anp ⇒ Object
readonly
Returns the value of attribute code_anp.
-
#codif ⇒ Object
readonly
Returns the value of attribute codif.
-
#description_anp ⇒ Object
readonly
Returns the value of attribute description_anp.
-
#fuel_origin ⇒ Object
readonly
Returns the value of attribute fuel_origin.
-
#percentage_glp ⇒ Object
readonly
Returns the value of attribute percentage_glp.
-
#percentage_gni ⇒ Object
readonly
Returns the value of attribute percentage_gni.
-
#percentage_ng ⇒ Object
readonly
Returns the value of attribute percentage_ng.
-
#percentage_ngn ⇒ Object
readonly
Returns the value of attribute percentage_ngn.
-
#pump ⇒ Object
readonly
Returns the value of attribute pump.
-
#starting_amount ⇒ Object
readonly
Returns the value of attribute starting_amount.
-
#state_buyer ⇒ Object
readonly
Returns the value of attribute state_buyer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ FuelResource
constructor
A new instance of FuelResource.
Constructor Details
#initialize ⇒ FuelResource
Returns a new instance of FuelResource.
23 |
# File 'sig/nfe/generated/nf_produto_v2/fuel_resource.rbs', line 23
def initialize: (?amount_temp: Float?, ?cide: CIDEResource, ?code_anp: String?, ?codif: String?, ?description_anp: String?, ?fuel_origin: FuelOriginResource, ?percentage_glp: Float?, ?percentage_gni: Float?, ?percentage_ng: Float?, ?percentage_ngn: Float?, ?pump: PumpResource, ?starting_amount: Float?, ?state_buyer: String?) -> void
|
Instance Attribute Details
#amount_temp ⇒ Object (readonly)
Returns the value of attribute amount_temp
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def amount_temp @amount_temp end |
#cide ⇒ Object (readonly)
Returns the value of attribute cide
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def cide @cide end |
#code_anp ⇒ Object (readonly)
Returns the value of attribute code_anp
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def code_anp @code_anp end |
#codif ⇒ Object (readonly)
Returns the value of attribute codif
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def codif @codif end |
#description_anp ⇒ Object (readonly)
Returns the value of attribute description_anp
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def description_anp @description_anp end |
#fuel_origin ⇒ Object (readonly)
Returns the value of attribute fuel_origin
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def fuel_origin @fuel_origin end |
#percentage_glp ⇒ Object (readonly)
Returns the value of attribute percentage_glp
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def percentage_glp @percentage_glp end |
#percentage_gni ⇒ Object (readonly)
Returns the value of attribute percentage_gni
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def percentage_gni @percentage_gni end |
#percentage_ng ⇒ Object (readonly)
Returns the value of attribute percentage_ng
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def percentage_ng @percentage_ng end |
#percentage_ngn ⇒ Object (readonly)
Returns the value of attribute percentage_ngn
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def percentage_ngn @percentage_ngn end |
#pump ⇒ Object (readonly)
Returns the value of attribute pump
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def pump @pump end |
#starting_amount ⇒ Object (readonly)
Returns the value of attribute starting_amount
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def starting_amount @starting_amount end |
#state_buyer ⇒ Object (readonly)
Returns the value of attribute state_buyer
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 9 def state_buyer @state_buyer end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nfe/generated/nf_produto_v2/fuel_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( amount_temp: payload["amountTemp"], cide: CIDEResource.from_api(payload["cide"]), code_anp: payload["codeANP"], codif: payload["codif"], description_anp: payload["descriptionANP"], fuel_origin: FuelOriginResource.from_api(payload["fuelOrigin"]), percentage_glp: payload["percentageGLP"], percentage_gni: payload["percentageGNi"], percentage_ng: payload["percentageNG"], percentage_ngn: payload["percentageNGn"], pump: PumpResource.from_api(payload["pump"]), starting_amount: payload["startingAmount"], state_buyer: payload["stateBuyer"], ) end |
.new ⇒ instance
22 |
# File 'sig/nfe/generated/nf_produto_v2/fuel_resource.rbs', line 22
def self.new: (?amount_temp: Float?, ?cide: CIDEResource, ?code_anp: String?, ?codif: String?, ?description_anp: String?, ?fuel_origin: FuelOriginResource, ?percentage_glp: Float?, ?percentage_gni: Float?, ?percentage_ng: Float?, ?percentage_ngn: Float?, ?pump: PumpResource, ?starting_amount: Float?, ?state_buyer: String?) -> instance
|