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



14
15
16
# File 'lib/billomat/actions/uncancel.rb', line 14

def initialize(invoice_id)
  @invoice_id = invoice_id
end

Instance Method Details

#callTrueClass

Calls the gateway

Returns:

  • (TrueClass)


22
23
24
25
26
# File 'lib/billomat/actions/uncancel.rb', line 22

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



29
30
31
# File 'lib/billomat/actions/uncancel.rb', line 29

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