Class: Nfe::Generated::NfConsumidorV2::GovernmentPurchaseResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfConsumidorV2::GovernmentPurchaseResource
- Defined in:
- lib/nfe/generated/nf_consumidor_v2/government_purchase_resource.rb,
sig/nfe/generated/nf_consumidor_v2/government_purchase_resource.rbs
Instance Attribute Summary collapse
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
-
#rate_reduction ⇒ Object
readonly
Returns the value of attribute rate_reduction.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ GovernmentPurchaseResource
constructor
A new instance of GovernmentPurchaseResource.
Constructor Details
#initialize ⇒ GovernmentPurchaseResource
Returns a new instance of GovernmentPurchaseResource.
13 |
# File 'sig/nfe/generated/nf_consumidor_v2/government_purchase_resource.rbs', line 13
def initialize: (?entity_type: untyped, ?operation_type: untyped, ?rate_reduction: Float?) -> void
|
Instance Attribute Details
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/government_purchase_resource.rb', line 9 def entity_type @entity_type end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/government_purchase_resource.rb', line 9 def operation_type @operation_type end |
#rate_reduction ⇒ Object (readonly)
Returns the value of attribute rate_reduction
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/government_purchase_resource.rb', line 9 def rate_reduction @rate_reduction end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 |
# File 'lib/nfe/generated/nf_consumidor_v2/government_purchase_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( entity_type: payload["entityType"], operation_type: payload["operationType"], rate_reduction: payload["rateReduction"], ) end |
.new ⇒ instance
12 |
# File 'sig/nfe/generated/nf_consumidor_v2/government_purchase_resource.rbs', line 12
def self.new: (?entity_type: untyped, ?operation_type: untyped, ?rate_reduction: Float?) -> instance
|