Class: PostcodeValidation::Domain::AddressDetail
- Inherits:
-
Object
- Object
- PostcodeValidation::Domain::AddressDetail
- Defined in:
- lib/postcode_validation/domain/address_detail.rb
Instance Method Summary collapse
- #address_line_1 ⇒ Object
- #address_line_2 ⇒ Object
- #city ⇒ Object
- #company ⇒ Object
- #country ⇒ Object
-
#initialize(result:) ⇒ AddressDetail
constructor
A new instance of AddressDetail.
- #postcode ⇒ Object
Constructor Details
#initialize(result:) ⇒ AddressDetail
Returns a new instance of AddressDetail.
4 5 6 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 4 def initialize(result:) @result = result end |
Instance Method Details
#address_line_1 ⇒ Object
12 13 14 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 12 def address_line_1 result['Line1'] end |
#address_line_2 ⇒ Object
16 17 18 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 16 def address_line_2 result['Line2'] end |
#city ⇒ Object
20 21 22 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 20 def city result['City'] end |
#company ⇒ Object
8 9 10 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 8 def company result['Company'] end |
#country ⇒ Object
24 25 26 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 24 def country result['CountryName'] end |
#postcode ⇒ Object
28 29 30 |
# File 'lib/postcode_validation/domain/address_detail.rb', line 28 def postcode result['PostalCode'] end |