Class: Cryptoprocessing::Account

Inherits:
APIObject
  • Object
show all
Defined in:
lib/cryptoprocessing/models/account.rb

Instance Method Summary collapse

Methods inherited from APIObject

#initialize, #update

Constructor Details

This class inherits a constructor from Cryptoprocessing::APIObject

Instance Method Details

#create_address(options = {}) ⇒ Object

Create address



6
7
8
9
10
# File 'lib/cryptoprocessing/models/account.rb', line 6

def create_address(options = {})
  agent.create_address(self['id'], options) do |resp|
    yield(data, resp) if block_given?
  end
end

#create_callback(address, options = {}) ⇒ Object



33
34
35
36
37
# File 'lib/cryptoprocessing/models/account.rb', line 33

def create_callback(address, options = {})
  agent.create_callback(self['id'], address, options) do |data, resp|
    yield(data, resp) if block_given?
  end
end

#create_transaction(options = {}) ⇒ Object

Create transaction



27
28
29
30
31
# File 'lib/cryptoprocessing/models/account.rb', line 27

def create_transaction(options = {})
  agent.create_transaction(self['id'], options) do |data, resp|
    yield(data, resp) if block_given?
  end
end

#transactions(options = {}) ⇒ Object

List of transactions



13
14
15
16
17
# File 'lib/cryptoprocessing/models/account.rb', line 13

def transactions(options = {})
  agent.transactions(self['id'], options) do |data, resp|
    yield(data, resp) if block_given?
  end
end

#transactions_by_address(address, options = {}) ⇒ Object

List of transactions by address



20
21
22
23
24
# File 'lib/cryptoprocessing/models/account.rb', line 20

def transactions_by_address(address, options = {})
  agent.transactions_by_address(self['id'], address, options) do |data, resp|
    yield(data, resp) if block_given?
  end
end