Class: Nfe::StateTaxLegalEntity::Address
- Inherits:
-
Data
- Object
- Data
- Nfe::StateTaxLegalEntity::Address
- 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
Address nested inside a state-tax registration. Pragmatic subset of the address fields exposed by the state-tax endpoints.
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ String?
readonly
Returns the value of attribute country.
-
#district ⇒ String?
readonly
Returns the value of attribute district.
-
#number ⇒ String?
readonly
Returns the value of attribute number.
-
#postal_code ⇒ String?
readonly
Returns the value of attribute postal_code.
-
#state ⇒ String?
readonly
Returns the value of attribute state.
-
#street ⇒ String?
readonly
Returns the value of attribute street.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize ⇒ Address
Returns a new instance of Address.
14 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 14
def initialize: (street: String?, number: String?, district: String?, postal_code: String?, city: untyped, state: String?, country: String?) -> void
|
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
8 9 10 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 8 def city @city end |
#country ⇒ String? (readonly)
Returns the value of attribute country.
10 11 12 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 10 def country @country end |
#district ⇒ String? (readonly)
Returns the value of attribute district.
6 7 8 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 6 def district @district end |
#number ⇒ String? (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 5 def number @number end |
#postal_code ⇒ String? (readonly)
Returns the value of attribute postal_code.
7 8 9 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 7 def postal_code @postal_code end |
#state ⇒ String? (readonly)
Returns the value of attribute state.
9 10 11 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 9 def state @state end |
#street ⇒ String? (readonly)
Returns the value of attribute street.
4 5 6 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 4 def street @street end |
Class Method Details
.from_api(payload) ⇒ Nfe::StateTaxLegalEntity::Address?
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rb', line 28 def self.from_api(payload) return nil if payload.nil? new( street: payload["street"], number: payload["number"]&.to_s, district: payload["district"], postal_code: payload["postalCode"]&.to_s, city: payload["city"], state: payload["state"], country: payload["country"] ) end |
.new ⇒ instance
13 |
# File 'sig/nfe/resources/dto/legal_entity_lookup/state_tax_legal_entity.rbs', line 13
def self.new: (street: String?, number: String?, district: String?, postal_code: String?, city: untyped, state: String?, country: String?) -> instance
|