Class: Hcp::Estimate::Option

Inherits:
Resource show all
Includes:
Timestamped
Defined in:
lib/hcp/resources/estimate/option.rb

Overview

One of the things a customer was offered on an estimate, priced on its own.

Instance Method Summary collapse

Methods included from Timestamped

#created_at, #updated_at

Methods inherited from Resource

amount, attribute, #id, #initialize, timestamp

Constructor Details

This class inherits a constructor from Hcp::Resource

Instance Method Details

#approval_statusString?

Returns:

  • (String, nil)

    whether the customer has answered, and how.

  • (String, nil)

    the approval_status, as Housecall Pro answers it.



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

attribute :approval_status

#message_from_proString?

Returns:

  • (String, nil)

    what the pro said when they sent it.

  • (String, nil)

    the message_from_pro, as Housecall Pro answers it.



16
# File 'lib/hcp/resources/estimate/option.rb', line 16

attribute :message_from_pro

#nameString?

Returns the name, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the name, as Housecall Pro answers it.



6
# File 'lib/hcp/resources/estimate/option.rb', line 6

attribute :name

#notesArray<Note>

Returns what the pros wrote on the option.

Returns:

  • (Array<Note>)

    what the pros wrote on the option.



24
# File 'lib/hcp/resources/estimate/option.rb', line 24

def notes = records Note, 'notes'

#option_numberString?

Returns the option_number, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the option_number, as Housecall Pro answers it.



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

attribute :option_number

#statusString?

Returns:

  • (String, nil)

    where Housecall Pro files the option in its own workflow.

  • (String, nil)

    the status, as Housecall Pro answers it.



13
# File 'lib/hcp/resources/estimate/option.rb', line 13

attribute :status

#tagsArray<String>

Returns what the option is tagged with.

Returns:

  • (Array<String>)

    what the option is tagged with.



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

def tags = Array(@node['tags'])

#total_amountBigDecimal?

Returns the total_amount, which Housecall Pro counts in cents.

Returns:

  • (BigDecimal, nil)

    the total_amount, which Housecall Pro counts in cents.



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

amount :total_amount