Class: Xtb::Http::ProfitCalculation

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

Overview

Constant Summary collapse

ProfitCalculationResponse =
Data.define(:profit)

Instance Method Summary collapse

Methods inherited from Command

call

Constructor Details

#initialize(close_price, cmd, open_price, symbol, volume) ⇒ ProfitCalculation

Returns a new instance of ProfitCalculation.

Parameters:



14
15
16
17
18
19
20
21
22
# File 'lib/xtb/http/profit_calculation.rb', line 14

def initialize(close_price, cmd, open_price, symbol, volume)
  @close_price = close_price
  @cmd = cmd
  @open_price = open_price
  @symbol = symbol
  @volume = volume

  super()
end

Instance Method Details

#callObject



24
25
26
# File 'lib/xtb/http/profit_calculation.rb', line 24

def call
  ProfitCalculationResponse.new(**super.return_data)
end