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

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/client/api/two/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)


17
18
19
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 17

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)


44
45
46
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 44

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

#create(parameters) ⇒ Faraday::Response

Create new transactions.

Parameters:

  • parameters (Hash)

Returns:

  • (Faraday::Response)


26
27
28
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 26

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

#search(parameters) ⇒ Faraday::Response

Search all transactions.

Parameters:

  • parameters (Hash)

Returns:

  • (Faraday::Response)


62
63
64
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 62

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)


35
36
37
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 35

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)


53
54
55
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 53

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

#typesFaraday::Response

Get a list of all transaction types.

Returns:

  • (Faraday::Response)


69
70
71
# File 'lib/arkecosystem/client/api/two/transactions.rb', line 69

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