Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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
         });
     }
 }