lib/xero_gateway/invoice.rb in xero_gateway-2.0.14 vs lib/xero_gateway/invoice.rb in xero_gateway-2.0.15
- old
+ new
@@ -2,12 +2,10 @@
class Invoice
include Dates
include Money
include LineItemCalculations
- class NoGatewayError < Error; end
-
INVOICE_TYPE = {
'ACCREC' => 'Accounts Receivable',
'ACCPAY' => 'Accounts Payable'
} unless defined?(INVOICE_TYPE)
@@ -163,17 +161,17 @@
update
end
end
# Creates this invoice record (using gateway.create_invoice) with the associated gateway.
- # If no gateway set, raise a Xero::Invoice::NoGatewayError exception.
+ # If no gateway set, raise a NoGatewayError exception.
def create
raise NoGatewayError unless gateway
gateway.create_invoice(self)
end
# Updates this invoice record (using gateway.update_invoice) with the associated gateway.
- # If no gateway set, raise a Xero::Invoice::NoGatewayError exception.
+ # If no gateway set, raise a NoGatewayError exception.
def update
raise NoGatewayError unless gateway
gateway.update_invoice(self)
end