Closed jogaco closed 6 years ago
@jogaco could you post the full XML response? And which version of eBayr are you using? I'll see if I can reproduce it.
<?xml version="1.0" encoding="UTF-8"?>
<GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2015-09-02T12:57:18.495Z</Timestamp>
<Ack>Success</Ack>
<Version>933</Version>
<Build>E933_CORE_API_17621244_R1</Build>
<Item>
<Country>GB</Country>
<Currency>GBP</Currency>
<Description>&nbsp;measures 20" pit to pit when laid flat<br></Description>
<ItemID>351489938299</ItemID>
<ListingDetails>
<ConvertedBuyItNowPrice currencyID="USD">0.0</ConvertedBuyItNowPrice>
<ConvertedStartPrice currencyID="USD">7.65</ConvertedStartPrice>
<StartTime>2015-08-23T12:54:37.000Z</StartTime>
<EndTime>2015-09-02T12:54:37.000Z</EndTime>
</ListingDetails>
<ListingType>Chinese</ListingType>
<SellingStatus>
<BidCount>3</BidCount>
<ConvertedCurrentPrice currencyID="USD">13.79</ConvertedCurrentPrice>
<CurrentPrice currencyID="GBP">9.0</CurrentPrice>
<QuantitySold>1</QuantitySold>
</SellingStatus>
<Title>New York Giants american football shirt Reebok Jeremy Shockey small</Title>
<PictureDetails>
<GalleryURL>http://i.ebayimg.com/00/s/MTAyNFg3Njg=/z/~ooAAOSwDNdV2cH4/$_1.JPG?set_id=880000500F</GalleryURL>
</PictureDetails>
</Item>
</GetItemResponse>
req[:item][:listing_details] => {:converted_buy_it_now_price=>"0.0", :converted_start_price=>"9.18", :start_time=>"2015-08-23T11:15:07.000Z", :end_time=>"2015-09-02T11:15:07.000Z"}
I need the currencyID attributes!
Currently using ebayr 0.0.9
This would probably require an xml parser such as https://github.com/johannesthoma/libxml-to-hash
The attributes are rarely relevant in an eBayResponse. How about a method (Ebayr::Response#attributes, say) that can reparse the body XML specifically to extract the attributes?
Maybe it could parse upfront for attributes by passing an optional param in Ebayr::Request#send(with_attributes = nil)
Closing due to lack of activity. Feel free to re-open if this is still an issue for somebody.
If the ebay API returns
req[:item][:selling_status] will not contain attribute info.