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

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

Instance Method Summary collapse

Instance Method Details

#local_account_transfers(dir = :all, page:) ⇒ Object



32
33
34
35
36
# File 'lib/nis/endpoint/local/account/transfers.rb', line 32

def (dir = :all, page:)
  request!(:post, "/local/account/transfers/#{(dir)}", page) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#local_account_transfers_all(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>



26
27
28
29
30
# File 'lib/nis/endpoint/local/account/transfers.rb', line 26

def (page:)
  request!(:post, '/local/account/transfers/all', page) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#local_account_transfers_direction(dir) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/nis/endpoint/local/account/transfers.rb', line 38

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

#local_account_transfers_incoming(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>



8
9
10
11
12
# File 'lib/nis/endpoint/local/account/transfers.rb', line 8

def (page:)
  request!(:post, '/local/account/transfers/incoming', page) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end

#local_account_transfers_outgoing(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>



17
18
19
20
21
# File 'lib/nis/endpoint/local/account/transfers.rb', line 17

def (page:)
  request!(:post, '/local/account/transfers/outgoing', page) do |res|
    res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) }
  end
end