Class: Nfe::LegalEntityBasicInfoResponse
- Inherits:
-
Data
- Object
- Data
- Nfe::LegalEntityBasicInfoResponse
- 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 basicInfo lookup response.
Instance Attribute Summary collapse
-
#legal_entity ⇒ Nfe::LegalEntity?
readonly
Returns the value of attribute legal_entity.
Class Method Summary collapse
-
.from_api(payload) ⇒ Nfe::LegalEntityBasicInfoResponse?
nilwhenpayloadisnil. - .new ⇒ instance
Instance Method Summary collapse
-
#initialize ⇒ LegalEntityBasicInfoResponse
constructor
A new instance of LegalEntityBasicInfoResponse.
Constructor Details
#initialize ⇒ LegalEntityBasicInfoResponse
Returns a new instance of LegalEntityBasicInfoResponse.
39 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 39
def initialize: (legal_entity: Nfe::LegalEntity?) -> void
|
Instance Attribute Details
#legal_entity ⇒ Nfe::LegalEntity? (readonly)
Returns the value of attribute legal_entity.
33 34 35 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 33 def legal_entity @legal_entity end |
Class Method Details
.from_api(payload) ⇒ Nfe::LegalEntityBasicInfoResponse?
Returns nil when payload is nil.
72 73 74 75 76 77 78 |
# File 'lib/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rb', line 72 def self.from_api(payload) return nil if payload.nil? new( legal_entity: Nfe::LegalEntity.from_api(payload["legalEntity"] || payload) ) end |
.new ⇒ instance
37 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/legal_entity_responses.rbs', line 37
def self.new: (legal_entity: Nfe::LegalEntity?) -> instance
|