<commit_before>/**
 * Sellers API requests and definitions for Amazon's MWS web services.
 * For information on using, please see examples folder.
 *
 * @author <NAME>
 */

var mws = require('./mws');
module.exports = {

    /**
     * Create
     *
     * @param {Object} config Object of all needed IDs
     * @param {Object} params Schemas for all supported parameters
     * @param {Boolean} xml Return xml if is true, default is false and returns js object
     * @param {Callback} cb Callback
     */
    GetServiceStatus : function(config, xml, cb) {

        xml = typeof xml !== 'undefined' ? xml : false;

        mws.createRequest({
            'Action': 'GetServiceStatus',
            'Config': config,
            'Parameters' : {},
            'Type' : 'Sellers',
            "Xml" : xml
        },function(err, data){
            cb(err, data);
        });


    },

    ListMarketplaceParticipations : function(config, xml, cb) {

        xml = typeof xml !== 'undefined' ? xml : false;

        mws.createRequest({
            'Action': 'ListMarketplaceParticipations',
            'Config': config,
            'Parameters' : {},
            'Type' : 'Sellers',
            "Xml" : xml
        },function(err, data){
            cb(err, data);
        });
    }
}<commit_msg>Added all methods for sellers endpoints<commit_after>/**
 * Sellers API requests and definitions for Amazon's MWS web services.
 * For information on using, please see examples folder.
 *
 * @author <NAME>
 */

var mws = require('./mws');
var _ = require('underscore');


/**
 * Contains main method  for Seller MWS endpoint
 *
 * @type {{GetServiceStatus: Function, ListMarketplaceParticipations: Function, ListMarketplaceParticipationsByNextToken: Function}}
 */
module.exports = {

    /**
     * Create
     *
     * @param {Object} config Object of all needed IDs
     * @param {Boolean} xml Return xml if is true, default is false and returns js object
     * @param {Callback} cb Callback
     */
    GetServiceStatus : function(config, xml, cb) {

        xml = typeof xml !== 'undefined' ? xml : false;

        mws.createRequest({
            'Action': 'GetServiceStatus',
            'Config': config,
            'Parameters' : {},
            'Type' : 'Sellers',
            "Xml" : xml
        },function(err, data){
            cb(err, data);
        });


    },

    /**
     *
     *
     * @param {Object} config
     * @param {Boolean} xml
     * @param {Callback} cb Callback
     */
    ListMarketplaceParticipations : function(config, xml, cb) {

        xml = typeof xml !== 'undefined' ? xml : false;

        mws.createRequest({
            'Action': 'ListMarketplaceParticipations',
            'Config': config,
            'Parameters' : {},
            'Type' : 'Sellers',
            "Xml" : xml
        },function(err, data){
            cb(err, data);
        });
    },


    /**
     *
     *
     * @param {Object} config
     * @param {Boolean} xml
     * @param {Object} params Schemas for all supported parameters
     * @param {Callback} cb Callback
     */
    ListMarketplaceParticipationsByNextToken : function (config, xml, params, cb){
        xml = typeof xml !== 'undefined' ? xml : false;

        if(!_.has(params, 'NextToken')){
            cb({
                "Error" : "You need to pass parameter NextToken"
            }, null);
            return;
        }

        mws.createRequest({
            'Action' : 'ListMarketplaceParticipationsByNextToken',
            'Config' : config,
            'Parameters' : params,
            'Type' : 'Sellers',
            'Xml' : xml
        },function(){
           cb(err,data);
        });
    }
}
{'fraction_non_alphanumeric': 0.1303169872663235, 'fraction_numerical': 0.0, 'mean_word_length': 1.9418326693227093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 31}, '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': '4842569', 'n_tokens_mistral': 1049, 'n_tokens_neox': 1004, 'n_words': 296}