Service to support Accounts API. v1
Package
@google-shopping/accountsConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of AccountsServiceClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
accountsServiceStub
accountsServiceStub?: 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
accountIssuePath(account, issue)
accountIssuePath(account: string, issue: string): string;Return a fully-qualified accountIssue resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
issue |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
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. |
accountRelationshipPath(account, relationship)
accountRelationshipPath(account: string, relationship: string): string;Return a fully-qualified accountRelationship resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
relationship |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
accountServicePath(account, service)
accountServicePath(account: string, service: string): string;Return a fully-qualified accountService resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
service |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
autofeedSettingsPath(account)
autofeedSettingsPath(account: string): string;Return a fully-qualified autofeedSettings resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
automaticImprovementsPath(account)
automaticImprovementsPath(account: string): string;Return a fully-qualified automaticImprovements resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
businessIdentityPath(account)
businessIdentityPath(account: string): string;Return a fully-qualified businessIdentity resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
businessInfoPath(account)
businessInfoPath(account: string): string;Return a fully-qualified businessInfo resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
checkoutSettingsPath(account, program)
checkoutSettingsPath(account: string, program: string): string;Return a fully-qualified checkoutSettings resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
program |
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. |
createAndConfigureAccount(request, options)
createAndConfigureAccount(request?: protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | undefined,
{} | undefined
]>;Creates a Merchant Center account with additional configuration. Adds the user that makes the request as an admin for the new account.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAndConfigureAccountRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Account. 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 be created.
*/
// const account = {}
/**
* Optional. Users to be added to the account.
*/
// const user = [1,2,3,4]
/**
* Required. An account service between the account to be created and the
* provider account is initialized as part of the creation. At least one such
* service needs to be provided. Currently exactly one of these needs to be
* `account_aggregation` and `accounts.createAndConfigure` method can be
* used to create a sub-account under an existing advanced account through
* this method. Additional `account_management` or
* `products_management` services may be provided.
*/
// const service = [1,2,3,4]
/**
* Optional. If a relationship is created with a provider, you can set an
* alias for it with this field. The calling user must be an admin on the
* provider to be able to set an alias.
*/
// const setAlias = [1,2,3,4]
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callCreateAndConfigureAccount() {
// Construct request
const request = {
account,
service,
};
// Run request
const response = await accountsClient.createAndConfigureAccount(request);
console.log(response);
}
callCreateAndConfigureAccount();
createAndConfigureAccount(request, options, callback)
createAndConfigureAccount(request: protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAndConfigureAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createAndConfigureAccount(request, callback)
createAndConfigureAccount(request: protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAndConfigureAccountRequest
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateAndConfigureAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createTestAccount(request, options)
createTestAccount(request?: protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | undefined,
{} | undefined
]>;Creates a Merchant Center test account.
Test accounts are intended for development and testing purposes, such as validating API integrations or new feature behavior.
Key characteristics and limitations of test accounts: - Immutable Type: A test account cannot be converted into a regular (live) Merchant Center account. Likewise, a regular account cannot be converted into a test account. - Non-Serving Products: Any products, offers, or data created within a test account will not be published or made visible to end-users on any Google surfaces. They are strictly for testing environments. - Separate Environment: Test accounts operate in a sandbox-like manner, isolated from live serving and real user traffic.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateTestAccountRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Account. 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 resource name to create the test account under.
* Format: accounts/{account}
*/
// const parent = 'abc123'
/**
* Required. The account to be created.
*/
// const account = {}
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callCreateTestAccount() {
// Construct request
const request = {
parent,
account,
};
// Run request
const response = await accountsClient.createTestAccount(request);
console.log(response);
}
callCreateTestAccount();
createTestAccount(request, options, callback)
createTestAccount(request: protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateTestAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createTestAccount(request, callback)
createTestAccount(request: protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateTestAccountRequest
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.ICreateTestAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAccount(request, options)
deleteAccount(request?: protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | undefined,
{} | undefined
]>;Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the force parameter to override this.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAccountRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 name of the account to delete.
* Format: `accounts/{account}`
*/
// const name = 'abc123'
/**
* Optional. If set to `true`, the account is deleted even if it provides
* services to other accounts or has processed offers.
*/
// const force = true
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callDeleteAccount() {
// Construct request
const request = {
name,
};
// Run request
const response = await accountsClient.deleteAccount(request);
console.log(response);
}
callDeleteAccount();
deleteAccount(request, options, callback)
deleteAccount(request: protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAccount(request, callback)
deleteAccount(request: protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAccountRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.shopping.merchant.accounts.v1.IDeleteAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
developerRegistrationPath(account)
developerRegistrationPath(account: string): string;Return a fully-qualified developerRegistration resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
emailPreferencesPath(account, email)
emailPreferencesPath(account: string, email: string): string;Return a fully-qualified emailPreferences resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
email |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
gbpAccountPath(account, gbpAccount)
gbpAccountPath(account: string, gbpAccount: string): string;Return a fully-qualified gbpAccount resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
gbpAccount |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
getAccount(request, options)
getAccount(request?: protos.google.shopping.merchant.accounts.v1.IGetAccountRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | undefined,
{} | undefined
]>;Retrieves an account from your Merchant Center account. After inserting, updating, or deleting an account, it may take several minutes before changes take effect.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetAccountRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Account. 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 name of the account to retrieve.
* Format: `accounts/{account}`
*/
// const name = 'abc123'
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callGetAccount() {
// Construct request
const request = {
name,
};
// Run request
const response = await accountsClient.getAccount(request);
console.log(response);
}
callGetAccount();
getAccount(request, options, callback)
getAccount(request: protos.google.shopping.merchant.accounts.v1.IGetAccountRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAccount(request, callback)
getAccount(request: protos.google.shopping.merchant.accounts.v1.IGetAccountRequest, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAccountRequest
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IGetAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
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 |
|
homepagePath(account)
homepagePath(account: string): string;Return a fully-qualified homepage resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
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. |
lfpProviderPath(account, omnichannelSetting, lfpProvider)
lfpProviderPath(account: string, omnichannelSetting: string, lfpProvider: string): string;Return a fully-qualified lfpProvider resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
omnichannelSetting |
string
|
lfpProvider |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
listAccounts(request, options)
listAccounts(request?: protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount[],
protos.google.shopping.merchant.accounts.v1.IListAccountsRequest | null,
protos.google.shopping.merchant.accounts.v1.IListAccountsResponse
]>;Note: For the accounts.list method, quota and limits usage are charged for each user, and not for the Merchant Center ID or the advanced account ID. To list several sub-accounts, you should use the accounts.listSubaccounts method, which is more suitable for advanced accounts use case.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAccountsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount[],
protos.google.shopping.merchant.accounts.v1.IListAccountsRequest | null,
protos.google.shopping.merchant.accounts.v1.IListAccountsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of Account. 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 |
listAccounts(request, options, callback)
listAccounts(request: protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, options: CallOptions, callback: PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAccountsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAccounts(request, callback)
listAccounts(request: protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, callback: PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAccountsRequest
|
callback |
PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAccountsAsync(request, options)
listAccountsAsync(request?: protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, options?: CallOptions): AsyncIterable<protos.google.shopping.merchant.accounts.v1.IAccount>;Equivalent to listAccounts, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAccountsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.shopping.merchant.accounts.v1.IAccount> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Account. 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.
*/
/**
* Optional. The maximum number of accounts to return. The service may return
* fewer than this value. If unspecified, at most 250 accounts are returned.
* The maximum value is 500; values above 500 are coerced to 500.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `accounts.list` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided in the `accounts.list`
* request must match the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. Returns only accounts that match the
* filter (https://developers.google.com/merchant/api/guides/accounts/filter).
* For more details, see the
* filter syntax
* reference (https://developers.google.com/merchant/api/guides/accounts/filter-syntax).
*/
// const filter = 'abc123'
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callListAccounts() {
// Construct request
const request = {
};
// Run request
const iterable = accountsClient.listAccountsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAccounts();
listAccountsStream(request, options)
listAccountsStream(request?: protos.google.shopping.merchant.accounts.v1.IListAccountsRequest, options?: CallOptions): Transform;Equivalent to listAccounts, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAccountsRequest
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 Account 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 |
listSubAccounts(request, options)
listSubAccounts(request?: protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount[],
protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest | null,
protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse
]>;List all sub-accounts for a given advanced account. This is a convenience wrapper for the more powerful accounts.list method. This method will produce the same results as calling ListsAccounts with the following filter: relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))
| Parameters | |
|---|---|
| Name | Description |
request |
IListSubAccountsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount[],
protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest | null,
protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of Account. 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 |
listSubAccounts(request, options, callback)
listSubAccounts(request: protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, options: CallOptions, callback: PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListSubAccountsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listSubAccounts(request, callback)
listSubAccounts(request: protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, callback: PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListSubAccountsRequest
|
callback |
PaginationCallback<protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, protos.google.shopping.merchant.accounts.v1.IListSubAccountsResponse | null | undefined, protos.google.shopping.merchant.accounts.v1.IAccount>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listSubAccountsAsync(request, options)
listSubAccountsAsync(request?: protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, options?: CallOptions): AsyncIterable<protos.google.shopping.merchant.accounts.v1.IAccount>;Equivalent to listSubAccounts, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListSubAccountsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.shopping.merchant.accounts.v1.IAccount> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Account. 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 aggregation service provider.
* Format: `accounts/{accountId}`
*/
// const provider = 'abc123'
/**
* Optional. The maximum number of accounts to return. The service may return
* fewer than this value. If unspecified, at most 250 accounts are returned.
* The maximum value is 500; values above 500 are coerced to 500.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `accounts.list` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided in the `accounts.list`
* request must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callListSubAccounts() {
// Construct request
const request = {
provider,
};
// Run request
const iterable = accountsClient.listSubAccountsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListSubAccounts();
listSubAccountsStream(request, options)
listSubAccountsStream(request?: protos.google.shopping.merchant.accounts.v1.IListSubAccountsRequest, options?: CallOptions): Transform;Equivalent to listSubAccounts, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListSubAccountsRequest
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 Account 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 |
matchAccountFromAccountIssueName(accountIssueName)
matchAccountFromAccountIssueName(accountIssueName: string): string | number;Parse the account from AccountIssue resource.
| Parameter | |
|---|---|
| Name | Description |
accountIssueName |
string
A fully-qualified path representing AccountIssue resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
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. |
matchAccountFromAccountRelationshipName(accountRelationshipName)
matchAccountFromAccountRelationshipName(accountRelationshipName: string): string | number;Parse the account from AccountRelationship resource.
| Parameter | |
|---|---|
| Name | Description |
accountRelationshipName |
string
A fully-qualified path representing AccountRelationship resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromAccountServiceName(accountServiceName)
matchAccountFromAccountServiceName(accountServiceName: string): string | number;Parse the account from AccountService resource.
| Parameter | |
|---|---|
| Name | Description |
accountServiceName |
string
A fully-qualified path representing AccountService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromAutofeedSettingsName(autofeedSettingsName)
matchAccountFromAutofeedSettingsName(autofeedSettingsName: string): string | number;Parse the account from AutofeedSettings resource.
| Parameter | |
|---|---|
| Name | Description |
autofeedSettingsName |
string
A fully-qualified path representing AutofeedSettings resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromAutomaticImprovementsName(automaticImprovementsName)
matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string): string | number;Parse the account from AutomaticImprovements resource.
| Parameter | |
|---|---|
| Name | Description |
automaticImprovementsName |
string
A fully-qualified path representing AutomaticImprovements resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromBusinessIdentityName(businessIdentityName)
matchAccountFromBusinessIdentityName(businessIdentityName: string): string | number;Parse the account from BusinessIdentity resource.
| Parameter | |
|---|---|
| Name | Description |
businessIdentityName |
string
A fully-qualified path representing BusinessIdentity resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromBusinessInfoName(businessInfoName)
matchAccountFromBusinessInfoName(businessInfoName: string): string | number;Parse the account from BusinessInfo resource.
| Parameter | |
|---|---|
| Name | Description |
businessInfoName |
string
A fully-qualified path representing BusinessInfo resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromCheckoutSettingsName(checkoutSettingsName)
matchAccountFromCheckoutSettingsName(checkoutSettingsName: string): string | number;Parse the account from CheckoutSettings resource.
| Parameter | |
|---|---|
| Name | Description |
checkoutSettingsName |
string
A fully-qualified path representing CheckoutSettings resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromDeveloperRegistrationName(developerRegistrationName)
matchAccountFromDeveloperRegistrationName(developerRegistrationName: string): string | number;Parse the account from DeveloperRegistration resource.
| Parameter | |
|---|---|
| Name | Description |
developerRegistrationName |
string
A fully-qualified path representing DeveloperRegistration resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromEmailPreferencesName(emailPreferencesName)
matchAccountFromEmailPreferencesName(emailPreferencesName: string): string | number;Parse the account from EmailPreferences resource.
| Parameter | |
|---|---|
| Name | Description |
emailPreferencesName |
string
A fully-qualified path representing EmailPreferences resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromGbpAccountName(gbpAccountName)
matchAccountFromGbpAccountName(gbpAccountName: string): string | number;Parse the account from GbpAccount resource.
| Parameter | |
|---|---|
| Name | Description |
gbpAccountName |
string
A fully-qualified path representing GbpAccount resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromHomepageName(homepageName)
matchAccountFromHomepageName(homepageName: string): string | number;Parse the account from Homepage resource.
| Parameter | |
|---|---|
| Name | Description |
homepageName |
string
A fully-qualified path representing Homepage resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromLfpProviderName(lfpProviderName)
matchAccountFromLfpProviderName(lfpProviderName: string): string | number;Parse the account from LfpProvider resource.
| Parameter | |
|---|---|
| Name | Description |
lfpProviderName |
string
A fully-qualified path representing LfpProvider resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromOmnichannelSettingName(omnichannelSettingName)
matchAccountFromOmnichannelSettingName(omnichannelSettingName: string): string | number;Parse the account from OmnichannelSetting resource.
| Parameter | |
|---|---|
| Name | Description |
omnichannelSettingName |
string
A fully-qualified path representing OmnichannelSetting resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromOnlineReturnPolicyName(onlineReturnPolicyName)
matchAccountFromOnlineReturnPolicyName(onlineReturnPolicyName: string): string | number;Parse the account from OnlineReturnPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
onlineReturnPolicyName |
string
A fully-qualified path representing OnlineReturnPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromProgramName(programName)
matchAccountFromProgramName(programName: string): string | number;Parse the account from Program resource.
| Parameter | |
|---|---|
| Name | Description |
programName |
string
A fully-qualified path representing Program resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromRegionName(regionName)
matchAccountFromRegionName(regionName: string): string | number;Parse the account from Region resource.
| Parameter | |
|---|---|
| Name | Description |
regionName |
string
A fully-qualified path representing Region resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromShippingSettingsName(shippingSettingsName)
matchAccountFromShippingSettingsName(shippingSettingsName: string): string | number;Parse the account from ShippingSettings resource.
| Parameter | |
|---|---|
| Name | Description |
shippingSettingsName |
string
A fully-qualified path representing ShippingSettings resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromTermsOfServiceAgreementStateName(termsOfServiceAgreementStateName)
matchAccountFromTermsOfServiceAgreementStateName(termsOfServiceAgreementStateName: string): string | number;Parse the account from TermsOfServiceAgreementState resource.
| Parameter | |
|---|---|
| Name | Description |
termsOfServiceAgreementStateName |
string
A fully-qualified path representing TermsOfServiceAgreementState resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchAccountFromUserName(userName)
matchAccountFromUserName(userName: string): string | number;Parse the account from User resource.
| Parameter | |
|---|---|
| Name | Description |
userName |
string
A fully-qualified path representing User resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the account. |
matchEmailFromEmailPreferencesName(emailPreferencesName)
matchEmailFromEmailPreferencesName(emailPreferencesName: string): string | number;Parse the email from EmailPreferences resource.
| Parameter | |
|---|---|
| Name | Description |
emailPreferencesName |
string
A fully-qualified path representing EmailPreferences resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the email. |
matchEmailFromUserName(userName)
matchEmailFromUserName(userName: string): string | number;Parse the email from User resource.
| Parameter | |
|---|---|
| Name | Description |
userName |
string
A fully-qualified path representing User resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the email. |
matchGbpAccountFromGbpAccountName(gbpAccountName)
matchGbpAccountFromGbpAccountName(gbpAccountName: string): string | number;Parse the gbp_account from GbpAccount resource.
| Parameter | |
|---|---|
| Name | Description |
gbpAccountName |
string
A fully-qualified path representing GbpAccount resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the gbp_account. |
matchIdentifierFromTermsOfServiceAgreementStateName(termsOfServiceAgreementStateName)
matchIdentifierFromTermsOfServiceAgreementStateName(termsOfServiceAgreementStateName: string): string | number;Parse the identifier from TermsOfServiceAgreementState resource.
| Parameter | |
|---|---|
| Name | Description |
termsOfServiceAgreementStateName |
string
A fully-qualified path representing TermsOfServiceAgreementState resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the identifier. |
matchIssueFromAccountIssueName(accountIssueName)
matchIssueFromAccountIssueName(accountIssueName: string): string | number;Parse the issue from AccountIssue resource.
| Parameter | |
|---|---|
| Name | Description |
accountIssueName |
string
A fully-qualified path representing AccountIssue resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the issue. |
matchLfpProviderFromLfpProviderName(lfpProviderName)
matchLfpProviderFromLfpProviderName(lfpProviderName: string): string | number;Parse the lfp_provider from LfpProvider resource.
| Parameter | |
|---|---|
| Name | Description |
lfpProviderName |
string
A fully-qualified path representing LfpProvider resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the lfp_provider. |
matchOmnichannelSettingFromLfpProviderName(lfpProviderName)
matchOmnichannelSettingFromLfpProviderName(lfpProviderName: string): string | number;Parse the omnichannel_setting from LfpProvider resource.
| Parameter | |
|---|---|
| Name | Description |
lfpProviderName |
string
A fully-qualified path representing LfpProvider resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the omnichannel_setting. |
matchOmnichannelSettingFromOmnichannelSettingName(omnichannelSettingName)
matchOmnichannelSettingFromOmnichannelSettingName(omnichannelSettingName: string): string | number;Parse the omnichannel_setting from OmnichannelSetting resource.
| Parameter | |
|---|---|
| Name | Description |
omnichannelSettingName |
string
A fully-qualified path representing OmnichannelSetting resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the omnichannel_setting. |
matchProgramFromCheckoutSettingsName(checkoutSettingsName)
matchProgramFromCheckoutSettingsName(checkoutSettingsName: string): string | number;Parse the program from CheckoutSettings resource.
| Parameter | |
|---|---|
| Name | Description |
checkoutSettingsName |
string
A fully-qualified path representing CheckoutSettings resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the program. |
matchProgramFromProgramName(programName)
matchProgramFromProgramName(programName: string): string | number;Parse the program from Program resource.
| Parameter | |
|---|---|
| Name | Description |
programName |
string
A fully-qualified path representing Program resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the program. |
matchRegionFromRegionName(regionName)
matchRegionFromRegionName(regionName: string): string | number;Parse the region from Region resource.
| Parameter | |
|---|---|
| Name | Description |
regionName |
string
A fully-qualified path representing Region resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the region. |
matchRelationshipFromAccountRelationshipName(accountRelationshipName)
matchRelationshipFromAccountRelationshipName(accountRelationshipName: string): string | number;Parse the relationship from AccountRelationship resource.
| Parameter | |
|---|---|
| Name | Description |
accountRelationshipName |
string
A fully-qualified path representing AccountRelationship resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the relationship. |
matchReturnPolicyFromOnlineReturnPolicyName(onlineReturnPolicyName)
matchReturnPolicyFromOnlineReturnPolicyName(onlineReturnPolicyName: string): string | number;Parse the return_policy from OnlineReturnPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
onlineReturnPolicyName |
string
A fully-qualified path representing OnlineReturnPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the return_policy. |
matchServiceFromAccountServiceName(accountServiceName)
matchServiceFromAccountServiceName(accountServiceName: string): string | number;Parse the service from AccountService resource.
| Parameter | |
|---|---|
| Name | Description |
accountServiceName |
string
A fully-qualified path representing AccountService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service. |
matchVersionFromTermsOfServiceName(termsOfServiceName)
matchVersionFromTermsOfServiceName(termsOfServiceName: string): string | number;Parse the version from TermsOfService resource.
| Parameter | |
|---|---|
| Name | Description |
termsOfServiceName |
string
A fully-qualified path representing TermsOfService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the version. |
omnichannelSettingPath(account, omnichannelSetting)
omnichannelSettingPath(account: string, omnichannelSetting: string): string;Return a fully-qualified omnichannelSetting resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
omnichannelSetting |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
onlineReturnPolicyPath(account, returnPolicy)
onlineReturnPolicyPath(account: string, returnPolicy: string): string;Return a fully-qualified onlineReturnPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
returnPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
programPath(account, program)
programPath(account: string, program: string): string;Return a fully-qualified program resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
program |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
regionPath(account, region)
regionPath(account: string, region: string): string;Return a fully-qualified region resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
region |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
shippingSettingsPath(account)
shippingSettingsPath(account: string): string;Return a fully-qualified shippingSettings resource name string.
| Parameter | |
|---|---|
| Name | Description |
account |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
termsOfServiceAgreementStatePath(account, identifier)
termsOfServiceAgreementStatePath(account: string, identifier: string): string;Return a fully-qualified termsOfServiceAgreementState resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
identifier |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
termsOfServicePath(version)
termsOfServicePath(version: string): string;Return a fully-qualified termsOfService resource name string.
| Parameter | |
|---|---|
| Name | Description |
version |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
updateAccount(request, options)
updateAccount(request?: protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest, options?: CallOptions): Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | undefined,
{} | undefined
]>;Updates an account regardless of its type: standalone, advanced account or sub-account. Executing this method requires admin access.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAccountRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.shopping.merchant.accounts.v1.IAccount,
protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Account. 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 new version of the account.
*/
// const account = {}
/**
* Optional. List of fields being updated.
* The following fields are supported (in both `snake_case` and
* `lowerCamelCase`):
* - `account_name`
* - `adult_content`
* - `language_code`
* - `time_zone`
*/
// const updateMask = {}
// Imports the Accounts library
const {AccountsServiceClient} = require('@google-shopping/accounts').v1;
// Instantiates a client
const accountsClient = new AccountsServiceClient();
async function callUpdateAccount() {
// Construct request
const request = {
account,
};
// Run request
const response = await accountsClient.updateAccount(request);
console.log(response);
}
callUpdateAccount();
updateAccount(request, options, callback)
updateAccount(request: protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest, options: CallOptions, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAccountRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateAccount(request, callback)
updateAccount(request: protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest, callback: Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAccountRequest
|
callback |
Callback<protos.google.shopping.merchant.accounts.v1.IAccount, protos.google.shopping.merchant.accounts.v1.IUpdateAccountRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
userPath(account, email)
userPath(account: string, email: string): string;Return a fully-qualified user resource name string.
| Parameters | |
|---|---|
| Name | Description |
account |
string
|
email |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |