Class: Starling::Resources::AddressResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::AddressResource
- Defined in:
- lib/starling/resources/address_resource.rb
Overview
A resource representing an address in the response from the Addresses API
Instance Method Summary collapse
-
#city ⇒ String
The city where the address is located.
-
#country ⇒ String
The country where the addresses is located (e.g. “GBR”).
-
#postcode ⇒ String
The postcode of the address.
-
#street_address ⇒ String
The street address of the address.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#city ⇒ String
Returns the city where the address is located.
6 7 8 |
# File 'lib/starling/resources/address_resource.rb', line 6 def city parsed_data['city'] end |
#country ⇒ String
Returns the country where the addresses is located (e.g. “GBR”).
11 12 13 |
# File 'lib/starling/resources/address_resource.rb', line 11 def country parsed_data['country'] end |
#postcode ⇒ String
Returns the postcode of the address.
16 17 18 |
# File 'lib/starling/resources/address_resource.rb', line 16 def postcode parsed_data['postcode'] end |
#street_address ⇒ String
Returns the street address of the address.
21 22 23 |
# File 'lib/starling/resources/address_resource.rb', line 21 def street_address parsed_data['streetAddress'] end |