<commit_before>"""
Amazon MWS Inventory Fulfillment API
"""
from __future__ import absolute_import

from ..mws import MWS
from .. import utils
from ..decorators import next_token_action


class Inventory(MWS):
    """
    Amazon MWS Inventory Fulfillment API

    Docs:
    http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_Overview.html
    """
    URI = '/FulfillmentInventory/2010-10-01'
    VERSION = '2010-10-01'
    NAMESPACE = "{http://mws.amazonaws.com/FulfillmentInventory/2010-10-01}"
    NEXT_TOKEN_OPERATIONS = [
        'ListInventorySupply',
    ]

    @next_token_action('ListInventorySupply')
    def list_inventory_supply(self, skus=(), datetime_=None,
                              response_group='Basic', next_token=None):
        """
        Returns information on available inventory

        Pass `next_token` to call "ListInventorySupplyByNextToken" instead.

        Docs:
        http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
        """
        data = {
            'Action': 'ListInventorySupply',
            'QueryStartDateTime': datetime_,
            'ResponseGroup': response_group,
        }
        data.update(utils.enumerate_param('SellerSkus.member.', skus))
        return self.make_request(data, "POST")
<commit_msg>Add merchant id inventory (#17) (#18)<commit_after>"""
Amazon MWS Inventory Fulfillment API
"""
from __future__ import absolute_import

from ..mws import MWS
from .. import utils
from ..decorators import next_token_action


class Inventory(MWS):
    """
    Amazon MWS Inventory Fulfillment API

    Docs:
    http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_Overview.html
    """
    URI = '/FulfillmentInventory/2010-10-01'
    VERSION = '2010-10-01'
    NAMESPACE = "{http://mws.amazonaws.com/FulfillmentInventory/2010-10-01}"
    NEXT_TOKEN_OPERATIONS = [
        'ListInventorySupply',
    ]

    @next_token_action('ListInventorySupply')
    def list_inventory_supply(self, skus=(), marketplace_id=None, datetime_=None,
                              response_group='Basic', next_token=None):
        """
        Returns information on available inventory

        Pass `next_token` to call "ListInventorySupplyByNextToken" instead.

        Docs:
        http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
        """
        data = {
            'Action': 'ListInventorySupply',
            'QueryStartDateTime': datetime_,
            'ResponseGroup': response_group,
            'MerchantId': marketplace_id
        }
        data.update(utils.enumerate_param('SellerSkus.member.', skus))
        return self.make_request(data, "POST")

{'fraction_non_alphanumeric': 0.108, 'fraction_numerical': 0.01890909090909091, 'mean_word_length': 2.946915351506456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '197099', 'n_tokens_mistral': 890, 'n_tokens_neox': 838, 'n_words': 148}