Module: Nis::Endpoint::Local::Account::Transfers
- Included in:
- Nis
- Defined in:
- lib/nis/endpoint/local/account/transfers.rb
Instance Method Summary collapse
- #local_account_transfers(dir = :all, page:) ⇒ Object
- #local_account_transfers_all(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
- #local_account_transfers_direction(dir) ⇒ Object
- #local_account_transfers_incoming(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
- #local_account_transfers_outgoing(page:) ⇒ Array <Nis::Struct::TransactionMetaDataPair>
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 local_account_transfers(dir = :all, page:) request!(:post, "/local/account/transfers/#{local_account_transfers_direction(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 local_account_transfers_all(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 local_account_transfers_direction(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 local_account_transfers_incoming(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 local_account_transfers_outgoing(page:) request!(:post, '/local/account/transfers/outgoing', page) do |res| res[:data].map { |tmdp| Nis::Struct::TransactionMetaDataPair.build(tmdp) } end end |