Class: Cryptoprocessing::Account
- Defined in:
- lib/cryptoprocessing/models/account.rb
Instance Method Summary collapse
-
#create_address(options = {}) ⇒ Object
Create address.
- #create_callback(address, options = {}) ⇒ Object
-
#create_transaction(options = {}) ⇒ Object
Create transaction.
-
#transactions(options = {}) ⇒ Object
List of transactions.
-
#transactions_by_address(address, options = {}) ⇒ Object
List of transactions by address.
Methods inherited from APIObject
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( = {}) agent.create_address(self['id'], ) 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, = {}) agent.create_callback(self['id'], address, ) 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( = {}) agent.create_transaction(self['id'], ) 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( = {}) agent.transactions(self['id'], ) 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, = {}) agent.transactions_by_address(self['id'], address, ) do |data, resp| yield(data, resp) if block_given? end end |