Class: Billomat::Actions::Cancel
- Inherits:
-
Object
- Object
- Billomat::Actions::Cancel
- Defined in:
- lib/billomat/actions/cancel.rb
Overview
This actions cancels an invoice
Instance Method Summary collapse
-
#call ⇒ TrueClass
Calls the gateway.
- #initialize(invoice_id) ⇒ Billomat::Actions::Cancel constructor
-
#path ⇒ String
The cancel path with the invoice_id.
Constructor Details
#initialize(invoice_id) ⇒ Billomat::Actions::Cancel
10 11 12 |
# File 'lib/billomat/actions/cancel.rb', line 10 def initialize(invoice_id) @invoice_id = invoice_id end |
Instance Method Details
#call ⇒ TrueClass
Calls the gateway
18 19 20 21 22 |
# File 'lib/billomat/actions/cancel.rb', line 18 def call Billomat::Gateway.new(:put, path).run true end |
#path ⇒ String
Returns The cancel path with the invoice_id.
25 26 27 |
# File 'lib/billomat/actions/cancel.rb', line 25 def path "/invoices/#{@invoice_id}/cancel" end |