コード例 #1
0
 public static IPwsObjectWrapper <BespokeKit_V1> AddBespokeDrilling(this IPwsObjectWrapper <OrderLine_V2> line, BespokeKit_V1 bespoke, BespokeKit_V1.BespokeOption.BespokeSelection selection)
 {
     bespoke.NextBespokeOption.Selection = selection;
     return(RESTHandler <IPwsObjectWrapper <BespokeKit_V1> > .Invoke(() => line.Post(f => GetDrillingKit(line), bespoke), "Add Bespoke Drilling to Order Line"));
 }
コード例 #2
0
        public static IPwsObjectWrapper <Product_V2> BespokePricing(this IPwsObjectWrapper <ProductInformation_CustomerProduct_V1V1> info, Product_V2 product, BespokeKit_V1.BespokeOption.BespokeSelection selection, decimal?selectionQuantity = null)
        {
            if (product.NextBespokeOption == null)
            {
                throw new Exception("All bespoke options assigned.");
            }

            product.NextBespokeOption.Selection = selection;
            if (selectionQuantity != null)
            {
                product.NextBespokeOption.Selection.Quantity = selectionQuantity;
            }

            return(RESTHandler <IPwsObjectWrapper <Product_V2> > .Invoke(() => info.Post(f => product.FindSelfLink(), product), "Bespoke Pricing"));
        }
コード例 #3
0
        public static IPwsObjectWrapper <OrderLine_V2> AddBespokeLine(this IPwsObjectWrapper <Order_V1> order, OrderLine_V2 line, BespokeKit_V1.BespokeOption.BespokeSelection selection, decimal?selectionQuantity = null)
        {
            if (line.NextBespokeOption == null)
            {
                throw new Exception("All bespoke options assigned.");
            }

            line.NextBespokeOption.Selection = selection;
            if (selectionQuantity != null)
            {
                line.NextBespokeOption.Selection.Quantity = selectionQuantity;
            }

            return(RESTHandler <IPwsObjectWrapper <OrderLine_V2> > .Invoke(() => order.Post(f => f.Lines, line), "Add Bespoke Order Line"));
        }