Show / Hide Table of Contents

Class AccountIssueServiceClient

AccountIssueService client wrapper, for convenient use.

Inheritance
object
AccountIssueServiceClient
AccountIssueServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Shopping.Merchant.Accounts.V1
Assembly: Google.Shopping.Merchant.Accounts.V1.dll
Syntax
public abstract class AccountIssueServiceClient
Remarks

Service to support AccountIssueService API.

Properties

DefaultEndpoint

The default endpoint for the AccountIssueService service, which is a host of "merchantapi.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default AccountIssueService scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default AccountIssueService scopes are:

  • https://www.googleapis.com/auth/content

GrpcClient

The underlying gRPC AccountIssueService client

Declaration
public virtual AccountIssueService.AccountIssueServiceClient GrpcClient { get; }
Property Value
Type Description
AccountIssueService.AccountIssueServiceClient

ServiceMetadata

The service metadata associated with this client type.

Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type Description
ServiceMetadata

Methods

Create()

Synchronously creates a AccountIssueServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountIssueServiceClientBuilder.

Declaration
public static AccountIssueServiceClient Create()
Returns
Type Description
AccountIssueServiceClient

The created AccountIssueServiceClient.

CreateAsync(CancellationToken)

Asynchronously creates a AccountIssueServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountIssueServiceClientBuilder.

Declaration
public static Task<AccountIssueServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AccountIssueServiceClient>

The task representing the created AccountIssueServiceClient.

ListAccountIssues(AccountName, string, int?, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssues(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent, which owns this collection of issues. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = AccountIssueServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssues(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountIssue item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountIssuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountIssues(ListAccountIssuesRequest, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssues(ListAccountIssuesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountIssuesRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = AccountIssueServiceClient.Create();
// Initialize request argument(s)
ListAccountIssuesRequest request = new ListAccountIssuesRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    LanguageCode = "",
    TimeZone = "",
};
// Make the request
PagedEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssues(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountIssue item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountIssuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountIssues(string, string, int?, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssues(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of issues. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = AccountIssueServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssues(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountIssue item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountIssuesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountIssuesAsync(AccountName, string, int?, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssuesAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent, which owns this collection of issues. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable asynchronous sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = await AccountIssueServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssuesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountIssue item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountIssuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountIssuesAsync(ListAccountIssuesRequest, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssuesAsync(ListAccountIssuesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountIssuesRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable asynchronous sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = await AccountIssueServiceClient.CreateAsync();
// Initialize request argument(s)
ListAccountIssuesRequest request = new ListAccountIssuesRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    LanguageCode = "",
    TimeZone = "",
};
// Make the request
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssuesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountIssue item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountIssuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountIssuesAsync(string, string, int?, CallSettings)

Lists all account issues of a Merchant Center account.

When called on a multi-client account, this method only returns issues belonging to that account, not its sub-accounts. To retrieve issues for sub-accounts, you must first call the [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] method to obtain a list of sub-accounts, and then call accounts.issues.list for each sub-account individually.

Declaration
public virtual PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> ListAccountIssuesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of issues. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue>

A pageable asynchronous sequence of AccountIssue resources.

Sample code
// Create client
AccountIssueServiceClient accountIssueServiceClient = await AccountIssueServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListAccountIssuesResponse, AccountIssue> response = accountIssueServiceClient.ListAccountIssuesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountIssue item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountIssuesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountIssue item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountIssue> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountIssue item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

In this article
Back to top Generated by DocFX