Class: Nfe::LegalEntityStateTaxForInvoiceResponse
- Inherits:
-
Data
- Object
- Data
- Nfe::LegalEntityStateTaxForInvoiceResponse
- Defined in:
- lib/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rb,
sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs
Overview
Immutable wrapper for a stateTaxForInvoice / stateTaxSuggestedForInvoice
lookup response. Same legalEntity state-tax shape as
LegalEntityStateTaxResponse; the per-IE status enum is extended for
invoice evaluation but the structure is identical.
Instance Attribute Summary collapse
-
#legal_entity ⇒ Nfe::StateTaxLegalEntity?
readonly
Returns the value of attribute legal_entity.
Class Method Summary collapse
-
.from_api(payload) ⇒ Nfe::LegalEntityStateTaxForInvoiceResponse?
nilwhenpayloadisnil. - .new ⇒ instance
Instance Method Summary collapse
-
#initialize ⇒ LegalEntityStateTaxForInvoiceResponse
constructor
A new instance of LegalEntityStateTaxForInvoiceResponse.
Constructor Details
#initialize ⇒ LegalEntityStateTaxForInvoiceResponse
Returns a new instance of LegalEntityStateTaxForInvoiceResponse.
59 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 59
def initialize: (legal_entity: Nfe::StateTaxLegalEntity?) -> void
|
Instance Attribute Details
#legal_entity ⇒ Nfe::StateTaxLegalEntity? (readonly)
Returns the value of attribute legal_entity.
53 54 55 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 53 def legal_entity @legal_entity end |
Class Method Details
.from_api(payload) ⇒ Nfe::LegalEntityStateTaxForInvoiceResponse?
Returns nil when payload is nil.
103 104 105 106 107 108 109 |
# File 'lib/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rb', line 103 def self.from_api(payload) return nil if payload.nil? new( legal_entity: Nfe::StateTaxLegalEntity.from_api(payload["legalEntity"] || payload) ) end |
.new ⇒ instance
57 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 57
def self.new: (legal_entity: Nfe::StateTaxLegalEntity?) -> instance
|