question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended asked

ShippingAddress is not complete

I need to get my eBay sellings. Although I said to return all, eBay response returned me a short shipping address. Look

Request


<GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<!-- ......... -->
<DetailLevel>ReturnAll</DetailLevel>
<!-- ......... -->

Response:


<SoldList>
<OrderTransactionArray>
<OrderTransaction>
<Transaction>
<Buyer>
<Email>email123@live.com</Email>
<UserID>user123</UserID>
<BuyerInfo>
<ShippingAddress>
<Country>US</Country>
<PostalCode>123456</PostalCode>
</ShippingAddress>

There is no detailed information in ShippingAddress, only country and postal code. However, I need it to be exact.

Did I miss anything?

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
gfiopcc avatar image
0 Likes"
gfiopcc answered

 

            OrderType orderType = null;

 

            if (this.OrderID == null)

            {

                GetOrderTransactionsCall apiCall = new GetOrderTransactionsCall(context);

 

                ItemTransactionIDTypeCollection conditionCollection = new ItemTransactionIDTypeCollection();

                ItemTransactionIDType type = new ItemTransactionIDType();

                type.ItemID = this.ItemID;

                type.TransactionID = this.TransactionID;

                conditionCollection.Add(type);

 

                OrderTypeCollection orderCollection = apiCall.GetOrderTransactions(conditionCollection);

 

                if (orderCollection.Count > 0)

                {

                    orderType = orderCollection[0];

                }

            }

            else

            {

                GetOrdersCall apiCall = new GetOrdersCall(context);

                OrderTypeCollection orderCollection = apiCall.GetOrders(new StringCollection() { this.OrderID });

 

                if (orderCollection.Count > 0)

                {

                    orderType = orderCollection[0];

                }

            }

 

            if (orderType == null)

            {

                return false;

            }

 

            AddressType addrType = orderType.ShippingAddress;

 

            this.Contact = addrType.Name;

            if (String.IsNullOrEmpty(addrType.Street) == false)

            {

                this.Street = addrType.Street;

            }

            else if (String.IsNullOrEmpty(addrType.Street1) == false)

            {

                this.Street = addrType.Street1;

            }

            else if (String.IsNullOrEmpty(addrType.Street2) == false)

            {

                this.Street = addrType.Street2;

            }

 

            this.BuyerNation = ModelNation.DicNation[addrType.Country.ToString()];

            this.City = addrType.CityName;

            this.Province = addrType.StateOrProvince;

            this.Postcode = addrType.PostalCode;

            this.Phone = addrType.Phone;

 

 

Good Luck.

 

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.