class Xeroizer::Record::RepeatingInvoice

Constants

INVOICE_STATUS
INVOICE_TYPE

Public Instance Methods

accounts_payable?() click to toggle source

Helper method to check if the invoice is accounts payable.

# File lib/xeroizer/models/repeating_invoice.rb, line 68
def accounts_payable?
  type == 'ACCPAY'
end
accounts_receivable?() click to toggle source

Helper method to check if the invoice is accounts receivable.

# File lib/xeroizer/models/repeating_invoice.rb, line 73
def accounts_receivable?
  type == 'ACCREC'
end
approved?() click to toggle source

Helper method to check if the invoice has been approved.

# File lib/xeroizer/models/repeating_invoice.rb, line 63
def approved?
  [ 'AUTHORISED' ].include? status
end
contact_id() click to toggle source

Access the contact ID without forcing a download of an incomplete, summary invoice.

# File lib/xeroizer/models/repeating_invoice.rb, line 58
def contact_id
  attributes[:contact] && attributes[:contact][:contact_id]
end
contact_name() click to toggle source

Access the contact name without forcing a download of an incomplete, summary invoice.

# File lib/xeroizer/models/repeating_invoice.rb, line 52
def contact_name
  attributes[:contact] && attributes[:contact][:name]
end