class Billomat::Actions::Cancel

This actions cancels an invoice

Public Class Methods

new(invoice_id) click to toggle source

@param [String] invoice_id The invoice ID @return [Billomat::Actions::Cancel]

# File lib/billomat/actions/cancel.rb, line 10
def initialize(invoice_id)
  @invoice_id = invoice_id
end

Public Instance Methods

call() click to toggle source

Calls the gateway

@return [TrueClass]

# File lib/billomat/actions/cancel.rb, line 18
def call
  Billomat::Gateway.new(:put, path).run

  true
end
path() click to toggle source

@return [String] The cancel path with the invoice_id

# File lib/billomat/actions/cancel.rb, line 25
def path
  "/invoices/#{@invoice_id}/cancel"
end