public static async Task <Order> createOrderById(String offerId, String ipAddress, String Id) { IPAddress address; if (!IPAddress.TryParse(ipAddress, out address)) { Console.WriteLine("UserFactory - Create User - Invalid IP - " + ipAddress); return(null); } Order myOrder = new Order { quantity = 1, recaptcha_challenge_field = "", recaptcha_response_field = "", ip = ipAddress, email = "" }; SMRequest newOrderRequest = new SMRequest(); newOrderRequest.order = myOrder; SMResponse m = await AsyncClient.post(APIRoutes.createNewOrderForOfferWithIdRoute(offerId, Id), newOrderRequest); return(m.order); }