Method: QuestradeApi::REST::Order.create

Defined in:
lib/questrade_api/rest/order.rb

.create(authorization, account_number, params = {}) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/questrade_api/rest/order.rb', line 29

def self.create(authorization, , params = {})
  params[:accountNumber] = 

  response = post(access_token: authorization.access_token,
                  endpoint: endpoint(),
                  url: authorization.url,
                  body: params.to_json)

  build_orders(authorization, , response)
end