Show / Hide Table of Contents

Class MerchantReviewsServiceClient

MerchantReviewsService client wrapper, for convenient use.

Inheritance
object
MerchantReviewsServiceClient
MerchantReviewsServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Shopping.Merchant.Reviews.V1Beta
Assembly: Google.Shopping.Merchant.Reviews.V1Beta.dll
Syntax
public abstract class MerchantReviewsServiceClient
Remarks

Service to manage merchant reviews.

Properties

DefaultEndpoint

The default endpoint for the MerchantReviewsService 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 MerchantReviewsService scopes.

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

The default MerchantReviewsService scopes are:

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

GrpcClient

The underlying gRPC MerchantReviewsService client

Declaration
public virtual MerchantReviewsService.MerchantReviewsServiceClient GrpcClient { get; }
Property Value
Type Description
MerchantReviewsService.MerchantReviewsServiceClient

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 MerchantReviewsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use MerchantReviewsServiceClientBuilder.

Declaration
public static MerchantReviewsServiceClient Create()
Returns
Type Description
MerchantReviewsServiceClient

The created MerchantReviewsServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<MerchantReviewsServiceClient>

The task representing the created MerchantReviewsServiceClient.

DeleteMerchantReview(DeleteMerchantReviewRequest, CallSettings)

Deletes merchant review.

