//set shipping information private ShippingDetailsType getShippingDetails() { // Shipping details. ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent = 0.0825f; salesTax.SalesTaxState = "CA"; sd.ApplyShippingDiscount = true; AmountType at = new AmountType(); at.Value = 2.8; at.currencyID = CurrencyCodeType.USD; sd.InsuranceFee = at; sd.InsuranceOption = InsuranceOptionCodeType.Optional; sd.PaymentInstructions = "eBay DotNet SDK test instruction."; // Set calculated shipping. sd.ShippingType = ShippingTypeCodeType.Flat; // ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService = ShippingServiceCodeType.ShippingMethodStandard.ToString(); at = new AmountType(); at.Value = 2.0; at.currencyID = CurrencyCodeType.USD; st1.ShippingServiceAdditionalCost = at; at = new AmountType(); at.Value = 1.0; at.currencyID = CurrencyCodeType.USD; st1.ShippingServiceCost = at; st1.ShippingServicePriority = 1; at = new AmountType(); at.Value = 1.0; at.currencyID = CurrencyCodeType.USD; st1.ShippingInsuranceCost = at; ShippingServiceOptionsType st2 = new ShippingServiceOptionsType(); st2.ExpeditedService = true; st2.ShippingService = ShippingServiceCodeType.ShippingMethodExpress.ToString(); at = new AmountType(); at.Value = 2.0; at.currencyID = CurrencyCodeType.USD; st2.ShippingServiceAdditionalCost = at; at = new AmountType(); at.Value = 1.0; at.currencyID = CurrencyCodeType.USD; st2.ShippingServiceCost = at; st2.ShippingServicePriority = 2; at = new AmountType(); at.Value = 1.0; at.currencyID = CurrencyCodeType.USD; st2.ShippingInsuranceCost = at; sd.ShippingServiceOptions = new ShippingServiceOptionsTypeCollection(new ShippingServiceOptionsType[] { st1, st2 }); return(sd); }
private static ShippingDetailsType getShippingDetails() { // Shipping details. ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent = 0.0825F; salesTax.SalesTaxPercentSpecified = true; salesTax.SalesTaxState = "CA"; sd.SalesTax = salesTax; sd.AllowPaymentEdit = false; sd.AllowPaymentEditSpecified = true; sd.ApplyShippingDiscount = true; sd.ApplyShippingDiscountSpecified = true; sd.InsuranceFee = new AmountType(); sd.InsuranceFee.Value = 0.1; sd.InsuranceFee.currencyID = CurrencyCodeType.USD; sd.InsuranceOption = InsuranceOptionCodeType.Optional; sd.PaymentInstructions = "eBay Java SDK test instruction."; sd.ShippingType = ShippingTypeCodeType.Flat; ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService = ShippingServiceCodeType.USPSPriority.ToString(); st1.ShippingServiceAdditionalCost = new AmountType(); st1.ShippingServiceAdditionalCost.Value = 0.1; st1.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD; st1.ShippingServiceCost = new AmountType(); st1.ShippingServiceCost.Value = 0.1; st1.ShippingServiceCost.currencyID = CurrencyCodeType.USD; st1.ShippingServicePriority = 1; st1.ShippingServicePrioritySpecified = true; st1.ShippingInsuranceCost = new AmountType(); st1.ShippingInsuranceCost.Value = 0.1; st1.ShippingInsuranceCost.currencyID = CurrencyCodeType.USD; ShippingServiceOptionsType st2 = new ShippingServiceOptionsType(); st2.ExpeditedService = true; st2.ExpeditedServiceSpecified = true; st2.ShippingService = ShippingServiceCodeType.USPSFirstClass.ToString(); st2.ShippingServiceAdditionalCost = new AmountType(); st2.ShippingServiceAdditionalCost.Value = 0.1; st2.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD; st2.ShippingServiceCost = new AmountType(); st2.ShippingServiceCost.Value = 0.1; st2.ShippingServiceCost.currencyID = CurrencyCodeType.USD; st2.ShippingServicePriority = 2; st2.ShippingServicePrioritySpecified = true; st2.ShippingInsuranceCost = new AmountType(); st2.ShippingInsuranceCost.Value = 0.1; st2.ShippingInsuranceCost.currencyID = CurrencyCodeType.USD; sd.ShippingServiceOptions = new ShippingServiceOptionsTypeCollection(); sd.ShippingServiceOptions.Add(st1); sd.ShippingServiceOptions.Add(st2); return(sd); }
private ShippingDetailsType getShippingDetails(String shippingService) { // Shipping details. SiteCodeType site = this.controller.ApiContext.Site; ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent = 0.0825f; salesTax.SalesTaxState = "CA"; sd.ApplyShippingDiscount = true; AmountType at = new AmountType(); at.Value = 0.1; at.currencyID = this.getCurrencyType(site); //sd.InsuranceFee = at; //sd.InsuranceOption = InsuranceOptionCodeType.Optional; sd.PaymentInstructions = "eBay DotNet SDK test instruction."; // Set calculated shipping. sd.ShippingType = ShippingTypeCodeType.Flat; // ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService = shippingService; at = new AmountType(); at.Value = 0.1; at.currencyID = this.getCurrencyType(site); st1.ShippingServiceAdditionalCost = at; at = new AmountType(); at.Value = 0.1; at.currencyID = this.getCurrencyType(site); st1.ShippingServiceCost = at; st1.ShippingServicePriority = 1; at = new AmountType(); at.Value = 0.1; at.currencyID = this.getCurrencyType(site); st1.ShippingInsuranceCost = at; sd.ShippingServiceOptions = new ShippingServiceOptionsTypeCollection(new ShippingServiceOptionsType[] { st1 }); return(sd); }
/// <summary> /// Enables a seller to send an order invoice to a buyer. Where applicable, updates to shipping, payment methods, and sales tax made in this request are applied to the specified order as a whole and to the individual order line items whose data are stored in individual <b>Transaction</b> objects. /// </summary> /// /// <param name="ItemID"> /// Unique identifier for an eBay item listing. Unless <b>OrderID</b> or /// <b>OrderLineItemID</b> is provided in the request, the <b>ItemID</b> (or <b>SKU</b>) is /// required and must be paired with the corresponding <b>TransactionID</b> to /// identify a single line item order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should be used. /// </param> /// /// <param name="TransactionID"> /// Unique identifier for an eBay order line item (transaction). An order /// line item is created once there is a commitment from a buyer to purchase /// an item. Since an auction listing can only have one order line item /// during the duration of the listing, the <b>TransactionID</b> for /// auction listings is always 0. Unless <b>OrderID</b> or <b>OrderLineItemID</b> is /// provided in the request, the <b>TransactionID</b> is required and must be /// paired with the corresponding <b>ItemID</b> to identify a single line item /// order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should /// be used. /// </param> /// /// <param name="OrderID"> /// A unique identifier that identifies a single line item or multiple line /// item (Combined Invoice) orders. /// /// For a single line item order, the <b>OrderID</b> value is identical to the /// <b>OrderLineItemID</b> value that is generated upon creation of the order line /// item. For a Combined Invoice order, the <b>OrderID</b> value is created by eBay /// when the buyer or seller (sharing multiple, common order line items) /// combines multiple order line items into a Combined Invoice order. A /// Combined Invoice order can also be created by the seller through the /// <b>AddOrder</b> call. /// /// Unless the <b>ItemID</b> (or SKU) and corresponding <b>TransactionID</b>, or the /// <b>OrderLineItemID</b> is provided in the request to identify a single line /// item order, the <b>OrderID</b> must be specified. If <b>OrderID</b> is specified, /// <b>OrderLineItemID</b>, <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present /// in the same request. /// </param> /// /// <param name="InternationalShippingServiceOptionsList"> /// If the buyer has an International shipping address, use this container /// to offer up to three International shipping services. If International /// shipping services are offered, (domestic) <b>ShippingServiceOptions</b> should /// not be included in the request. /// /// </param> /// /// <param name="ShippingServiceOptionsList"> /// If the buyer has a domestic shipping address, use this container /// to offer up to three domestic shipping services. If domestic /// shipping services are offered, <b>InternationalShippingServiceOptions</b> should /// not be included in the request. /// /// </param> /// /// <param name="SalesTax"> /// Container consisting of sales tax details. The amount of sales tax to /// add to the price of an order is dependent on the sales tax rate in the /// buyer's state and whether sales tax is being applied to the cost of the /// order only or the cost of the order plus shipping. /// </param> /// /// <param name="InsuranceOption"> /// Specifies whether an insurance fee is required. An <b>InsuranceOption</b> value of /// <b>IncludedInShippingHandling</b> cannot be used if the item will use calculated /// shipping. Some shipping carriers automatically include shipping insurance /// for qualifying items. /// </param> /// /// <param name="InsuranceFee"> /// Insurance cost, as set by seller, if ShippingType = 1. /// Specify if <b>InsuranceOption</b> is optional or required. Must /// be greater than zero value if a value of Optional or Required is passed in /// <b>InsuranceOption</b>. Value specified should be the total cost of insuring the /// item. /// </param> /// /// <param name="PaymentMethodsList"> /// This optional field allows a US or German seller to add specific payment /// methods that were not in the original item listing. The only valid values /// for this field are 'PayPal' for a US listing, or /// 'MoneyXferAcceptedInCheckout' (CIP+) for a DE listing. /// </param> /// /// <param name="PayPalEmailAddress"> /// If the <b>PaymentMethods</b> field is used and set to PayPal, the seller /// provides his/her PayPal email address in this field. /// </param> /// /// <param name="CheckoutInstructions"> /// This field allows the seller to provide a message or instructions /// regarding checkout/payment or the return policy. /// </param> /// /// <param name="EmailCopyToSeller"> /// Flag indicating whether or not the seller wishes to receive an email copy of /// the invoice sent to the buyer. /// </param> /// /// <param name="CODCost"> /// This dollar value indicates the money due from the buyer upon delivery of the item. /// /// This field should only be specified in the <b>SendInvoice</b> request if 'COD' /// (cash-on-delivery) was the payment method selected by the buyer and it is included /// as the <b>PaymentMethods</b> value in the same request. /// </param> /// /// <param name="SKU"> /// The seller's unique identifier for an item that is being tracked by this /// SKU. If <b>OrderID</b> or <b>OrderLineItemID</b> are not provided, both <b>SKU</b> (or /// <b>ItemID</b>) and corresponding <b>TransactionID</b> must be provided to uniquely /// identify a single line item order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> must be used. /// /// /// This field can only be used if the <b>Item.InventoryTrackingMethod</b> field /// (set with the <b>AddFixedPriceItem</b> or <b>RelistFixedPriceItem</b> calls) is set to /// SKU. /// </param> /// /// <param name="OrderLineItemID"> /// A unique identifier for an eBay order line item. This field is created /// as soon as there is a commitment to buy from the seller, and its value /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a /// hyphen in between these two IDs. /// /// /// Unless the <b>ItemID</b> (or <b>SKU</b>) and corresponding <b>TransactionID</b> is used to /// identify a single line item order, or the <b>OrderID</b> is used to identify a /// single or multiple line item (Combined Invoice) order, the /// <b>OrderLineItemID</b> must be specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should be used. If <b>OrderLineItemID</b> is specified, /// <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present in the same /// request. /// </param> /// /// <param name="AdjustmentAmount"> /// This field allows the seller to adjust the total cost of the order to account /// for an extra charge or to pass down a discount to the buyer. /// /// The currency used in this field must be the same currency of the listing site. /// A positive value in this field indicates that the amount is an extra charge /// being paid to the seller by the buyer, and a negative value indicates that the /// amount is a discount given to the buyer by the seller. /// </param> /// public void SendInvoice(string ItemID, string TransactionID, string OrderID, InternationalShippingServiceOptionsTypeCollection InternationalShippingServiceOptionsList, ShippingServiceOptionsTypeCollection ShippingServiceOptionsList, SalesTaxType SalesTax, InsuranceOptionCodeType InsuranceOption, AmountType InsuranceFee, BuyerPaymentMethodCodeTypeCollection PaymentMethodsList, string PayPalEmailAddress, string CheckoutInstructions, bool EmailCopyToSeller, AmountType CODCost, string SKU, string OrderLineItemID, AmountType AdjustmentAmount) { this.ItemID = ItemID; this.TransactionID = TransactionID; this.OrderID = OrderID; this.InternationalShippingServiceOptionsList = InternationalShippingServiceOptionsList; this.ShippingServiceOptionsList = ShippingServiceOptionsList; this.SalesTax = SalesTax; this.InsuranceOption = InsuranceOption; this.InsuranceFee = InsuranceFee; this.PaymentMethodsList = PaymentMethodsList; this.PayPalEmailAddress = PayPalEmailAddress; this.CheckoutInstructions = CheckoutInstructions; this.EmailCopyToSeller = EmailCopyToSeller; this.CODCost = CODCost; this.SKU = SKU; this.OrderLineItemID = OrderLineItemID; this.AdjustmentAmount = AdjustmentAmount; Execute(); }
/// <summary> /// Enables a seller to send an order invoice to a buyer. Where applicable, updates to shipping, payment methods, and sales tax made in this request are applied to the specified order as a whole and to the individual order line items whose data are stored in individual <b>Transaction</b> objects. /// </summary> /// /// <param name="ItemID"> /// Unique identifier for an eBay item listing. Unless <b>OrderID</b> or /// <b>OrderLineItemID</b> is provided in the request, the <b>ItemID</b> (or <b>SKU</b>) is /// required and must be paired with the corresponding <b>TransactionID</b> to /// identify a single line item order. For a multiple line item (Combined /// Payment) order, <b>OrderID</b> should be used. /// </param> /// /// <param name="TransactionID"> /// Unique identifier for an eBay order line item (transaction). An order /// line item is created once there is a commitment from a buyer to purchase /// an item. Since an auction listing can only have one order line item /// during the duration of the listing, the <b>TransactionID</b> for /// auction listings is always 0. Unless <b>OrderID</b> or <b>OrderLineItemID</b> is /// provided in the request, the <b>TransactionID</b> is required and must be /// paired with the corresponding <b>ItemID</b> to identify a single line item /// order. For a multiple line item (Combined Payment) order, <b>OrderID</b> should /// be used. /// </param> /// /// <param name="OrderID"> /// A unique identifier that identifies a single line item or multiple line /// item (Combined Payment) orders. /// /// For a single line item order, the <b>OrderID</b> value is identical to the /// <b>OrderLineItemID</b> value that is generated upon creation of the order line /// item. For a Combined Payment order, the <b>OrderID</b> value is created by eBay /// when the buyer or seller (sharing multiple, common order line items) /// combines multiple order line items into a Combined Payment order. A /// Combined Payment order can also be created by the seller through the /// <b>AddOrder</b> call. /// /// Unless the <b>ItemID</b> (or SKU) and corresponding <b>TransactionID</b>, or the /// <b>OrderLineItemID</b> is provided in the request to identify a single line /// item order, the <b>OrderID</b> must be specified. If <b>OrderID</b> is specified, /// <b>OrderLineItemID</b>, <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present /// in the same request. /// </param> /// /// <param name="InternationalShippingServiceOptionsList"> /// If the buyer has an International shipping address, use this container /// to offer up to three International shipping services. If International /// shipping services are offered, (domestic) <b>ShippingServiceOptions</b> should /// not be included in the request. /// /// </param> /// /// <param name="ShippingServiceOptionsList"> /// If the buyer has a domestic shipping address, use this container /// to offer up to three domestic shipping services. If domestic /// shipping services are offered, <b>InternationalShippingServiceOptions</b> should /// not be included in the request. /// /// </param> /// /// <param name="SalesTax"> /// Container consisting of sales tax details. The amount of sales tax to /// add to the price of an order is dependent on the sales tax rate in the /// buyer's state and whether sales tax is being applied to the cost of the /// order only or the cost of the order plus shipping. /// </param> /// /// <param name="InsuranceOption"> /// Specifies whether an insurance fee is required. An <b>InsuranceOption</b> value of /// <b>IncludedInShippingHandling</b> cannot be used if the item will use calculated /// shipping. Some shipping carriers automatically include shipping insurance /// for qualifying items. /// </param> /// /// <param name="InsuranceFee"> /// Insurance cost, as set by seller, if ShippingType = 1. /// Specify if <b>InsuranceOption</b> is optional or required. Must /// be greater than zero value if a value of Optional or Required is passed in /// <b>InsuranceOption</b>. Value specified should be the total cost of insuring the /// item. /// </param> /// /// <param name="PaymentMethodsList"> /// This optional field allows a US or German seller to add specific payment /// methods that were not in the original item listing. The only valid values /// for this field are 'PayPal' for a US listing, or /// 'MoneyXferAcceptedInCheckout' (CIP+) for a DE listing. /// </param> /// /// <param name="PayPalEmailAddress"> /// If the <b>PaymentMethods</b> field is used and set to PayPal, the seller /// provides his/her PayPal email address in this field. /// </param> /// /// <param name="CheckoutInstructions"> /// This field allows the seller to provide a message or instructions /// regarding checkout/payment or the return policy. /// </param> /// /// <param name="EmailCopyToSeller"> /// Flag indicating whether or not the seller wishes to receive an email copy of /// the invoice sent to the buyer. /// </param> /// /// <param name="CODCost"> /// This dollar value indicates the money due from the buyer upon delivery of the item. /// /// This field should only be specified in the <b>SendInvoice</b> request if 'COD' /// (cash-on-delivery) was the payment method selected by the buyer and it is included /// as the <b>PaymentMethods</b> value in the same request. /// </param> /// /// <param name="SKU"> /// The seller's unique identifier for an item that is being tracked by this /// SKU. If <b>OrderID</b> or <b>OrderLineItemID</b> are not provided, both <b>SKU</b> (or /// <b>ItemID</b>) and corresponding <b>TransactionID</b> must be provided to uniquely /// identify a single line item order. For a multiple line item (Combined /// Payment) order, <b>OrderID</b> must be used. /// /// /// This field can only be used if the <b>Item.InventoryTrackingMethod</b> field /// (set with the <b>AddFixedPriceItem</b> or <b>RelistFixedPriceItem</b> calls) is set to /// SKU. /// </param> /// /// <param name="OrderLineItemID"> /// A unique identifier for an eBay order line item. This field is created /// as soon as there is a commitment to buy from the seller, and its value /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a /// hyphen in between these two IDs. /// /// /// Unless the <b>ItemID</b> (or <b>SKU</b>) and corresponding <b>TransactionID</b> is used to /// identify a single line item order, or the <b>OrderID</b> is used to identify a /// single or multiple line item (Combined Payment) order, the /// <b>OrderLineItemID</b> must be specified. For a multiple line item (Combined /// Payment) order, <b>OrderID</b> should be used. If <b>OrderLineItemID</b> is specified, /// <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present in the same /// request. /// </param> /// /// <param name="AdjustmentAmount"> /// This field allows the seller to adjust the total cost of the order to account /// for an extra charge or to pass down a discount to the buyer. /// /// The currency used in this field must be the same currency of the listing site. /// A positive value in this field indicates that the amount is an extra charge /// being paid to the seller by the buyer, and a negative value indicates that the /// amount is a discount given to the buyer by the seller. /// </param> /// public void SendInvoice(string ItemID, string TransactionID, string OrderID, InternationalShippingServiceOptionsTypeCollection InternationalShippingServiceOptionsList, ShippingServiceOptionsTypeCollection ShippingServiceOptionsList, SalesTaxType SalesTax, InsuranceOptionCodeType InsuranceOption, AmountType InsuranceFee, BuyerPaymentMethodCodeTypeCollection PaymentMethodsList, string PayPalEmailAddress, string CheckoutInstructions, bool EmailCopyToSeller, AmountType CODCost, string SKU, string OrderLineItemID, AmountType AdjustmentAmount) { this.ItemID = ItemID; this.TransactionID = TransactionID; this.OrderID = OrderID; this.InternationalShippingServiceOptionsList = InternationalShippingServiceOptionsList; this.ShippingServiceOptionsList = ShippingServiceOptionsList; this.SalesTax = SalesTax; this.InsuranceOption = InsuranceOption; this.InsuranceFee = InsuranceFee; this.PaymentMethodsList = PaymentMethodsList; this.PayPalEmailAddress = PayPalEmailAddress; this.CheckoutInstructions = CheckoutInstructions; this.EmailCopyToSeller = EmailCopyToSeller; this.CODCost = CODCost; this.SKU = SKU; this.OrderLineItemID = OrderLineItemID; this.AdjustmentAmount = AdjustmentAmount; Execute(); }
private static ShippingDetailsType getShippingDetails() { // Shipping details. ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent = 0.0825F; salesTax.SalesTaxPercentSpecified = true; salesTax.SalesTaxState = "CA"; sd.SalesTax = salesTax; sd.AllowPaymentEdit = false; sd.AllowPaymentEditSpecified = true; sd.ApplyShippingDiscount = true; sd.ApplyShippingDiscountSpecified = true; sd.InsuranceFee = new AmountType(); sd.InsuranceFee.Value = 0.1; sd.InsuranceFee.currencyID = CurrencyCodeType.USD; sd.InsuranceOption = InsuranceOptionCodeType.Optional; sd.PaymentInstructions = "eBay Java SDK test instruction."; sd.ShippingType = ShippingTypeCodeType.Flat; ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService = ShippingServiceCodeType.USPSPriority.ToString(); st1.ShippingServiceAdditionalCost = new AmountType(); st1.ShippingServiceAdditionalCost.Value = 0.1; st1.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD; st1.ShippingServiceCost = new AmountType(); st1.ShippingServiceCost.Value = 0.1; st1.ShippingServiceCost.currencyID = CurrencyCodeType.USD; st1.ShippingServicePriority = 1; st1.ShippingServicePrioritySpecified = true; st1.ShippingInsuranceCost = new AmountType(); st1.ShippingInsuranceCost.Value = 0.1; st1.ShippingInsuranceCost.currencyID = CurrencyCodeType.USD; ShippingServiceOptionsType st2 = new ShippingServiceOptionsType(); st2.ExpeditedService = true; st2.ExpeditedServiceSpecified = true; st2.ShippingService = ShippingServiceCodeType.USPSFirstClass.ToString(); st2.ShippingServiceAdditionalCost = new AmountType(); st2.ShippingServiceAdditionalCost.Value = 0.1; st2.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD; st2.ShippingServiceCost = new AmountType(); st2.ShippingServiceCost.Value = 0.1; st2.ShippingServiceCost.currencyID = CurrencyCodeType.USD; st2.ShippingServicePriority = 2; st2.ShippingServicePrioritySpecified = true; st2.ShippingInsuranceCost = new AmountType(); st2.ShippingInsuranceCost.Value = 0.1; st2.ShippingInsuranceCost.currencyID = CurrencyCodeType.USD; sd.ShippingServiceOptions = new ShippingServiceOptionsTypeCollection(); sd.ShippingServiceOptions.Add(st1); sd.ShippingServiceOptions.Add(st2); return sd; }
//set shipping information private ShippingDetailsType getShippingDetails() { // Shipping details. ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent=0.0825f; salesTax.SalesTaxState="CA"; sd.ApplyShippingDiscount=true; AmountType at =new AmountType(); at.Value=2.8; at.currencyID=CurrencyCodeType.USD; sd.InsuranceFee=at; sd.InsuranceOption=InsuranceOptionCodeType.Optional; sd.PaymentInstructions="eBay DotNet SDK test instruction."; // Set calculated shipping. sd.ShippingType=ShippingTypeCodeType.Flat; // ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService=ShippingServiceCodeType.ShippingMethodStandard.ToString(); at = new AmountType(); at.Value=2.0; at.currencyID=CurrencyCodeType.USD; st1.ShippingServiceAdditionalCost=at; at = new AmountType(); at.Value=1.0; at.currencyID=CurrencyCodeType.USD; st1.ShippingServiceCost=at; st1.ShippingServicePriority=1; at = new AmountType(); at.Value=1.0; at.currencyID=CurrencyCodeType.USD; st1.ShippingInsuranceCost=at; ShippingServiceOptionsType st2 = new ShippingServiceOptionsType(); st2.ExpeditedService=true; st2.ShippingService=ShippingServiceCodeType.ShippingMethodExpress.ToString(); at = new AmountType(); at.Value=2.0; at.currencyID=CurrencyCodeType.USD; st2.ShippingServiceAdditionalCost=at; at = new AmountType(); at.Value=1.0; at.currencyID=CurrencyCodeType.USD; st2.ShippingServiceCost=at; st2.ShippingServicePriority=2; at = new AmountType(); at.Value=1.0; at.currencyID=CurrencyCodeType.USD; st2.ShippingInsuranceCost=at; sd.ShippingServiceOptions=new ShippingServiceOptionsTypeCollection(new ShippingServiceOptionsType[]{st1, st2}); return sd; }
private ShippingDetailsType getShippingDetails(String shippingService) { // Shipping details. SiteCodeType site = (SiteCodeType)Session[Global.SITE]; ShippingDetailsType sd = new ShippingDetailsType(); SalesTaxType salesTax = new SalesTaxType(); salesTax.SalesTaxPercent=0.0825f; salesTax.SalesTaxState="CA"; sd.ApplyShippingDiscount=true; AmountType at =new AmountType(); at.Value=0.1; at.currencyID=Global.GetCurrencyType(site); sd.InsuranceFee=at; sd.InsuranceOption=InsuranceOptionCodeType.Optional; sd.PaymentInstructions="eBay DotNet SDK test instruction."; // Set calculated shipping. sd.ShippingType=ShippingTypeCodeType.Flat; // ShippingServiceOptionsType st1 = new ShippingServiceOptionsType(); st1.ShippingService=shippingService; at = new AmountType(); at.Value=0.1; at.currencyID=Global.GetCurrencyType(site); st1.ShippingServiceAdditionalCost=at; at = new AmountType(); at.Value=0.1; at.currencyID=Global.GetCurrencyType(site); st1.ShippingServiceCost=at; st1.ShippingServicePriority=1; at = new AmountType(); at.Value=0.1; at.currencyID=Global.GetCurrencyType(site); st1.ShippingInsuranceCost=at; sd.ShippingServiceOptions=new ShippingServiceOptionsTypeCollection(new ShippingServiceOptionsType[]{st1}); return sd; }
private void SetSalesTaxInfo(ItemType item) { string salesTaxState = ((ControlTagItem)this.cbxSalesTaxState.SelectedItem).Tag.ToString(); if (!salesTaxState.Equals("No Sales Tax")) { SalesTaxType salesTax = new SalesTaxType(); item.ShippingDetails.SalesTax = salesTax; salesTax.SalesTaxState = salesTaxState; salesTax.SalesTaxPercent = float.Parse(this.txtTaxPercent.Text); salesTax.ShippingIncludedInTax = this.chkApplySalesTaxToTotal.Checked; } }
public Product(string name, decimal price, SalesTaxType salesTaxType, DutyTaxType dutyTaxType) { this.Name = name; this.Price = price; this.SalesTaxType = salesTaxType; this.DutyTaxType = dutyTaxType; }