Module: Nis::Endpoint::Account::Transfers

Included in:
Nis
Defined in:
lib/nis/endpoint/account/transfers.rb

Instance Method Summary collapse

Instance Method Details

#account_transfers(dir = :all, address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>

Parameters:

  • dir (Symbol) (defaults to: :all)

    direction(:in, :out, :all)

  • address (String)
  • hash (String) (defaults to: nil)
  • id (String) (defaults to: nil)
  • page_size (Integer) (defaults to: nil)

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
# File 'lib/nis/endpoint/account/transfers.rb', line 61

def (dir = :all, address:, hash: nil, id: nil, page_size: nil)
  request!(:get, "/account/transfers/#{(dir)}",
    address: address,
    hash: hash,
    id: id,
    pageSize: page_size
  ) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#account_transfers_all(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>

Parameters:

  • address (String)
  • hash (String) (defaults to: nil)
  • id (String) (defaults to: nil)
  • page_size (Integer) (defaults to: nil)

Returns:

See Also:



43
44
45
46
47
48
49
50
51
52
# File 'lib/nis/endpoint/account/transfers.rb', line 43

def (address:, hash: nil, id: nil, page_size: nil)
  request!(:get, '/account/transfers/all',
    address: address,
    hash: hash,
    id: id,
    pageSize: page_size
  ) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#account_transfers_direction(dir) ⇒ Object



72
73
74
75
76
77
78
# File 'lib/nis/endpoint/account/transfers.rb', line 72

def (dir)
  case dir.to_s
  when /\Ai/ then :incoming
  when /\Ao/ then :outgoing
    else :all
  end
end

#account_transfers_incoming(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>

Parameters:

  • address (String)
  • hash (String) (defaults to: nil)
  • id (String) (defaults to: nil)
  • page_size (Integer) (defaults to: nil)

Returns:

See Also:



9
10
11
12
13
14
15
16
17
18
# File 'lib/nis/endpoint/account/transfers.rb', line 9

def (address:, hash: nil, id: nil, page_size: nil)
  request!(:get, '/account/transfers/incoming',
    address: address,
    hash: hash,
    id: id,
    pageSize: page_size
  ) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#account_transfers_outgoing(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>

Parameters:

  • address (String)
  • hash (String) (defaults to: nil)
  • id (String) (defaults to: nil)
  • page_size (Integer) (defaults to: nil)

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
# File 'lib/nis/endpoint/account/transfers.rb', line 26

def (address:, hash: nil, id: nil, page_size: nil)
  request!(:get, '/account/transfers/outgoing',
    address: address,
    hash: hash,
    id: id,
    pageSize: page_size
  ) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end