class Quickbooks::Model::Invoice

Constants

EMAIL_STATUS_NEED_TO_SEND
REST_RESOURCE

Constants

XML_COLLECTION_NODE
XML_NODE

Public Instance Methods

billing_email_address=(email_address_string) click to toggle source
# File lib/quickbooks/model/invoice.rb, line 85
def billing_email_address=(email_address_string)
  self.bill_email = EmailAddress.new(email_address_string)
end
email_status_for_delivery?() click to toggle source
# File lib/quickbooks/model/invoice.rb, line 94
def email_status_for_delivery?
  email_status == EMAIL_STATUS_NEED_TO_SEND
end
existence_of_customer_ref() click to toggle source
# File lib/quickbooks/model/invoice.rb, line 99
def existence_of_customer_ref
  if customer_ref.nil? || (customer_ref && customer_ref.value == 0)
    errors.add(:customer_ref, "CustomerRef is required and must be a non-zero value.")
  end
end
required_bill_email_if_email_delivery() click to toggle source
# File lib/quickbooks/model/invoice.rb, line 77
def required_bill_email_if_email_delivery
  return unless email_status_for_delivery?

  if bill_email.nil?
    errors.add(:bill_email, "BillEmail is required if EmailStatus=NeedToSend")
  end
end
wants_billing_email_sent!() click to toggle source
# File lib/quickbooks/model/invoice.rb, line 90
def wants_billing_email_sent!
  self.email_status = EMAIL_STATUS_NEED_TO_SEND
end