Sha256: f0ab7608499c8038b049421bdb4005617ec376a1a36dd6b9064a7824dfe759fe

Contents?: true

Size: 691 Bytes

Versions: 7

Compression:

Stored size: 691 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 [String] invoice_id 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

7 entries across 7 versions & 1 rubygems

Version Path
billomat-0.2.0 lib/billomat/actions/uncancel.rb
billomat-0.1.6 lib/billomat/actions/uncancel.rb
billomat-0.1.5 lib/billomat/actions/uncancel.rb
billomat-0.1.4 lib/billomat/actions/uncancel.rb
billomat-0.1.3 lib/billomat/actions/uncancel.rb
billomat-0.1.2 lib/billomat/actions/uncancel.rb
billomat-0.1.1 lib/billomat/actions/uncancel.rb