fun getOrders(): <ERROR CLASS>
Creates the url, HttpRequest & handles the response from the orders.json call.
success
- the success callback.
failure
- the failure callback.
fun getOrders(success: (result: List<Order>?) -> Unit, failure: (Exception) -> Unit): Unit
Creates the url, HttpRequest & makes the call & handles the success or failure then finally handles the response from the orders.json call.