Commit ea3face8 authored by Sergey Gernyak's avatar Sergey Gernyak

FEAT: added placedOrders income params classes

parent 8b65ac32
module BetfairApiNgRails
module Api
module Data
class LimitOnCloseOrder < Api::Data::Base
include Api::Data::Concerns::Hashable
LIMIT_ON_CLOSE_ORDER_ATTRS = [
:liability,
:price
]
attributes LIMIT_ON_CLOSE_ORDER_ATTRS
def self.to_hash_attrs
LIMIT_ON_CLOSE_ORDER_ATTRS
end
end
end
end
end
module BetfairApiNgRails
module Api
module Data
class LimitOrder < Api::Data::Base
include Api::Data::Concerns::Hashable
LIMIT_ORDER_ATTRS = [
:size,
:price,
:persistence_type
]
attributes LIMIT_ORDER_ATTRS
def self.to_hash_attrs
LIMIT_ORDER_ATTRS
end
end
end
end
end
module BetfairApiNgRails
module Api
module Data
class MarketOnCloseOrder < Api::Data::Base
include Api::Data::Concerns::Hashable
MARKET_ON_CLOSE_ORDER_ATTRS = [
:liability
]
attributes MARKET_ON_CLOSE_ORDER_ATTRS
def self.to_hash_attrs
MARKET_ON_CLOSE_ORDER_ATTRS
end
end
end
end
end
module BetfairApiNgRails
module Api
module Data
class PlaceInstruction < Api::Data::Base
include Api::Data::Concerns::Hashable
PLACE_INSTRUCTION_ATTRS = [
:order_type,
:selection_id,
:handicap,
:side,
{ limit_order: { type: BetfairApiNgRails::LimitOrder } },
{ limit_on_close_order: { type: BetfairApiNgRails::LimitOnCloseOrder } },
{ market_on_close_order: { type: BetfairApiNgRails::MarketOnCloseOrder } }
]
attributes PLACE_INSTRUCTION_ATTRS
def self.to_hash_attrs
PLACE_INSTRUCTION_ATTRS
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment