Class: Squall::Transaction
Overview
OnApp Transaction
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#list ⇒ Object
Public: Lists all transactions.
-
#show(id) ⇒ Object
Public: Get info for the given transaction.
Methods inherited from Base
#check_config, #default_params, #key_for_class, #request
Instance Method Details
#list ⇒ Object
Public: Lists all transactions.
Returns an Array.
7 8 9 10 |
# File 'lib/squall/transaction.rb', line 7 def list response = request :get, '/transactions.json' response.collect { |t| t['transaction'] } end |
#show(id) ⇒ Object
Public: Get info for the given transaction.
id - ID of transaction
Returns a Hash.
17 18 19 20 |
# File 'lib/squall/transaction.rb', line 17 def show(id) response = request :get, "/transactions/#{id}.json" response['transaction'] end |