Class: Billomat::Actions::Uncancel

Inherits:
Object
  • Object
show all
Defined in:
lib/billomat/actions/uncancel.rb

Overview

This actions uncancels an canceld invoice.

Examples:

Billomat::Actions::Uncancel.new('1235')

Instance Method Summary collapse

Constructor Details

#initialize(invoice_id) ⇒ Billomat::Actions::Uncancel

Parameters:

  • invoice_id (String)

    the invoice ID



12
13
14
# File 'lib/billomat/actions/uncancel.rb', line 12

def initialize(invoice_id)
  @invoice_id = invoice_id
end

Instance Method Details

#callTrueClass

Calls the gateway.

Returns:

  • (TrueClass)


19
20
21
22
23
# File 'lib/billomat/actions/uncancel.rb', line 19

def call
  Billomat::Gateway.new(:put, path).run

  true
end

#pathString

Returns the path for the uncancel action.

Returns:

  • (String)

    the path for the uncancel action



26
27
28
# File 'lib/billomat/actions/uncancel.rb', line 26

def path
  "/invoices/#{@invoice_id}/uncancel"
end