Class: Hcp::Address

Inherits:
Resource show all
Defined in:
lib/hcp/resources/address.rb

Overview

Where a customer is billed, or where the work happens.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

amount, attribute, #id, #initialize, timestamp

Constructor Details

This class inherits a constructor from Hcp::Resource

Class Method Details

.keyObject

What Housecall Pro calls a page of a customer's addresses.



5
# File 'lib/hcp/resources/address.rb', line 5

def self.key = 'addresses'

Instance Method Details

#cityString?

Returns the city, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the city, as Housecall Pro answers it.



9
# File 'lib/hcp/resources/address.rb', line 9

attribute :city

#countryString?

Returns the country, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the country, as Housecall Pro answers it.



12
# File 'lib/hcp/resources/address.rb', line 12

attribute :country

#latitudeFloat, ...

Returns:

  • (Float, nil)

    how far north the address is, where Housecall Pro placed it.

  • (String, nil)

    the latitude, as Housecall Pro answers it.



15
# File 'lib/hcp/resources/address.rb', line 15

attribute :latitude

#longitudeFloat, ...

Returns:

  • (Float, nil)

    how far east the address is, where Housecall Pro placed it.

  • (String, nil)

    the longitude, as Housecall Pro answers it.



18
# File 'lib/hcp/resources/address.rb', line 18

attribute :longitude

#stateString?

Returns the state, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the state, as Housecall Pro answers it.



10
# File 'lib/hcp/resources/address.rb', line 10

attribute :state

#streetString?

Returns the street, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the street, as Housecall Pro answers it.



7
# File 'lib/hcp/resources/address.rb', line 7

attribute :street

#street_line_2String?

Returns the street_line_2, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the street_line_2, as Housecall Pro answers it.



8
# File 'lib/hcp/resources/address.rb', line 8

attribute :street_line_2

#typeSymbol?

Returns :billing or :service.

Returns:

  • (Symbol, nil)

    :billing or :service.



21
# File 'lib/hcp/resources/address.rb', line 21

def type = @node['type']&.to_sym

#zipString?

Returns the zip, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the zip, as Housecall Pro answers it.



11
# File 'lib/hcp/resources/address.rb', line 11

attribute :zip