Class: Facturae::Address
- Inherits:
-
Object
- Object
- Facturae::Address
- Includes:
- Validatable
- Defined in:
- lib/facturae/models/address.rb
Overview
Represents an address.
Constant Summary collapse
- ESP_CC =
"ESP"- COUNTRY_CODES =
%w[AUT BEL BGR CYP CZE DEU DNK ESP EST FIN FRA GRC HRV HUN IRL ITA LTU LUX LVA MLT NLD POL PRT ROU SVK SVN SWE].freeze
Instance Attribute Summary collapse
-
#address ⇒ String
The address.
-
#country_code ⇒ String
The country code.
-
#post_code ⇒ String
The post code.
-
#province ⇒ String
The province.
-
#town ⇒ String
The town.
Instance Method Summary collapse
-
#initialize(address:, post_code:, province:, country_code:, town: nil) ⇒ Address
constructor
A new instance of Address.
Methods included from Validatable
Constructor Details
#initialize(address:, post_code:, province:, country_code:, town: nil) ⇒ Address
Returns a new instance of Address.
24 25 26 27 28 29 30 |
# File 'lib/facturae/models/address.rb', line 24 def initialize(address:, post_code:, province:, country_code:, town: nil) @address = address @post_code = post_code @town = town @province = province @country_code = country_code end |
Instance Attribute Details
#address ⇒ String
The address.
10 11 12 |
# File 'lib/facturae/models/address.rb', line 10 def address @address end |
#country_code ⇒ String
The country code.
10 11 12 |
# File 'lib/facturae/models/address.rb', line 10 def country_code @country_code end |
#post_code ⇒ String
The post code.
10 11 12 |
# File 'lib/facturae/models/address.rb', line 10 def post_code @post_code end |
#province ⇒ String
The province.
10 11 12 |
# File 'lib/facturae/models/address.rb', line 10 def province @province end |
#town ⇒ String
The town.
10 11 12 |
# File 'lib/facturae/models/address.rb', line 10 def town @town end |