Class: BloomApi::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/bloom_api/address.rb

Overview

An address object containing the availabile data of business or practice addresses in Bloom API

Instance Method Summary collapse

Constructor Details

#initialize(raw_address) ⇒ Address

Creats a new BloomApi::Address

Parameters:

  • A (Hash)

    hash representation of a JSON address as it would be returned from the Bloom API



11
12
13
# File 'lib/bloom_api/address.rb', line 11

def initialize raw_address
  @raw_address = raw_address
end

Instance Method Details

#cityString

Returns The address’s city.

Returns:

  • (String)

    The address’s city



16
17
18
# File 'lib/bloom_api/address.rb', line 16

def city
  @raw_address['city']
end

#countryString

Returns The address’s country code.

Returns:

  • (String)

    The address’s country code



21
22
23
# File 'lib/bloom_api/address.rb', line 21

def country
  @raw_address['country_code']
end

#faxString

Returns The fax number for the address.

Returns:

  • (String)

    The fax number for the address



26
27
28
# File 'lib/bloom_api/address.rb', line 26

def fax
  @raw_address['fax']
end

#line1String

Returns Line 1 of the address.

Returns:

  • (String)

    Line 1 of the address



31
32
33
# File 'lib/bloom_api/address.rb', line 31

def line1
  @raw_address['address_line']
end

#line2String

Returns Line 2 of the address.

Returns:

  • (String)

    Line 2 of the address



36
37
38
# File 'lib/bloom_api/address.rb', line 36

def line2
  @raw_address['address_details_line']
end

#phoneString

Returns The contact phone number for the address.

Returns:

  • (String)

    The contact phone number for the address



41
42
43
# File 'lib/bloom_api/address.rb', line 41

def phone
  @raw_address['phone']
end

#stateString

Returns The 2-digit state code for the address.

Returns:

  • (String)

    The 2-digit state code for the address



46
47
48
# File 'lib/bloom_api/address.rb', line 46

def state
  @raw_address['state']
end

#zipString

Returns The zip code for the address.

Returns:

  • (String)

    The zip code for the address



51
52
53
# File 'lib/bloom_api/address.rb', line 51

def zip
  @raw_address['zip']
end