Class: ArkEcosystem::Client::API::Transactions

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/client/api/transactions.rb

Overview

Methods for the Transactions API

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ArkEcosystem::Client::API::Base

Instance Method Details

#all(parameters = {}) ⇒ Faraday::Response

Get all transactions.

Parameters:

  • parameters (Hash) (defaults to: {})

Returns:

  • (Faraday::Response)


13
14
15
# File 'lib/arkecosystem/client/api/transactions.rb', line 13

def all(parameters = {})
  @client.get('transactions', parameters)
end

#all_unconfirmed(parameters = {}) ⇒ Faraday::Response

Get all unconfirmed transactions.

Parameters:

  • parameters (Hash) (defaults to: {})

Returns:

  • (Faraday::Response)


40
41
42
# File 'lib/arkecosystem/client/api/transactions.rb', line 40

def all_unconfirmed(parameters = {})
  @client.get('transactions/unconfirmed', parameters)
end

#create(parameters) ⇒ Faraday::Response

Create new transactions.

Parameters:

  • parameters (Hash)

Returns:

  • (Faraday::Response)


22
23
24
# File 'lib/arkecosystem/client/api/transactions.rb', line 22

def create(parameters)
  @client.post('transactions', parameters)
end

#search(parameters) ⇒ Faraday::Response

Search all transactions.

Parameters:

  • parameters (Hash)

Returns:

  • (Faraday::Response)


58
59
60
# File 'lib/arkecosystem/client/api/transactions.rb', line 58

def search(parameters)
  @client.post('transactions/search', parameters)
end

#show(id) ⇒ Faraday::Response

Get the transaction by the given id.

Parameters:

  • id (String)

Returns:

  • (Faraday::Response)


31
32
33
# File 'lib/arkecosystem/client/api/transactions.rb', line 31

def show(id)
  @client.get("transactions/#{id}")
end

#show_unconfirmed(id) ⇒ Faraday::Response

Get the unconfirmed transaction by the given id.

Parameters:

  • id (String)

Returns:

  • (Faraday::Response)


49
50
51
# File 'lib/arkecosystem/client/api/transactions.rb', line 49

def show_unconfirmed(id)
  @client.get("transactions/unconfirmed/#{id}")
end

#typesFaraday::Response

Get a list of all transaction types.

Returns:

  • (Faraday::Response)


65
66
67
# File 'lib/arkecosystem/client/api/transactions.rb', line 65

def types
  @client.get('transactions/types')
end