protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "CobroREA");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (Library.Common.ModulePrincipal.GetUseActiveYear())
                {
                    List = ChargeList.GetListREA(Library.Common.ModulePrincipal.GetActiveYear().Year, false);
                }
                else
                {
                    List = ChargeList.GetListREA(false);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de CobroREAs");
        }
Esempio n. 2
0
        /// <summary>
        /// 過去に作成した課金のリストを取得します。
        /// </summary>
        /// <param name="list">リストを取得する際の条件</param>
        /// <param name="customerid">課金情報を取得する対象の顧客ID</param>
        /// <returns>課金情報のリスト</returns>
        public ChargeList All(ListRequest list, string customerid)
        {
            string query = string.Empty;

            if (list != null || !string.IsNullOrWhiteSpace(customerid))
            {
                Dictionary <string, string> dic = new Dictionary <string, string>();

                if (list != null)
                {
                    list.ToFormContent(dic);
                }

                if (!string.IsNullOrWhiteSpace(customerid))
                {
                    dic.Add("customer", customerid);
                }

                query = HelperImpl.ToQueryString(dic);
            }

            HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Get, new Uri(parent.BaseUri, "charges?" + query));

            ChargeList retval = this.parent.SendRequest <ChargeList>(message);

            return(retval);
        }
Esempio n. 3
0
        public static ChargeList ListCharge(Dictionary <String, Object> listParam)
        {
            //查询制定 charge 列表
            ChargeList list = Charge.list(listParam);

            return(list);
        }
Esempio n. 4
0
        public CobroMngForm(bool is_modal, Form parent, ChargeList list, ETipoCobro tipo)
            : base(is_modal, parent, list)
        {
            InitializeComponent();

            SetView(molView.Normal);

            // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            SetMainDataGridView(Tabla);
            Datos.DataSource = ChargeList.NewList().GetSortedList();

            SortProperty  = Fecha.DataPropertyName;
            SortDirection = ListSortDirection.Descending;

            _tipo = tipo;

            switch (tipo)
            {
            case ETipoCobro.Todos:
                this.Text = Resources.Labels.COBRO_TODOS;
                break;

            case ETipoCobro.Cliente:
                this.Text = Resources.Labels.COBRO_CLIENTES;
                break;
            }
        }
Esempio n. 5
0
        public void ConstructorAndFields()
        {
            ChargeList obj = new ChargeList();

            Assert.IsNotNull(obj);
            Assert.IsNull(obj.Charges);

            obj.Charges = new Charge[1];
            Assert.IsNotNull(obj.Charges);
        }
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            CobroReportMng reportMng = new CobroReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            CobroREAListRpt report = reportMng.GetCobroREAListReport(ChargeList.GetList((IList <ChargeInfo>)Datos.List), null);

            PgMng.FillUp();

            ShowReport(report);
        }
