// Refresh refreshes every order in the order list.
// its an iterative implementation, so if an error is rised refreshing
// some order, the preciding orders end refreshed.
Refresh refreshes every order in the order list.
its an iterative implementation, so if an error is rised refreshing
some order, the preciding orders end refreshed.
// Refresh refreshes every order in the order list . // its an iterative implementation so if an error is rised refreshing // some order the preciding orders end refreshed .
func (oList *OrderList) Refresh() error {
	for i, order := range oList.Data {
		oRefreshed, err := oList.client.GetOrderStatus(args.Id(order.Id))
		if err != nil {
			return fmt.Errorf("Refresh order %s failed: %s", order.Id, err)
		}
		oList.Data[i] = *oRefreshed
	}
	oList.setClientInOrders()
	return nil
}
func ( oList * OrderList ) Refresh ( ) error { for i , order := range oList . Data { oRefreshed , err := oList . client . GetOrderStatus ( args . Id ( order . Id ) ) if err != nil { return fmt . Errorf ( " " , order . Id , err ) } oList . Data [ i ] = * oRefreshed } oList . setClientInOrders ( ) return nil }
Refresh refreshes every order in the order list.
Refresh refreshes every order in the order list .