UNPKG

ebay-api

Version:

eBay API for Node and Browser

57 lines (56 loc) 2.25 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const index_js_1 = __importDefault(require("../../index.js")); /** * Service for providing the compliance violations of seller account/listings */ class Compliance extends index_js_1.default { get basePath() { return '/sell/compliance/v1'; } /** * This call returns listing violation counts for a seller. * * @param complianceType A user passes in one or more compliance type values through this query parameter. */ getListingViolationsSummary(complianceType) { return this.get(`/listing_violation_summary`, { params: { compliance_type: complianceType } }); } /** * This call returns specific listing violations for five different compliance types. * * @param complianceType A user passes in one or more compliance type values through this query parameter. * @param offset The first policy violation to return based on its position in the collection of listing * violations. * @param listingId * @param limit This query parameter is used if the user wants to set a limit on the number of listing violations * that are returned in the current result set. */ getListingViolations({ complianceType, offset, listingId, limit } = {}) { return this.get(`/listing_violation`, { params: { compliance_type: complianceType, offset, listing_id: listingId, limit } }); } /** * This call suppresses a listing violation for a specific listing. Only listing violations in the AT_RISK state (returned in the violations.complianceState field of the getListingViolations call) can be suppressed. * * @param body SuppressViolationRequest */ suppressViolation(body) { return this.post(`/suppress_listing_violation`, body); } } exports.default = Compliance; Compliance.id = 'Compliance';