Sha256: 202571dcff4e587e02a6e6350f483f40cd5b3183dc865e98c4a254f26cfac4f1

Contents?: true

Size: 668 Bytes

Versions: 11

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

module Billomat
  module Actions
    # This actions uncancels an canceld invoice.
    #
    # @example
    #   Billomat::Actions::Uncancel.new('1235')
    class Uncancel
      # @param invoice_id [String] the invoice ID
      # @return [Billomat::Actions::Uncancel]
      def initialize(invoice_id)
        @invoice_id = invoice_id
      end

      # Calls the gateway.
      #
      # @return [TrueClass]
      def call
        Billomat::Gateway.new(:put, path).run

        true
      end

      # @return [String] the path for the uncancel action
      def path
        "/invoices/#{@invoice_id}/uncancel"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
billomat-1.2.5 lib/billomat/actions/uncancel.rb
billomat-1.2.4 lib/billomat/actions/uncancel.rb
billomat-1.2.3 lib/billomat/actions/uncancel.rb
billomat-1.2.2 lib/billomat/actions/uncancel.rb
billomat-1.2.1 lib/billomat/actions/uncancel.rb
billomat-1.2.0 lib/billomat/actions/uncancel.rb
billomat-1.1.0 lib/billomat/actions/uncancel.rb
billomat-1.0.0 lib/billomat/actions/uncancel.rb
billomat-0.4.1 lib/billomat/actions/uncancel.rb
billomat-0.4.0 lib/billomat/actions/uncancel.rb
billomat-0.3.0 lib/billomat/actions/uncancel.rb