UNPKG

google-ads-api-client

Version:

A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.

81 lines 3.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomerServiceClient = void 0; const customer_service_1 = require("./customer_service"); const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); // Proto file describing the Customer service. /** * Service to manage customers. * * @generated from protobuf service google.ads.googleads.v11.services.CustomerService */ class CustomerServiceClient { constructor(_transport) { this._transport = _transport; this.typeName = customer_service_1.CustomerService.typeName; this.methods = customer_service_1.CustomerService.methods; this.options = customer_service_1.CustomerService.options; } /** * Updates a customer. Operation statuses are returned. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [DatabaseError]() * [FieldMaskError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * [UrlFieldError]() * * @generated from protobuf rpc: MutateCustomer(google.ads.googleads.v11.services.MutateCustomerRequest) returns (google.ads.googleads.v11.services.MutateCustomerResponse); */ mutateCustomer(input, options) { const method = this.methods[0], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Returns resource names of customers directly accessible by the * user authenticating the call. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: ListAccessibleCustomers(google.ads.googleads.v11.services.ListAccessibleCustomersRequest) returns (google.ads.googleads.v11.services.ListAccessibleCustomersResponse); */ listAccessibleCustomers(input, options) { const method = this.methods[1], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Creates a new client under manager. The new client customer is returned. * * List of thrown errors: * [AccessInvitationError]() * [AuthenticationError]() * [AuthorizationError]() * [CurrencyCodeError]() * [HeaderError]() * [InternalError]() * [ManagerLinkError]() * [QuotaError]() * [RequestError]() * [StringLengthError]() * [TimeZoneError]() * * @generated from protobuf rpc: CreateCustomerClient(google.ads.googleads.v11.services.CreateCustomerClientRequest) returns (google.ads.googleads.v11.services.CreateCustomerClientResponse); */ createCustomerClient(input, options) { const method = this.methods[2], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } } exports.CustomerServiceClient = CustomerServiceClient; //# sourceMappingURL=customer_service.client.js.map