Class: Nfe::StateTaxLegalEntity::EconomicActivity
- Inherits:
-
Data
- Object
- Data
- Nfe::StateTaxLegalEntity::EconomicActivity
- 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
Economic activity (CNAE) nested inside a state-tax registration.
Instance Attribute Summary collapse
-
#code ⇒ String?
readonly
Returns the value of attribute code.
-
#description ⇒ String?
readonly
Returns the value of attribute description.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ EconomicActivity
constructor
A new instance of EconomicActivity.
Constructor Details
#initialize ⇒ EconomicActivity
Returns a new instance of EconomicActivity.
24 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 24
def initialize: (type: untyped, code: String?, description: String?) -> void
|
Instance Attribute Details
#code ⇒ String? (readonly)
Returns the value of attribute code.
19 20 21 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 19 def code @code end |
#description ⇒ String? (readonly)
Returns the value of attribute description.
20 21 22 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 20 def description @description end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
18 19 20 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 18 def type @type end |
Class Method Details
.from_api(payload) ⇒ Nfe::StateTaxLegalEntity::EconomicActivity?
45 46 47 48 49 50 51 52 53 |
# File 'lib/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rb', line 45 def self.from_api(payload) return nil if payload.nil? new( type: payload["type"], code: payload["code"]&.to_s, description: payload["description"] ) end |
.new ⇒ instance
23 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 23
def self.new: (type: untyped, code: String?, description: String?) -> instance
|