Class: Bitstamp::UserTransactions

Inherits:
Collection show all
Defined in:
lib/bitstamp/transactions.rb

Instance Attribute Summary

Attributes inherited from Collection

#access_token, #model, #module, #name, #path

Instance Method Summary collapse

Methods inherited from Collection

#initialize

Constructor Details

This class inherits a constructor from Bitstamp::Collection

Instance Method Details

#all(options = {}) ⇒ Object



3
4
5
6
# File 'lib/bitstamp/transactions.rb', line 3

def all(options = {})
  path = options[:currency_pair] ? "/v2/user_transactions/#{options[:currency_pair]}" : "/v2/user_transactions"
  Bitstamp::Helper.parse_objects! Bitstamp::Net::post(path, options).to_str, self.model
end

#create(options = {}) ⇒ Object



17
18
# File 'lib/bitstamp/transactions.rb', line 17

def create(options = {})
end

#find(order_id, options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/bitstamp/transactions.rb', line 8

def find(order_id, options = {})
  txs = self.all(options).find{|order| order.order_id.to_i == order_id.to_i}
  if txs.is_a?(Array)
    return txs
  else
    return [txs]
  end
end

#update(options = {}) ⇒ Object



20
21
# File 'lib/bitstamp/transactions.rb', line 20

def update(options={})
end