Esempio n. 7
0
 private static decimal GetFreightCharges(ChargeList chargeList)
 {
     var chargeV01s =
         (from ite in chargeList
          where ite as Charge_V01 != null && (ite as Charge_V01).ChargeType == ChargeTypes.FREIGHT
          select ite as Charge_V01);
     if (null != chargeV01s && chargeV01s.Any())
     {
         return chargeV01s.FirstOrDefault().Amount;
     }
     return decimal.Zero;
 }
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    ChargeList listA = ChargeList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
            case molAction.ChangeStateAnulado:
            case molAction.ChangeStateContabilizado:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                if (ActiveItem == null)
                {
                    return;
                }
                List.RemoveItem(ActiveOID);
                if (FilterType == IFilterType.Filter)
                {
                    ChargeList listD = ChargeList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Esempio n. 9
0
        /// <summary>
        /// 本示例只介绍如何请求支付凭据(charge 对象),以及如何查询指定 charge 对象和 charge 列表,
        /// 至于如何将 charge 对象传递给客户端需要接入者自行处理
        /// </summary>

        static void Main(string[] args)
        {
            //设置 apikey
            Pingpp.apiKey = "sk_test_ibbTe5jLGCi5rzfH4OqPW9KC";

            //设置 appid
            Dictionary <string, string> app = new Dictionary <string, string>();

            app.Add("id", "app_1Gqj58ynP0mHeX1q");

            //交易请求参数,这里之列出必填参数,可选参数请参考 https://pingxx.com/document/api#api-c-new
            Dictionary <string, object> chargeParam = new Dictionary <string, object>();

            chargeParam.Add("order_no", "asdfgffgfddfdsfgfdsa");
            chargeParam.Add("amount", 1);
            chargeParam.Add("channel", "wx");
            chargeParam.Add("currency", "cny");
            chargeParam.Add("subject", "your subject");
            chargeParam.Add("body", "your body");
            chargeParam.Add("client_ip", "127.0.0.1");
            //将 appid 添加到发起交易的请求参数中
            chargeParam.Add("app", app);

            Charge charge = CreateCharge(chargeParam);

            Console.WriteLine("****发起交易请求创建 charge 对象****");
            Console.WriteLine(charge);
            Console.WriteLine();

            string id = charge.Id;
            Charge ch = RetrieveCharge(id);

            Console.WriteLine("****查询指定 charge 对象****");
            Console.WriteLine(ch);
            Console.WriteLine();

            Dictionary <String, Object> listmap = new Dictionary <String, Object>();

            listmap.Add("limit", 3);

            ChargeList list = ListCharge(listmap);

            Console.WriteLine("****查询 charge 列表****");
            Console.WriteLine(list);
            Console.WriteLine();



            Console.ReadKey();
        }
        public CobroREAMngForm(Form parent)
            : base(false, parent, null)
        {
            InitializeComponent();

            SetView(molView.Normal);

            // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            SetMainDataGridView(Tabla);
            Datos.DataSource = ChargeList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;
        }
Esempio n. 11
0
        protected override void RefreshAction()
        {
            ChargeInfo current = Cobro;

            _cobros = ChargeList.GetListFomento(true);
            Datos_Cobros.DataSource = _cobros;
            Cobros_DGW.Refresh();
            UpdateFacturasPendientes();
            UpdateFacturasCobro();

            Datos_Resumen.ResetBindings(false);

            SetGridColors(Cobros_DGW.Name);
            SetGridColors(LineasFomento_DGW.Name);

            Select(current);
        }
Esempio n. 12
0
        public override void PrintQRAction()
        {
            PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this);
            CobroReportMng reportMng = new CobroReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            reportMng.ShowQRCode = true;

            PgMng.Grow();
            CobroFacturaList cfacturas = CobroFacturaList.GetList(false);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            ChargeListRpt report = reportMng.GetListReport(ChargeList.GetList((IList <ChargeInfo>)Datos.List), cfacturas);

            PgMng.FillUp();

            ShowReport(report);
        }
        private decimal GetFreightCharges(ChargeList chargeList)
        {
            var chargeV01S =
                (from ite in chargeList
                 where ite is Charge_V01 && ((Charge_V01)ite).ChargeType == ChargeTypes.FREIGHT
                 select ite as Charge_V01).ToList();

            if (chargeV01S.Any())
            {
                var firstOrDefault = chargeV01S.FirstOrDefault();
                if (firstOrDefault != null)
                {
                    return(firstOrDefault.Amount);
                }
            }
            return(decimal.Zero);
        }
Esempio n. 14
0
 protected override void GetFormSourceData()
 {
     _cobros = ChargeList.GetListREA(true);
 }
Esempio n. 15
0
 public decimal getOtherCharges(ChargeList chargeList)
 {
     return(OrderProvider.getOtherCharges(chargeList));
 }
