@guardian/google-admanager-api
Version:
Google Ad Manager API Client Library for NodeJs
30 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompanyService = void 0;
class CompanyService {
constructor(client) {
this._client = client;
}
async createCompanies(companies) {
return this._client.createCompanies({ companies });
}
async getCompaniesByStatement(filterStatement) {
return this._client.getCompaniesByStatement({
filterStatement,
});
}
async performCompanyAction(companyAction, filterStatement) {
console.log(companyAction.constructor.name);
return this._client.performCompanyAction({
companyAction: Object.assign({ attributes: {
"xsi:type": companyAction.constructor.name,
} }, companyAction.buildAttributes()),
statement: filterStatement,
});
}
async updateCompanies(companies) {
return this._client.updateCompanies({ companies });
}
}
exports.CompanyService = CompanyService;
//# sourceMappingURL=company.service.js.map