Module: Nis::Endpoint::Account::Transfers
- Included in:
- Nis
- Defined in:
- lib/nis/endpoint/account/transfers.rb
Instance Method Summary collapse
- #account_transfers(dir = :all, address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
- #account_transfers_all(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
- #account_transfers_direction(dir) ⇒ Object
- #account_transfers_incoming(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
- #account_transfers_outgoing(address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
Instance Method Details
#account_transfers(dir = :all, address:, hash: nil, id: nil, page_size: nil) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/nis/endpoint/account/transfers.rb', line 61 def account_transfers(dir = :all, address:, hash: nil, id: nil, page_size: nil) request!(:get, "/account/transfers/#{account_transfers_direction(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>
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/nis/endpoint/account/transfers.rb', line 43 def account_transfers_all(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 account_transfers_direction(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>
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/nis/endpoint/account/transfers.rb', line 9 def account_transfers_incoming(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>
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/nis/endpoint/account/transfers.rb', line 26 def account_transfers_outgoing(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 |