Class: Hcp::Job::Invoice

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

Overview

A bill raised for a job.

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 list of them.



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

def self.key = 'invoices'

Instance Method Details

#amountBigDecimal?

Returns the amount, which Housecall Pro counts in cents.

Returns:

  • (BigDecimal, nil)

    the amount, which Housecall Pro counts in cents.



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

amount :amount

#due_amountBigDecimal?

Returns the due_amount, which Housecall Pro counts in cents.

Returns:

  • (BigDecimal, nil)

    the due_amount, which Housecall Pro counts in cents.



13
# File 'lib/hcp/resources/job/invoice.rb', line 13

amount :due_amount

#invoice_numberString?

Returns the invoice_number, as Housecall Pro answers it.

Returns:

  • (String, nil)

    the invoice_number, as Housecall Pro answers it.



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

attribute :invoice_number

Returns:

  • (Time, nil)

    when the invoice was paid.

  • (Time, nil)

    the moment Housecall Pro answers as paid_at.



19
# File 'lib/hcp/resources/job/invoice.rb', line 19

timestamp :paid_at

#sent_atTime?

Returns:

  • (Time, nil)

    when the invoice was sent.

  • (Time, nil)

    the moment Housecall Pro answers as sent_at.



16
# File 'lib/hcp/resources/job/invoice.rb', line 16

timestamp :sent_at

#statusString?

Returns:

  • (String, nil)

    where Housecall Pro files the invoice in its own workflow.

  • (String, nil)

    the status, as Housecall Pro answers it.



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

attribute :status