Sha256: f77ef961169f273ef90dc46a6cd82bb85f72d42bf2a4badee7555ad4c6586e43

Contents?: true

Size: 622 Bytes

Versions: 7

Compression:

Stored size: 622 Bytes

Contents

module OandaAPI
  module Resource
    # Trade value object.
    # See the Oanda Developer Guide for information about {http://developer.oanda.com/rest-live/trades/ Trades}.
    class Trade < ResourceBase
      attr_accessor :id,
                    :instrument,
                    :price,
                    :profit,
                    :side,
                    :stop_loss,
                    :take_profit,
                    :time,
                    :trailing_amount,
                    :trailing_stop,
                    :units

      def time=(v)
        @time = Time.parse v.to_s
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
oanda_api-0.9.6 lib/oanda_api/resource/trade.rb
oanda_api-0.9.5 lib/oanda_api/resource/trade.rb
oanda_api-0.9.4 lib/oanda_api/resource/trade.rb
oanda_api-0.9.3 lib/oanda_api/resource/trade.rb
oanda_api-0.9.2 lib/oanda_api/resource/trade.rb
oanda_api-0.9.0 lib/oanda_api/resource/trade.rb
oanda_api-0.8.3 lib/oanda_api/resource/trade.rb