Declaration
public virtual void DeleteMerchantReview(DeleteMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DeleteMerchantReviewRequest request

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
DeleteMerchantReviewRequest request = new DeleteMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
merchantReviewsServiceClient.DeleteMerchantReview(request);

DeleteMerchantReview(MerchantReviewName, CallSettings)

Deletes merchant review.

Declaration
public virtual void DeleteMerchantReview(MerchantReviewName name, CallSettings callSettings = null)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
merchantReviewsServiceClient.DeleteMerchantReview(name);

DeleteMerchantReview(string, CallSettings)

Deletes merchant review.

Declaration
public virtual void DeleteMerchantReview(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
merchantReviewsServiceClient.DeleteMerchantReview(name);

DeleteMerchantReviewAsync(DeleteMerchantReviewRequest, CallSettings)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(DeleteMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DeleteMerchantReviewRequest 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
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteMerchantReviewRequest request = new DeleteMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(request);

DeleteMerchantReviewAsync(DeleteMerchantReviewRequest, CancellationToken)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(DeleteMerchantReviewRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
DeleteMerchantReviewRequest request

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

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteMerchantReviewRequest request = new DeleteMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(request);

DeleteMerchantReviewAsync(MerchantReviewName, CallSettings)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(MerchantReviewName name, CallSettings callSettings = null)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(name);

DeleteMerchantReviewAsync(MerchantReviewName, CancellationToken)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(MerchantReviewName name, CancellationToken cancellationToken)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(name);

DeleteMerchantReviewAsync(string, CallSettings)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(name);

DeleteMerchantReviewAsync(string, CancellationToken)

Deletes merchant review.

Declaration
public virtual Task DeleteMerchantReviewAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
await merchantReviewsServiceClient.DeleteMerchantReviewAsync(name);

GetMerchantReview(GetMerchantReviewRequest, CallSettings)

Gets a merchant review.

Declaration
public virtual MerchantReview GetMerchantReview(GetMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetMerchantReviewRequest 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
MerchantReview

The RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
GetMerchantReviewRequest request = new GetMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
MerchantReview response = merchantReviewsServiceClient.GetMerchantReview(request);

GetMerchantReview(MerchantReviewName, CallSettings)

Gets a merchant review.

Declaration
public virtual MerchantReview GetMerchantReview(MerchantReviewName name, CallSettings callSettings = null)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MerchantReview

The RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
MerchantReview response = merchantReviewsServiceClient.GetMerchantReview(name);

GetMerchantReview(string, CallSettings)

Gets a merchant review.

Declaration
public virtual MerchantReview GetMerchantReview(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MerchantReview

The RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
MerchantReview response = merchantReviewsServiceClient.GetMerchantReview(name);

GetMerchantReviewAsync(GetMerchantReviewRequest, CallSettings)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(GetMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetMerchantReviewRequest 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
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
GetMerchantReviewRequest request = new GetMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(request);

GetMerchantReviewAsync(GetMerchantReviewRequest, CancellationToken)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(GetMerchantReviewRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetMerchantReviewRequest request

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

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
GetMerchantReviewRequest request = new GetMerchantReviewRequest
{
    MerchantReviewName = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]"),
};
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(request);

GetMerchantReviewAsync(MerchantReviewName, CallSettings)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(MerchantReviewName name, CallSettings callSettings = null)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(name);

GetMerchantReviewAsync(MerchantReviewName, CancellationToken)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(MerchantReviewName name, CancellationToken cancellationToken)
Parameters
Type Name Description
MerchantReviewName name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
MerchantReviewName name = MerchantReviewName.FromAccountName("[ACCOUNT]", "[NAME]");
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(name);

GetMerchantReviewAsync(string, CallSettings)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(name);

GetMerchantReviewAsync(string, CancellationToken)

Gets a merchant review.

Declaration
public virtual Task<MerchantReview> GetMerchantReviewAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/merchantReviews/[NAME]";
// Make the request
MerchantReview response = await merchantReviewsServiceClient.GetMerchantReviewAsync(name);

InsertMerchantReview(InsertMerchantReviewRequest, CallSettings)

Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance.

Declaration
public virtual MerchantReview InsertMerchantReview(InsertMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
InsertMerchantReviewRequest 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
MerchantReview

The RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
InsertMerchantReviewRequest request = new InsertMerchantReviewRequest
{
    Parent = "",
    MerchantReview = new MerchantReview(),
    DataSource = "",
};
// Make the request
MerchantReview response = merchantReviewsServiceClient.InsertMerchantReview(request);

InsertMerchantReviewAsync(InsertMerchantReviewRequest, CallSettings)

Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance.

Declaration
public virtual Task<MerchantReview> InsertMerchantReviewAsync(InsertMerchantReviewRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
InsertMerchantReviewRequest 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
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
InsertMerchantReviewRequest request = new InsertMerchantReviewRequest
{
    Parent = "",
    MerchantReview = new MerchantReview(),
    DataSource = "",
};
// Make the request
MerchantReview response = await merchantReviewsServiceClient.InsertMerchantReviewAsync(request);

InsertMerchantReviewAsync(InsertMerchantReviewRequest, CancellationToken)

Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance.

Declaration
public virtual Task<MerchantReview> InsertMerchantReviewAsync(InsertMerchantReviewRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
InsertMerchantReviewRequest request

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

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<MerchantReview>

A Task containing the RPC response.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
InsertMerchantReviewRequest request = new InsertMerchantReviewRequest
{
    Parent = "",
    MerchantReview = new MerchantReview(),
    DataSource = "",
};
// Make the request
MerchantReview response = await merchantReviewsServiceClient.InsertMerchantReviewAsync(request);

ListMerchantReviews(AccountName, string, int?, CallSettings)

Lists merchant reviews.

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

Required. The account to list merchant reviews for. 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<ListMerchantReviewsResponse, MerchantReview>

A pageable sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviews(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (MerchantReview 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 (ListMerchantReviewsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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;

ListMerchantReviews(ListMerchantReviewsRequest, CallSettings)

Lists merchant reviews.

Declaration
public virtual PagedEnumerable<ListMerchantReviewsResponse, MerchantReview> ListMerchantReviews(ListMerchantReviewsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListMerchantReviewsRequest 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<ListMerchantReviewsResponse, MerchantReview>

A pageable sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
ListMerchantReviewsRequest request = new ListMerchantReviewsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviews(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (MerchantReview 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 (ListMerchantReviewsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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;

ListMerchantReviews(string, string, int?, CallSettings)

Lists merchant reviews.

Declaration
public virtual PagedEnumerable<ListMerchantReviewsResponse, MerchantReview> ListMerchantReviews(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The account to list merchant reviews for. 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<ListMerchantReviewsResponse, MerchantReview>

A pageable sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = MerchantReviewsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviews(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (MerchantReview 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 (ListMerchantReviewsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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;

ListMerchantReviewsAsync(AccountName, string, int?, CallSettings)

Lists merchant reviews.

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

Required. The account to list merchant reviews for. 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<ListMerchantReviewsResponse, MerchantReview>

A pageable asynchronous sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviewsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MerchantReview 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((ListMerchantReviewsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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;

ListMerchantReviewsAsync(ListMerchantReviewsRequest, CallSettings)

Lists merchant reviews.

Declaration
public virtual PagedAsyncEnumerable<ListMerchantReviewsResponse, MerchantReview> ListMerchantReviewsAsync(ListMerchantReviewsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListMerchantReviewsRequest 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<ListMerchantReviewsResponse, MerchantReview>

A pageable asynchronous sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
ListMerchantReviewsRequest request = new ListMerchantReviewsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviewsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MerchantReview 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((ListMerchantReviewsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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;

ListMerchantReviewsAsync(string, string, int?, CallSettings)

Lists merchant reviews.

Declaration
public virtual PagedAsyncEnumerable<ListMerchantReviewsResponse, MerchantReview> ListMerchantReviewsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The account to list merchant reviews for. 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<ListMerchantReviewsResponse, MerchantReview>

A pageable asynchronous sequence of MerchantReview resources.

Sample code
// Create client
MerchantReviewsServiceClient merchantReviewsServiceClient = await MerchantReviewsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListMerchantReviewsResponse, MerchantReview> response = merchantReviewsServiceClient.ListMerchantReviewsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MerchantReview 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((ListMerchantReviewsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MerchantReview 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<MerchantReview> 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 (MerchantReview 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