Пример #1
0
        /// <summary>
        /// XML fragment representation of this object
        /// </summary>
        /// <returns>XML fragment for this object.</returns>
        /// <remarks>
        /// Name for outer tag expected to be set by calling method.
        /// This fragment returns inner properties representation only
        /// </remarks>


        protected internal String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();

            if (IsSetPayment())
            {
                Money paymentObj = this.Payment;
                xml.Append("<Payment>");
                xml.Append(paymentObj.ToXMLFragment());
                xml.Append("</Payment>");
            }
            if (IsSetPaymentMethod())
            {
                xml.Append("<PaymentMethod>");
                xml.Append(EscapeXML(this.PaymentMethod));
                xml.Append("</PaymentMethod>");
            }
            return(xml.ToString());
        }
Пример #2
0
        /// <summary>
        /// XML fragment representation of this object
        /// </summary>
        /// <returns>XML fragment for this object.</returns>
        /// <remarks>
        /// Name for outer tag expected to be set by calling method.
        /// This fragment returns inner properties representation only
        /// </remarks>


        protected internal String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();

            if (IsSetAmazonOrderId())
            {
                xml.Append("<AmazonOrderId>");
                xml.Append(EscapeXML(this.AmazonOrderId));
                xml.Append("</AmazonOrderId>");
            }
            if (IsSetSellerOrderId())
            {
                xml.Append("<SellerOrderId>");
                xml.Append(EscapeXML(this.SellerOrderId));
                xml.Append("</SellerOrderId>");
            }
            if (IsSetPurchaseDate())
            {
                xml.Append("<PurchaseDate>");
                xml.Append(this.PurchaseDate);
                xml.Append("</PurchaseDate>");
            }
            if (IsSetLastUpdateDate())
            {
                xml.Append("<LastUpdateDate>");
                xml.Append(this.LastUpdateDate);
                xml.Append("</LastUpdateDate>");
            }
            if (IsSetOrderStatus())
            {
                xml.Append("<OrderStatus>");
                xml.Append(this.OrderStatus);
                xml.Append("</OrderStatus>");
            }
            if (IsSetFulfillmentChannel())
            {
                xml.Append("<FulfillmentChannel>");
                xml.Append(this.FulfillmentChannel);
                xml.Append("</FulfillmentChannel>");
            }
            if (IsSetSalesChannel())
            {
                xml.Append("<SalesChannel>");
                xml.Append(EscapeXML(this.SalesChannel));
                xml.Append("</SalesChannel>");
            }
            if (IsSetOrderChannel())
            {
                xml.Append("<OrderChannel>");
                xml.Append(EscapeXML(this.OrderChannel));
                xml.Append("</OrderChannel>");
            }
            if (IsSetShipServiceLevel())
            {
                xml.Append("<ShipServiceLevel>");
                xml.Append(EscapeXML(this.ShipServiceLevel));
                xml.Append("</ShipServiceLevel>");
            }
            if (IsSetShippingAddress())
            {
                Address shippingAddressObj = this.ShippingAddress;
                xml.Append("<ShippingAddress>");
                xml.Append(shippingAddressObj.ToXMLFragment());
                xml.Append("</ShippingAddress>");
            }
            if (IsSetOrderTotal())
            {
                Money orderTotalObj = this.OrderTotal;
                xml.Append("<OrderTotal>");
                xml.Append(orderTotalObj.ToXMLFragment());
                xml.Append("</OrderTotal>");
            }
            if (IsSetNumberOfItemsShipped())
            {
                xml.Append("<NumberOfItemsShipped>");
                xml.Append(this.NumberOfItemsShipped);
                xml.Append("</NumberOfItemsShipped>");
            }
            if (IsSetNumberOfItemsUnshipped())
            {
                xml.Append("<NumberOfItemsUnshipped>");
                xml.Append(this.NumberOfItemsUnshipped);
                xml.Append("</NumberOfItemsUnshipped>");
            }
            if (IsSetPaymentExecutionDetail())
            {
                PaymentExecutionDetailItemList paymentExecutionDetailObj = this.PaymentExecutionDetail;
                xml.Append("<PaymentExecutionDetail>");
                xml.Append(paymentExecutionDetailObj.ToXMLFragment());
                xml.Append("</PaymentExecutionDetail>");
            }
            if (IsSetPaymentMethod())
            {
                xml.Append("<PaymentMethod>");
                xml.Append(this.PaymentMethod);
                xml.Append("</PaymentMethod>");
            }
            if (IsSetMarketplaceId())
            {
                xml.Append("<MarketplaceId>");
                xml.Append(EscapeXML(this.MarketplaceId));
                xml.Append("</MarketplaceId>");
            }
            if (IsSetBuyerEmail())
            {
                xml.Append("<BuyerEmail>");
                xml.Append(EscapeXML(this.BuyerEmail));
                xml.Append("</BuyerEmail>");
            }
            if (IsSetBuyerName())
            {
                xml.Append("<BuyerName>");
                xml.Append(EscapeXML(this.BuyerName));
                xml.Append("</BuyerName>");
            }
            if (IsSetShipmentServiceLevelCategory())
            {
                xml.Append("<ShipmentServiceLevelCategory>");
                xml.Append(EscapeXML(this.ShipmentServiceLevelCategory));
                xml.Append("</ShipmentServiceLevelCategory>");
            }
            if (IsSetShippedByAmazonTFM())
            {
                xml.Append("<ShippedByAmazonTFM>");
                xml.Append(this.ShippedByAmazonTFM);
                xml.Append("</ShippedByAmazonTFM>");
            }
            if (IsSetTFMShipmentStatus())
            {
                xml.Append("<TFMShipmentStatus>");
                xml.Append(EscapeXML(this.TFMShipmentStatus));
                xml.Append("</TFMShipmentStatus>");
            }
            if (IsSetCbaDisplayableShippingLabel())
            {
                xml.Append("<CbaDisplayableShippingLabel>");
                xml.Append(EscapeXML(this.CbaDisplayableShippingLabel));
                xml.Append("</CbaDisplayableShippingLabel>");
            }
            if (IsSetOrderType())
            {
                xml.Append("<OrderType>");
                xml.Append(EscapeXML(this.OrderType));
                xml.Append("</OrderType>");
            }
            if (IsSetEarliestShipDate())
            {
                xml.Append("<EarliestShipDate>");
                xml.Append(this.EarliestShipDate);
                xml.Append("</EarliestShipDate>");
            }
            if (IsSetLatestShipDate())
            {
                xml.Append("<LatestShipDate>");
                xml.Append(this.LatestShipDate);
                xml.Append("</LatestShipDate>");
            }
            return(xml.ToString());
        }
