Amazon MWS Boto parsed XML missing values
<p>Boto 2.40, Python 3.5</p>

<p>When querying Amazon MWS <code>get_competitive_pricing_for_asin</code> some values that are present in the raw XML are missing once parsed by Boto.</p>

<p>The raw XML contains the number of offers for each condition in <code>NumberOfOfferListings</code></p>

<pre><code>&lt;CompetitivePricing&gt;
    &lt;CompetitivePrices&gt;
      &lt;CompetitivePrice belongsToRequester="false" condition="New" subcondition="New"&gt;
        &lt;CompetitivePriceId&gt;1&lt;/CompetitivePriceId&gt;
        &lt;Price&gt;
          &lt;LandedPrice&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;18.00&lt;/Amount&gt;
          &lt;/LandedPrice&gt;
          &lt;ListingPrice&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;18.00&lt;/Amount&gt;
          &lt;/ListingPrice&gt;
          &lt;Shipping&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;0.00&lt;/Amount&gt;
          &lt;/Shipping&gt;
        &lt;/Price&gt;
      &lt;/CompetitivePrice&gt;
      &lt;CompetitivePrice belongsToRequester="false" condition="Used" subcondition="VeryGood"&gt;
        &lt;CompetitivePriceId&gt;2&lt;/CompetitivePriceId&gt;
        &lt;Price&gt;
          &lt;LandedPrice&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;100.00&lt;/Amount&gt;
          &lt;/LandedPrice&gt;
          &lt;ListingPrice&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;100.00&lt;/Amount&gt;
          &lt;/ListingPrice&gt;
          &lt;Shipping&gt;
            &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
            &lt;Amount&gt;0.00&lt;/Amount&gt;
          &lt;/Shipping&gt;
        &lt;/Price&gt;
      &lt;/CompetitivePrice&gt;
    &lt;/CompetitivePrices&gt;
    &lt;NumberOfOfferListings&gt;
      &lt;OfferListingCount condition="New"&gt;109&lt;/OfferListingCount&gt;
      &lt;OfferListingCount condition="Collectible"&gt;1&lt;/OfferListingCount&gt;
      &lt;OfferListingCount condition="Used"&gt;51&lt;/OfferListingCount&gt;
      &lt;OfferListingCount condition="Any"&gt;161&lt;/OfferListingCount&gt;
    &lt;/NumberOfOfferListings&gt;
  &lt;/CompetitivePricing&gt;
</code></pre>

<p>However only the <code>Any</code> value is kept by Boto:</p>

<pre><code>    CompetitivePricing{}(
        TradeInValue: None, 
        CompetitivePrices: CompetitivePriceList{}(
            CompetitivePrice: [
                CompetitivePrice{'condition': 'New', 'belongsToRequester': 'false', 'subcondition': 'New'}(
                    CompetitivePriceId: '1', 
                    Price: Price{}(
                        Shipping: USD 0.00, 
                        LandedPrice: USD 18.00, 
                        ListingPrice: USD 18.00
                    )
                ), 
                CompetitivePrice{'condition': 'Used', 'belongsToRequester': 'false', 'subcondition': 'VeryGood'}(
                    CompetitivePriceId: '2', 
                    Price: Price{}(
                        Shipping: USD 0.00, 
                        LandedPrice: USD 100.00, 
                        ListingPrice: USD 100.00
                    )
                )
            ]
        ), 
        NumberOfOfferListings: [''], 
        OfferListingCount: 161{'condition': 'Any'}
    )
</code></pre>

<p>Note that <code>NumberOfOfferListings</code> contains an empty string in the parsed response, and only one <code>OfferListingCount</code> from the XML was saved and added as a new attribute.</p>

<p>Does anyone know why the other <code>OfferListingCount</code> values are being dropped, or have a good suggestion on how to preserve those values?</p>

<p>I've searched and read the source code: <a href="https://github.com/boto/boto/blob/develop/boto/mws/response.py#L520" rel="nofollow">https://github.com/boto/boto/blob/develop/boto/mws/response.py#L520</a> and can't figure out where it's dropping those values. I have tried this with multiple products and get the same results.</p>

<p><strong>EDIT:</strong> I've tried playing around with monkey-patching <code>CompetitivePricing</code>:</p>

<pre><code>class OfferListingCount(ResponseElement):
    pass


CompetitivePricing.NumberOfOfferListings = Element(OfferListingCount=ElementList(OfferListingCount))
</code></pre>

<p>That gives me a full list of conditions:</p>

<pre><code>NumberOfOfferListings: ^NumberOfOfferListings^{}(
    OfferListingCount: [
        OfferListingCount{'condition': 'New'}(), 
        OfferListingCount{'condition': 'Collectible'}(), 
        OfferListingCount{'condition': 'Used'}(), 
        OfferListingCount{'condition': 'Any'}()
    ]
)
</code></pre>

<p>But without the values.</p>

<p>If I use <code>SimpleList</code>: </p>

<pre><code>class OfferListingCount(ResponseElement):
    pass


CompetitivePricing.NumberOfOfferListings = Element(OfferListingCount=SimpleList(OfferListingCount))
</code></pre>

<p>I get the values but not the conditions:</p>

<pre><code>NumberOfOfferListings: ^NumberOfOfferListings^{}(
    OfferListingCount: ['109', '1', '54', '164']
)
</code></pre>

<p>So close</p>