Class: Nfe::StateTaxLegalEntity::StateTax
- Inherits:
-
Data
- Object
- Data
- Nfe::StateTaxLegalEntity::StateTax
- Defined in:
- lib/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rb,
sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs
Overview
A single state-tax registration (Inscrição Estadual) within
stateTaxes. Carries its own status, dates, code, address and the
per-document contributor indicators.
Instance Attribute Summary collapse
-
#additional_information ⇒ String?
readonly
Returns the value of attribute additional_information.
-
#address ⇒ Nfe::StateTaxLegalEntity::Address?
readonly
Returns the value of attribute address.
-
#closed_on ⇒ String?
readonly
Returns the value of attribute closed_on.
-
#code ⇒ String?
readonly
Returns the value of attribute code.
-
#cte ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo?
readonly
Returns the value of attribute cte.
-
#economic_activities ⇒ Object
readonly
Returns the value of attribute economic_activities.
-
#nfce ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo?
readonly
Returns the value of attribute nfce.
-
#nfe ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo?
readonly
Returns the value of attribute nfe.
-
#nfse ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo?
readonly
Returns the value of attribute nfse.
-
#opened_on ⇒ String?
readonly
Returns the value of attribute opened_on.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_on ⇒ String?
readonly
Returns the value of attribute status_on.
-
#tax_number ⇒ String?
readonly
Returns the value of attribute tax_number.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ StateTax
constructor
A new instance of StateTax.
Constructor Details
#initialize ⇒ StateTax
Returns a new instance of StateTax.
53 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 53
def initialize: (status: untyped, tax_number: String?, status_on: String?, opened_on: String?, closed_on: String?, additional_information: String?, code: String?, address: Nfe::StateTaxLegalEntity::Address?, economic_activities: untyped, nfe: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, nfse: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, cte: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, nfce: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?) -> void
|
Instance Attribute Details
#additional_information ⇒ String? (readonly)
Returns the value of attribute additional_information.
42 43 44 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 42 def additional_information @additional_information end |
#address ⇒ Nfe::StateTaxLegalEntity::Address? (readonly)
Returns the value of attribute address.
44 45 46 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 44 def address @address end |
#closed_on ⇒ String? (readonly)
Returns the value of attribute closed_on.
41 42 43 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 41 def closed_on @closed_on end |
#code ⇒ String? (readonly)
Returns the value of attribute code.
43 44 45 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 43 def code @code end |
#cte ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo? (readonly)
Returns the value of attribute cte.
48 49 50 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 48 def cte @cte end |
#economic_activities ⇒ Object (readonly)
Returns the value of attribute economic_activities.
45 46 47 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 45 def economic_activities @economic_activities end |
#nfce ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo? (readonly)
Returns the value of attribute nfce.
49 50 51 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 49 def nfce @nfce end |
#nfe ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo? (readonly)
Returns the value of attribute nfe.
46 47 48 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 46 def nfe @nfe end |
#nfse ⇒ Nfe::StateTaxLegalEntity::FiscalDocumentInfo? (readonly)
Returns the value of attribute nfse.
47 48 49 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 47 def nfse @nfse end |
#opened_on ⇒ String? (readonly)
Returns the value of attribute opened_on.
40 41 42 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 40 def opened_on @opened_on end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
37 38 39 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 37 def status @status end |
#status_on ⇒ String? (readonly)
Returns the value of attribute status_on.
39 40 41 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 39 def status_on @status_on end |
#tax_number ⇒ String? (readonly)
Returns the value of attribute tax_number.
38 39 40 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 38 def tax_number @tax_number end |
Class Method Details
.from_api(payload) ⇒ Nfe::StateTaxLegalEntity::StateTax?
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rb', line 87 def self.from_api(payload) return nil if payload.nil? new( status: payload["status"], tax_number: payload["taxNumber"]&.to_s, status_on: payload["statusOn"], opened_on: payload["openedOn"], closed_on: payload["closedOn"], additional_information: payload["additionalInformation"], code: payload["code"]&.to_s, address: Address.from_api(payload["address"]), economic_activities: (payload["economicActivities"] || []).map { |a| EconomicActivity.from_api(a) }, nfe: FiscalDocumentInfo.from_api(payload["nfe"]), nfse: FiscalDocumentInfo.from_api(payload["nfse"]), cte: FiscalDocumentInfo.from_api(payload["cte"]), nfce: FiscalDocumentInfo.from_api(payload["nfce"]) ) end |
.new ⇒ instance
52 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 52
def self.new: (status: untyped, tax_number: String?, status_on: String?, opened_on: String?, closed_on: String?, additional_information: String?, code: String?, address: Nfe::StateTaxLegalEntity::Address?, economic_activities: untyped, nfe: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, nfse: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, cte: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?, nfce: Nfe::StateTaxLegalEntity::FiscalDocumentInfo?) -> instance
|