Пример #3
0
        /// <summary>
        /// XML fragment representation of this object
        /// </summary>
        /// <returns>XML fragment for this object.</returns>
        /// <remarks>
        /// Name for outer tag expected to be set by calling method.
        /// This fragment returns inner properties representation only
        /// </remarks>


        protected internal String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();

            if (IsSetASIN())
            {
                xml.Append("<ASIN>");
                xml.Append(EscapeXML(this.ASIN));
                xml.Append("</ASIN>");
            }
            if (IsSetSellerSKU())
            {
                xml.Append("<SellerSKU>");
                xml.Append(EscapeXML(this.SellerSKU));
                xml.Append("</SellerSKU>");
            }
            if (IsSetOrderItemId())
            {
                xml.Append("<OrderItemId>");
                xml.Append(EscapeXML(this.OrderItemId));
                xml.Append("</OrderItemId>");
            }
            if (IsSetTitle())
            {
                xml.Append("<Title>");
                xml.Append(EscapeXML(this.Title));
                xml.Append("</Title>");
            }
            if (IsSetQuantityOrdered())
            {
                xml.Append("<QuantityOrdered>");
                xml.Append(this.QuantityOrdered);
                xml.Append("</QuantityOrdered>");
            }
            if (IsSetQuantityShipped())
            {
                xml.Append("<QuantityShipped>");
                xml.Append(this.QuantityShipped);
                xml.Append("</QuantityShipped>");
            }
            if (IsSetItemPrice())
            {
                Money itemPriceObj = this.ItemPrice;
                xml.Append("<ItemPrice>");
                xml.Append(itemPriceObj.ToXMLFragment());
                xml.Append("</ItemPrice>");
            }
            if (IsSetShippingPrice())
            {
                Money shippingPriceObj = this.ShippingPrice;
                xml.Append("<ShippingPrice>");
                xml.Append(shippingPriceObj.ToXMLFragment());
                xml.Append("</ShippingPrice>");
            }
            if (IsSetGiftWrapPrice())
            {
                Money giftWrapPriceObj = this.GiftWrapPrice;
                xml.Append("<GiftWrapPrice>");
                xml.Append(giftWrapPriceObj.ToXMLFragment());
                xml.Append("</GiftWrapPrice>");
            }
            if (IsSetItemTax())
            {
                Money itemTaxObj = this.ItemTax;
                xml.Append("<ItemTax>");
                xml.Append(itemTaxObj.ToXMLFragment());
                xml.Append("</ItemTax>");
            }
            if (IsSetShippingTax())
            {
                Money shippingTaxObj = this.ShippingTax;
                xml.Append("<ShippingTax>");
                xml.Append(shippingTaxObj.ToXMLFragment());
                xml.Append("</ShippingTax>");
            }
            if (IsSetGiftWrapTax())
            {
                Money giftWrapTaxObj = this.GiftWrapTax;
                xml.Append("<GiftWrapTax>");
                xml.Append(giftWrapTaxObj.ToXMLFragment());
                xml.Append("</GiftWrapTax>");
            }
            if (IsSetShippingDiscount())
            {
                Money shippingDiscountObj = this.ShippingDiscount;
                xml.Append("<ShippingDiscount>");
                xml.Append(shippingDiscountObj.ToXMLFragment());
                xml.Append("</ShippingDiscount>");
            }
            if (IsSetPromotionDiscount())
            {
                Money promotionDiscountObj = this.PromotionDiscount;
                xml.Append("<PromotionDiscount>");
                xml.Append(promotionDiscountObj.ToXMLFragment());
                xml.Append("</PromotionDiscount>");
            }
            if (IsSetPromotionIds())
            {
                PromotionIdList promotionIdsObj = this.PromotionIds;
                xml.Append("<PromotionIds>");
                xml.Append(promotionIdsObj.ToXMLFragment());
                xml.Append("</PromotionIds>");
            }
            if (IsSetCODFee())
            {
                Money CODFeeObj = this.CODFee;
                xml.Append("<CODFee>");
                xml.Append(CODFeeObj.ToXMLFragment());
                xml.Append("</CODFee>");
            }
            if (IsSetCODFeeDiscount())
            {
                Money CODFeeDiscountObj = this.CODFeeDiscount;
                xml.Append("<CODFeeDiscount>");
                xml.Append(CODFeeDiscountObj.ToXMLFragment());
                xml.Append("</CODFeeDiscount>");
            }
            if (IsSetGiftMessageText())
            {
                xml.Append("<GiftMessageText>");
                xml.Append(EscapeXML(this.GiftMessageText));
                xml.Append("</GiftMessageText>");
            }
            if (IsSetGiftWrapLevel())
            {
                xml.Append("<GiftWrapLevel>");
                xml.Append(EscapeXML(this.GiftWrapLevel));
                xml.Append("</GiftWrapLevel>");
            }
            if (IsSetInvoiceData())
            {
                InvoiceData invoiceDataObj = this.InvoiceData;
                xml.Append("<InvoiceData>");
                xml.Append(invoiceDataObj.ToXMLFragment());
                xml.Append("</InvoiceData>");
            }
            return(xml.ToString());
        }