public virtual ServiceProvider.OrderSvc.CustomerOrder_V01 ConvertToCustomerOrder(InvoiceModel invoice, string memberId, string countryCode, ServiceProvider.OrderSvc.Address address, string warehouseCode, string shippingMethodId) { var customerOrder = new ServiceProvider.OrderSvc.CustomerOrder_V01 { DistributorID = memberId, ProcessingCountry = countryCode, OrderItems = new ServiceProvider.OrderSvc.OrderItems() }; foreach (var customerOrderItem in invoice.InvoiceLines.Select(invoiceLine => new ServiceProvider.OrderSvc.CustomerOrderItem_V01 { Quantity = invoiceLine.Quantity, SKU = invoiceLine.Sku, RetailPrice = invoiceLine.CalcDiscountedAmount, StockingSKU = invoiceLine.StockingSku, TaxCategory = invoiceLine.ProductCategory, FreightCharge = invoiceLine.FreightCharge })) { customerOrder.OrderItems.Add(customerOrderItem); } customerOrder.Shipping = GetCustomerShippingInfo(address, warehouseCode, invoice, shippingMethodId); return(customerOrder); }
public virtual GetTaxDataForDwsFromVertexResponse CallDwsPricing(ServiceProvider.OrderSvc.CustomerOrder_V01 customerOrder) { var request = new GetTaxDataForDwsFromVertexRequest_V01() { Order = customerOrder }; try { var proxy = ServiceClientProvider.GetOrderServiceProxy(); var response = proxy.GetTaxDataForDwsFromVertex(new GetTaxDataForDwsFromVertexRequest1(request)).GetTaxDataForDwsFromVertexResult; return(response); } catch (Exception ex) { LoggerHelper.Error( string.Format( "OrderService - InvoiceProvider: An error occured while Calling GetTaxDataForDwsFromVertex service method {0}", ex.Message)); } return(null); }