Class: Starling::Resources::AddressResource

Inherits:
BaseResource show all
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

Methods inherited from BaseResource

#initialize

Constructor Details

This class inherits a constructor from Starling::Resources::BaseResource

Instance Method Details

#cityString

Returns the city where the address is located.

Returns:

  • (String)

    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

#countryString

Returns the country where the addresses is located (e.g. “GBR”).

Returns:

  • (String)

    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

#postcodeString

Returns the postcode of the address.

Returns:

  • (String)

    the postcode of the address


16
17
18
# File 'lib/starling/resources/address_resource.rb', line 16

def postcode
  parsed_data['postcode']
end

#street_addressString

Returns the street address of the address.

Returns:

  • (String)

    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