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
9 10 11 |
# File 'lib/billomat/actions/cancel.rb', line 9 def initialize(invoice_id) @invoice_id = invoice_id end |
Instance Method Details
#call ⇒ TrueClass
Calls the gateway.
16 17 18 19 20 |
# File 'lib/billomat/actions/cancel.rb', line 16 def call Billomat::Gateway.new(:put, path).run true end |
#path ⇒ String
Returns the cancel path with the invoice_id.
23 24 25 |
# File 'lib/billomat/actions/cancel.rb', line 23 def path "/invoices/#{@invoice_id}/cancel" end |