Class: Nfe::Generated::NfConsumidorV2::ISTaxResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfConsumidorV2::ISTaxResource
- Defined in:
- lib/nfe/generated/nf_consumidor_v2/istax_resource.rb,
sig/nfe/generated/nf_consumidor_v2/istax_resource.rbs
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#basis ⇒ Object
readonly
Returns the value of attribute basis.
-
#classification_code ⇒ Object
readonly
Returns the value of attribute classification_code.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
-
#situation_code ⇒ Object
readonly
Returns the value of attribute situation_code.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
-
#unit_rate ⇒ Object
readonly
Returns the value of attribute unit_rate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ISTaxResource
constructor
A new instance of ISTaxResource.
Constructor Details
#initialize ⇒ ISTaxResource
Returns a new instance of ISTaxResource.
18 |
# File 'sig/nfe/generated/nf_consumidor_v2/istax_resource.rbs', line 18
def initialize: (?amount: Float?, ?basis: Float?, ?classification_code: String?, ?quantity: Float?, ?rate: Float?, ?situation_code: String?, ?unit: String?, ?unit_rate: Float?) -> void
|
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def amount @amount end |
#basis ⇒ Object (readonly)
Returns the value of attribute basis
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def basis @basis end |
#classification_code ⇒ Object (readonly)
Returns the value of attribute classification_code
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def classification_code @classification_code end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def quantity @quantity end |
#rate ⇒ Object (readonly)
Returns the value of attribute rate
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def rate @rate end |
#situation_code ⇒ Object (readonly)
Returns the value of attribute situation_code
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def situation_code @situation_code end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def unit @unit end |
#unit_rate ⇒ Object (readonly)
Returns the value of attribute unit_rate
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 9 def unit_rate @unit_rate end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/nfe/generated/nf_consumidor_v2/istax_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( amount: payload["amount"], basis: payload["basis"], classification_code: payload["classificationCode"], quantity: payload["quantity"], rate: payload["rate"], situation_code: payload["situationCode"], unit: payload["unit"], unit_rate: payload["unitRate"], ) end |
.new ⇒ instance
17 |
# File 'sig/nfe/generated/nf_consumidor_v2/istax_resource.rbs', line 17
def self.new: (?amount: Float?, ?basis: Float?, ?classification_code: String?, ?quantity: Float?, ?rate: Float?, ?situation_code: String?, ?unit: String?, ?unit_rate: Float?) -> instance
|