Sha256: aec5d3b1f3b6f6a2d41b4f714c0ed7cc7b4690791735349031eae88a15021799

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 Bytes

Contents

module Squall
  # OnApp Transaction
  class Transaction < Base
    # Public: Lists all transactions.
    #
    # Returns an Array.
    def list
      response = request :get, '/transactions.json'
      response.collect { |t| t['transaction'] }
    end

    # Public: Get info for the given transaction.
    #
    # id - ID of transaction
    #
    # Returns a Hash.
    def show(id)
      response = request :get, "/transactions/#{id}.json"
      response['transaction']
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
squall-1.4.0 lib/squall/transaction.rb
squall-1.3.1 lib/squall/transaction.rb