Service to manage aggregate product statuses. v1
Package
@google-shopping/issueresolutionConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of AggregateProductStatusesServiceClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
aggregateProductStatusesServiceStub
aggregateProductStatusesServiceStub?: Promise<{
[name: string]: Function;
}>;apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;descriptors
descriptors: Descriptors;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};port
static get port(): number;The port for this API service.
scopes
static get scopes(): string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
accountPath(account)
accountPath(account: string): string;Return a fully-qualified account resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
aggregateProductStatusPath(account, aggregateProductStatus)
aggregateProductStatusPath(account: string, aggregateProductStatus: string): string;Return a fully-qualified aggregateProductStatus resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
aggregateProductStatus |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
close()
close(): Promise<void>;Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
getProjectId()
getProjectId(): Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
listAggregateProductStatuses(request, options)
listAggregateProductStatuses(request?: protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus[],
protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest | null,
protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse
]>;Lists the AggregateProductStatuses resources for your merchant account. The response might contain fewer items than specified by pageSize. If pageToken was returned in previous request, it can be used to obtain additional results.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAggregateProductStatusesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus[],
protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest | null,
protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listAggregateProductStatuses(request, options, callback)
listAggregateProductStatuses(request: protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, options: CallOptions, callback: PaginationCallback<protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse | null | undefined, protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAggregateProductStatusesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse | null | undefined, protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAggregateProductStatuses(request, callback)
listAggregateProductStatuses(request: protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, callback: PaginationCallback<protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse | null | undefined, protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAggregateProductStatusesRequest
|
callback |
PaginationCallback<protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesResponse | null | undefined, protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAggregateProductStatusesAsync(request, options)
listAggregateProductStatusesAsync(request?: protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, options?: CallOptions): AsyncIterable<protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus>;Equivalent to listAggregateProductStatuses, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAggregateProductStatusesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.shopping.merchant.issueresolution.v1.IAggregateProductStatus> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The account to list aggregate product statuses for.
* Format: `accounts/{account}`
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of aggregate product statuses to return. The
* service may return fewer than this value. If unspecified, at most 25
* aggregate product statuses are returned. The maximum value is 250; values
* above 250 are coerced to 250.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous
* `ListAggregateProductStatuses` call. Provide this to retrieve the
* subsequent page.
* When paginating, all other parameters provided to
* `ListAggregateProductStatuses` must match the call that provided the page
* token.
*/
// const pageToken = 'abc123'
/**
* Optional. A filter expression that filters the aggregate product statuses.
* Filtering is only supported by the `reporting_context` and `country` field.
* For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`.
*/
// const filter = 'abc123'
// Imports the Issueresolution library
const {AggregateProductStatusesServiceClient} = require('@google-shopping/issueresolution').v1;
// Instantiates a client
const issueresolutionClient = new AggregateProductStatusesServiceClient();
async function callListAggregateProductStatuses() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = issueresolutionClient.listAggregateProductStatusesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAggregateProductStatuses();
listAggregateProductStatusesStream(request, options)
listAggregateProductStatusesStream(request?: protos.google.shopping.merchant.issueresolution.v1.IListAggregateProductStatusesRequest, options?: CallOptions): Transform;Equivalent to listAggregateProductStatuses, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAggregateProductStatusesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
matchAccountFromAccountName(accountName)
matchAccountFromAccountName(accountName: string): string | number;Parse the account from Account resource.
| Parameter | |
|---|---|
| Name | Description |
accountName |
string
A fully-qualified path representing Account resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromAggregateProductStatusName(aggregateProductStatusName)
matchAccountFromAggregateProductStatusName(aggregateProductStatusName: string): string | number;Parse the account from AggregateProductStatus resource.
| Parameter | |
|---|---|
| Name | Description |
aggregateProductStatusName |
string
A fully-qualified path representing AggregateProductStatus resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAggregateProductStatusFromAggregateProductStatusName(aggregateProductStatusName)
matchAggregateProductStatusFromAggregateProductStatusName(aggregateProductStatusName: string): string | number;Parse the aggregate_product_status from AggregateProductStatus resource.
| Parameter | |
|---|---|
| Name | Description |
aggregateProductStatusName |
string
A fully-qualified path representing AggregateProductStatus resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the aggregate_product_status. |