Class: DeGiro::GetOrders

Inherits:
Object
  • Object
show all
Defined in:
lib/degiro/get_orders.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ GetOrders

Returns a new instance of GetOrders.



5
6
7
# File 'lib/degiro/get_orders.rb', line 5

def initialize(connection)
  @connection = connection
end

Instance Method Details

#get_ordersObject



9
10
11
12
# File 'lib/degiro/get_orders.rb', line 9

def get_orders
  params = URI.encode_www_form(orders: 0, historicalOrders: 0, transactions: 0)
  parse_orders(JSON.parse(@connection.get(url(params)).body))
end