public bool SaveOrder(InvoiceProductsResponse request) { try { var response = consumerService.Post(request, Constants.URI_Logistics); string message = response.Content.ReadAsStringAsync().Result; var isSuccess = Serialize.DeserializeObject <bool>(message); return(isSuccess); } catch (Exception ex) { return(false); } }
public InvoiceProductsResponse InvoiceProducts(PayRequest request) { try { var response = consumerService.Post(request, Constants.URI_INVOICE); string message = response.Content.ReadAsStringAsync().Result; var otro = Serialize.DeserializeObject <InvoiceProductsResponse>(message); return(otro); } catch (Exception) { return(new InvoiceProductsResponse() { Success = false }); } }