Esempio n. 16
0
        public MyHLShoppingCart LoadOrderAcknowledgement(string orderNumber, string locale, string distributorID)
        {
            var req = new GetPendingOrdersRequest_V03();

            req.CountryCode         = locale;
            req.DistributorId       = distributorID;
            req.IncludeXmlOrderData = true;
            req.OrderNumberList     = new List <string> {
                orderNumber
            };

            var proxy = ServiceClientProvider.GetOrderServiceProxy();

            var rsp = proxy.GetOrders(new GetOrdersRequest1(req)).GetOrdersResult as GetPendingOrdersResponse_V01;

            if (!Helper.Instance.ValidateResponse(rsp))
            {
                Helper.Instance.LogError(rsp.Message, string.Format("{0}.LoadOrderAcknowledgement()", ThisClassName));
                return(null);
            }

            var cart = new MyHLShoppingCart();

            var pendingOdr = rsp.PendingOrders.FirstOrDefault();

            XElement xRoot = XElement.Parse(pendingOdr.XmlOrderData.OuterXml);

            var xBTOrder = GetChild(xRoot, "BTOrder");
            var xOrder   = GetChild(xRoot, "Order");

            #region ShoppingCart

            cart.CountryCode     = GetChildValue(xBTOrder, "countryOfProcessingField");
            cart.DistributorID   = GetChildValue(xBTOrder, "distributorIDField");
            cart.Locale          = GetChildValue(xBTOrder, "localeField");
            cart.OrderMonth      = int.Parse(GetChildValue(xBTOrder, "orderMonthField"));
            cart.OrderSubType    = GetChildValue(xBTOrder, "orderSubTypeField");
            cart.SMSNotification = GetChildValue(xBTOrder, "sMSNumberField");

            cart.EmailAddress = GetChildValue(xRoot, "Email");

            #region DeliveryInfo

            var xShipment = GetChild(xOrder, "Shipment");

            ShippingInfo_V01 shpInfoV01 = new ShippingInfo_V01
            {
                Carrier          = GetChildValue(xShipment, "Carrier"),
                FreightVariant   = GetChildValue(xShipment, "FreightVariant"),
                Phone            = GetChildValue(xShipment, "Phone"),
                Recipient        = GetChildValue(xShipment, "Recipient"),
                ShippingMethodID = GetChildValue(xShipment, "ShippingMethodID"),
                Version          = GetChildValue(xShipment, "Version"),
                WarehouseCode    = GetChildValue(xShipment, "WarehouseCode"),
                DeliveryNickName = GetChildValue(xShipment, "DeliveryNickName"),
            };

            var phone = shpInfoV01.Phone;
            if (!string.IsNullOrWhiteSpace(phone))
            {
                // trim the start and end with -
                if (phone.StartsWith("-") && phone.EndsWith("-") && (phone.Length >= 2))
                {
                    shpInfoV01.Phone = phone.Substring(1, phone.Length - 2);
                }
            }

            var deliveryInfo = new MyHerbalife3.Ordering.Providers.Shipping.ShippingInfo
            {
                //Description
                DeliveryNickName = shpInfoV01.DeliveryNickName,
                FreightCode      = shpInfoV01.ShippingMethodID,
                FreightVariant   = shpInfoV01.FreightVariant, // somehow FreightVariant will be null, due to the prop get implementation
                //Id
                WarehouseCode = shpInfoV01.WarehouseCode,
            };

            deliveryInfo.Option = DeliveryOptionTypes.Convert(shpInfoV01.FreightVariant);

            cart.FreightCode = deliveryInfo.FreightCode;

            #region ShippingAddress_V01

            var shippingAddr = new ServiceProvider.ShippingSvc.ShippingAddress_V01
            {
                Alias = shpInfoV01.DeliveryNickName,
                //AreaCode
                //DisplayName
                Phone     = shpInfoV01.Phone,
                Recipient = shpInfoV01.Recipient,
            };

            #region Address_V01

            var xAddress = GetChild(xShipment, "Address");
            var addr     = new ServiceProvider.ShippingSvc.Address_V01
            {
                City                   = GetChildValue(xAddress, "City"),
                Country                = GetChildValue(xAddress, "Country"),
                CountyDistrict         = GetChildValue(xAddress, "CountyDistrict"),
                Line1                  = GetChildValue(xAddress, "Line1"),
                Line2                  = GetChildValue(xAddress, "Line2"),
                Line3                  = GetChildValue(xAddress, "Line3"),
                Line4                  = GetChildValue(xAddress, "Line4"),
                PostalCode             = GetChildValue(xAddress, "PostalCode"),
                StateProvinceTerritory = GetChildValue(xAddress, "StateProvinceTerritory"),
            };

            shippingAddr.Address = addr;

            #endregion

            deliveryInfo.Address = shippingAddr;

            #endregion

            #region HandlingInfo_V01

            var xHandling = GetChild(xOrder, "Handling");
            HandlingInfo_V01 handlingInfoV01 = new HandlingInfo_V01
            {
                PickupName           = GetChildValue(xHandling, "PickupName"),
                ShippingInstructions = GetChildValue(xHandling, "ShippingInstructions"),
                Version = GetChildValue(xHandling, "Version"),
            };

            deliveryInfo.Instruction = handlingInfoV01.ShippingInstructions;

            #endregion

            cart.DeliveryInfo = deliveryInfo;

            #endregion

            #region ShoppingCartItems, CartItems

            cart.ShoppingCartItems = new List <DistributorShoppingCartItem>();
            cart.CartItems         = new ServiceProvider.CatalogSvc.ShoppingCartItemList();

            var itemList     = new List <DistributorShoppingCartItem>();
            var cartItemList = new List <ServiceProvider.CatalogSvc.ShoppingCartItem_V01>();

            var xOrderItemsField = GetChild(xBTOrder, "orderItemsField");
            var xBTItemList      = GetChildList(xOrderItemsField, "Item");

            var xOrderItems = GetChild(xOrder, "OrderItems");
            var xItemList   = GetChildList(xOrderItems, "Item");

            foreach (var xItem in xItemList)
            {
                var sku = GetChildValue(xItem, "SKU");

                #region Shared.Providers.DistributorShoppingCartItem

                DistributorShoppingCartItem item = new DistributorShoppingCartItem
                {
                    Description  = GetChildValue(xItem, "Description"),
                    IsPromo      = GetChildValue <bool>(xItem, "IsPromo"),
                    RetailPrice  = GetChildValue <decimal>(xItem, "RetailPrice"),
                    Quantity     = GetChildValue <int>(xItem, "Quantity"),
                    SKU          = sku,
                    VolumePoints = GetChildValue <decimal>(xItem, "VolumePoint"),
                };

                var xBTItem = LookupBTOrderItem(xBTItemList, sku);
                if (xBTItem != null)
                {
                    item.DiscountPrice = GetChildValue <decimal>(xBTItem, "discountAmountField");
                    item.EarnBase      = GetChildValue <decimal>(xBTItem, "earnBaseField");
                    item.Flavor        = GetChildValue(xBTItem, "flavorField");
                }

                #endregion

                #region ShoppingCartItem_V01

                var cartItem = new ServiceProvider.CatalogSvc.ShoppingCartItem_V01
                {
                    IsPromo  = GetChildValue <bool>(xItem, "IsPromo"),
                    Quantity = GetChildValue <int>(xItem, "Quantity"),
                    SKU      = sku,
                };

                #endregion

                itemList.Add(item);
                cartItemList.Add(cartItem);
            }

            var itemListSorted     = itemList.OrderBy(x => x.SKU).ToList();
            var cartItemListSorted = cartItemList.OrderBy(x => x.SKU).ToList();

            cart.ShoppingCartItems.AddRange(itemListSorted);
            cart.CartItems.AddRange(cartItemListSorted);

            #endregion

            #region Totals

            var xPricing = GetChild(xOrder, "Pricing");

            #region ChargeList

            var        xChargeList = GetChild(xPricing, "ChargeList");
            ChargeList chargeList  = new ChargeList();

            var xChargeList_List = GetChildList(xChargeList, "Charge");
            foreach (var xCharge in xChargeList_List)
            {
                #region Charge_V01

                if (GetAttributeValue(xCharge, "type") == "Charge_V01")
                {
                    Charge_V01 chargeV01 = new Charge_V01(ChargeTypes.None, 0)
                    {
                        Amount    = GetChildValue <decimal>(xCharge, "Amount"),
                        TaxAmount = GetChildValue <decimal>(xCharge, "TaxAmount"),
                        Type      = GetChildValue(xCharge, "Type"),
                        Version   = GetChildValue(xCharge, "Version"),
                    };

                    chargeList.Add(chargeV01);
                }

                #endregion
            }

            #endregion

            #region ItemTotalsList

            var xItemTotalsList = GetChild(xPricing, "ItemTotalsList");
            var itemTotalsList  = new ServiceProvider.OrderSvc.ItemTotalsList();

            var xItemTotalsList_List = GetChildList(xItemTotalsList, "ItemTotal");
            foreach (var xItemTotal in xItemTotalsList_List)
            {
                #region ItemTotal_V01

                ItemTotal_V01 itemTotalV01 = new ItemTotal_V01
                {
                    AfterDiscountTax = GetChildValue <decimal>(xItemTotal, "AfterDiscountTax"),
                    ChargeList       = new ChargeList(), // just empty list
                    Discount         = GetChildValue <decimal>(xItemTotal, "Discount"),
                    DiscountedPrice  = GetChildValue <decimal>(xItemTotal, "DiscountedPrice"),
                    EarnBase         = GetChildValue <decimal>(xItemTotal, "EarnBase"),
                    LinePrice        = GetChildValue <decimal>(xItemTotal, "LinePrice"),
                    LineTax          = GetChildValue <decimal>(xItemTotal, "LineTax"),
                    //ProductType = GetChildValue(xItemTotal, "ProductType"),
                    Quantity      = GetChildValue <int>(xItemTotal, "Quantity"),
                    RetailPrice   = GetChildValue <decimal>(xItemTotal, "RetailPrice"),
                    SKU           = GetChildValue(xItemTotal, "SKU"),
                    TaxableAmount = GetChildValue <decimal>(xItemTotal, "TaxableAmount"),
                    VolumePoints  = GetChildValue <decimal>(xItemTotal, "VolumePoints"),
                    Version       = GetChildValue(xItemTotal, "Version"),
                };

                itemTotalsList.Add(itemTotalV01);

                var itemMatch = cart.ShoppingCartItems.FirstOrDefault(x => x.SKU == itemTotalV01.SKU);
                if (itemMatch != null)
                {
                    itemMatch.DiscountPrice = itemTotalV01.DiscountedPrice;
                }

                #endregion
            }

            #endregion

            #region OrderFreight

            var xOrderFreight = GetChild(xPricing, "OrderFreight");

            #region Packages

            var            xPackages   = GetChild(xOrderFreight, "Packages");
            List <Package> packageList = new List <Package>();

            var xPackageList = GetChildList(xPackages, "Package");
            foreach (var xPck in xPackageList)
            {
                #region Package

                var pck = new Package
                {
                    Packagetype = GetChildValue(xPck, "Packagetype"),
                    Unit        = GetChildValue <int>(xPck, "Unit"),
                    Volume      = GetChildValue <decimal>(xPck, "Volume"),
                };

                #endregion

                packageList.Add(pck);
            }

            #endregion

            var ordFreight = new OrderFreight
            {
                ActualFreight         = GetChildValue <decimal>(xOrderFreight, "ActualFreight"),
                BeforeDiscountFreight = GetChildValue <decimal>(xOrderFreight, "BeforeDiscountFreight"),
                BeforeWeight          = GetChildValue <decimal>(xOrderFreight, "BeforeWeight"),
                CaseRate       = GetChildValue <decimal>(xOrderFreight, "CaseRate"),
                FreightCharge  = GetChildValue <decimal>(xOrderFreight, "FreightCharge"),
                Insurance      = GetChildValue <decimal>(xOrderFreight, "Insurance"),
                InsuranceRate  = GetChildValue <decimal>(xOrderFreight, "InsuranceRate"),
                MaterialFee    = GetChildValue <decimal>(xOrderFreight, "MaterialFee"),
                Packages       = packageList,
                PackageType    = GetChildValue(xOrderFreight, "PackageType"),
                PackageWeight  = GetChildValue <decimal>(xOrderFreight, "PackageWeight"),
                PhysicalWeight = GetChildValue <decimal>(xOrderFreight, "PhysicalWeight"),
                Unit           = GetChildValue <int>(xOrderFreight, "Unit"),
                VolumeWeight   = GetChildValue <decimal>(xOrderFreight, "VolumeWeight"),
                Weight         = GetChildValue <decimal>(xOrderFreight, "Weight"),
            };

            #endregion

            #region OrderTotals_V02

            if (GetAttributeValue(xPricing, "type") == "OrderTotals_V02")
            {
                var total = new OrderTotals_V02
                {
                    AmountDue            = GetChildValue <decimal>(xPricing, "AmountDue"),
                    BalanceAmount        = GetChildValue <decimal>(xPricing, "BalanceAmount"),
                    ChargeList           = chargeList,
                    DiscountedItemsTotal = GetChildValue <decimal>(xPricing, "DiscountedItemsTotal"),
                    DiscountPercentage   = GetChildValue <decimal>(xPricing, "DiscountPercentage"),
                    DiscountType         = GetChildValue(xPricing, "DiscountType"),
                    Donation             = GetChildValue <decimal>(xPricing, "Donation"),
                    Donation2            = GetChildValue <decimal>(xPricing, "Donation2"),
                    ExciseTax            = GetChildValue <decimal>(xPricing, "ExciseTax"),
                    IcmsTax                 = GetChildValue <decimal>(xPricing, "IcmsTax"),
                    IpiTax                  = GetChildValue <decimal>(xPricing, "IpiTax"),
                    ItemsTotal              = GetChildValue <decimal>(xPricing, "ItemsTotal"),
                    ItemTotalsList          = itemTotalsList,
                    LiteratureRetailAmount  = GetChildValue <decimal>(xPricing, "LiteratureRetailAmount"),
                    MiscAmount              = GetChildValue <decimal>(xPricing, "MiscAmount"),
                    OrderFreight            = ordFreight,
                    PricingServerName       = GetChildValue(xPricing, "PricingServerName"),
                    ProductRetailAmount     = GetChildValue <decimal>(xPricing, "ProductRetailAmount"),
                    ProductTaxTotal         = GetChildValue <decimal>(xPricing, "ProductTaxTotal"),
                    PromotionRetailAmount   = GetChildValue <decimal>(xPricing, "PromotionRetailAmount"),
                    TaxableAmountTotal      = GetChildValue <decimal>(xPricing, "TaxableAmountTotal"),
                    TaxAfterDiscountAmount  = GetChildValue <decimal>(xPricing, "TaxAfterDiscountAmount"),
                    TaxAmount               = GetChildValue <decimal>(xPricing, "TaxAmount"),
                    TaxBeforeDiscountAmount = GetChildValue <decimal>(xPricing, "TaxBeforeDiscountAmount"),
                    TotalEarnBase           = GetChildValue <decimal>(xPricing, "TotalEarnBase"),
                    TotalItemDiscount       = GetChildValue <decimal>(xPricing, "TotalItemDiscount"),
                    Version                 = GetChildValue(xPricing, "Version"),
                    VolumePoints            = GetChildValue <decimal>(xPricing, "VolumePoints"),
                };

                cart.Totals = total;
            }

            #endregion

            #endregion

            #endregion

            var xEmailInfoField = GetChild(xBTOrder, "emailInfoField");

            cart.InvoiceOption = GetChildValue(xEmailInfoField, "invoiceOptionField");

            return(cart);
        }
 private Charge_V01 GetCharge(ChargeList chargeList, ChargeTypes type)
 {
     return(chargeList.Find(delegate(Charge p) { return ((Charge_V01)p).ChargeType == type; }) as Charge_V01 ?? new Charge_V01(type, (decimal)0.0));
 }
 public ItemTotal_V01(string sku, int quanitity, decimal totalPrice, decimal retailPrice, decimal discountedPrice, decimal totalTax, decimal earnBase, ChargeList chargeList)
 {
     this.SKU             = sku;
     this.Quantity        = quanitity;
     this.LinePrice       = totalPrice;
     this.RetailPrice     = retailPrice;
     this.DiscountedPrice = discountedPrice;
     this.LineTax         = totalTax;
     this.EarnBase        = earnBase;
     this.ChargeList      = chargeList;
 }