Exemple #1
0
        public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
        {
            orderItem.SellingFees += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            //pd = null;
            //switch (values[payment_detail])
            //{
            //    case Referral_Fee_On_Item_Price:
            //        orderItem.SellingFees += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            //        break;
            //    case Shipping_Commission:
            //        pd = new ShippingCommission();
            //        break;
            //    case Transaction_Fee:
            //        pd = new TransactionFee();
            //        break;
            //    case FBA_Pick_Pack_Fee:
            //        pd = new FBAPickPackFee();
            //        break;
            //    case FBA_Inventory_Storage_Fee:
            //        pd = new FBAInventoryStorageFee();
            //        break;
            //    case Subscription_Fee:
            //        pd = new SubscriptionFee();
            //        break;
            //}

            //pd.GetAmount(values, ref orderItem);
        }
Exemple #2
0
        public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
        {
            int quantity = 7;

            orderItem.SoldFor     += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            orderItem.QuantitySold = int.Parse(values[quantity]);
        }
Exemple #3
0
        public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
        {
            switch (values[payment_detail])
            {
            case Empty_String:
                orderItem.SoldFor += PaymentDetail.ConvertDollarstoPennies(values[amount]);
                break;

            case Shipping:
                orderItem.SellingFees += PaymentDetail.ConvertDollarstoPennies(values[amount]);
                break;
            }
        }
Exemple #4
0
        public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
        {
            orderItem.ShippingCost += PaymentDetail.ConvertDollarstoPennies(values[amount]);

            //switch (values[payment_detail])
            //{
            //    case "Delivery Confirmation":
            //        orderItem.ShippingCost += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            //        break;
            //    case "Shipping Label":
            //        orderItem.ShippingCost += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            //        break;
            //}
        }
Exemple #5
0
        public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
        {
            orderItem.SoldFor += PaymentDetail.ConvertDollarstoPennies(values[amount]);

            //pd = null;
            //switch (values[payment_detail])
            //{
            //    case Shipping:
            //        orderItem.SoldFor += PaymentDetail.ConvertDollarstoPennies(values[amount]);

            //        break;
            //    case Product_Tax:
            //        orderItem.SoldFor += PaymentDetail.ConvertDollarstoPennies(values[amount]);
            //        break;
            //    case Shipping_Tax:
            //        orderItem.SoldFor += PaymentDetail.ConvertDollarstoPennies(values[amount]);

            //        break;
            //}

            //pd.GetAmount(values, ref orderItem);
        }
        public void ConvertDollarsToPennies(PaymentDetailData.ConvertDollarsToPenniesData data)
        {
            var pennies = PaymentDetail.ConvertDollarstoPennies(data.StringValue);

            Assert.AreEqual(data.Pennies, pennies);
        }
 public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     return(PaymentDetail.ConvertDollarstoPennies(value.ToString()));
 }
Exemple #8
0
        private static void SetupProfitDB()
        {
            ItemTable       = new List <Item>();
            OrderItemsTable = new List <OrderItem>();
            mockProfitDB    = new Mock <IProfitDatabase>();
            mockProfitDB.Setup(m => m.Update(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <string>(), It.IsAny <string>()))
            .Returns((string table, int row, string column, string value) =>
            {
                var updated = 0;
                if (table == "Order")
                {
                    switch (column)
                    {
                    case "tem":
                        updated++;
                        break;
                    }
                }
                else
                {
                    if (ItemTable.Count > row)
                    {
                        switch (column)
                        {
                        case "SKU":
                            ItemTable[row].SKU = value;
                            updated++;
                            break;

                        case "Name":
                            ItemTable[row].Name = value;
                            updated++;
                            break;

                        case "Amazon SKU":
                            ItemTable[row].AmazonSKU = value;
                            updated++;
                            break;

                        case "Item Cost":
                            ItemTable[row].ItemCost = PaymentDetail.ConvertDollarstoPennies(value);
                            updated++;
                            break;

                        case "Ebay SKU":
                            ItemTable[row].EbaySKU = value;
                            updated++;
                            break;

                        case "Quantity Bought":
                            ItemTable[row].QuantityBought = int.Parse(value);
                            updated++;
                            break;

                        case "Quantity Sold":
                            ItemTable[row].QuantityBought = int.Parse(value);
                            updated++;
                            break;
                        }
                    }
                }
                return(updated);
            });
            mockProfitDB.Setup(m => m.InsertItem(It.IsAny <Item>())).Returns((Item item) =>
            {
                var response = string.Empty;
                if (!ItemTable.Contains(item))
                {
                    ItemTable.Add(item);
                    response = "SUCCESS";
                }

                return(response);
            });
        }
 public override void GetPaymentDetail(string[] values, ref OrderItem orderItem)
 {
     orderItem.SellingFees += PaymentDetail.ConvertDollarstoPennies(values[amount]);
 }