Class: Xtb::Http::TradeRecords

Inherits:
Command
  • Object
show all
Defined in:
lib/xtb/http/trade_records.rb

Overview

Instance Method Summary collapse

Methods inherited from Command

call

Constructor Details

#initialize(orders) ⇒ TradeRecords

Returns a new instance of TradeRecords.

Parameters:

  • orders (Array<Integer>)

    list of order ids



8
9
10
11
12
# File 'lib/xtb/http/trade_records.rb', line 8

def initialize(orders)
  @orders = orders

  super()
end

Instance Method Details

#callObject



14
15
16
# File 'lib/xtb/http/trade_records.rb', line 14

def call
  super.return_data.map { |record| Xtb::TradeRecord.new(**record) }
end