Show / Hide Table of Contents

Class BusinessInfoServiceClient

BusinessInfoService client wrapper, for convenient use.

Inheritance
object
BusinessInfoServiceClient
BusinessInfoServiceClientImpl
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 BusinessInfoServiceClient
Remarks

Service to support business info API.

Properties

DefaultEndpoint

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

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

The default BusinessInfoService scopes are:

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

GrpcClient

The underlying gRPC BusinessInfoService client

Declaration
public virtual BusinessInfoService.BusinessInfoServiceClient GrpcClient { get; }
Property Value
Type Description
BusinessInfoService.BusinessInfoServiceClient

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

Declaration
public static BusinessInfoServiceClient Create()
Returns
Type Description
BusinessInfoServiceClient

The created BusinessInfoServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<BusinessInfoServiceClient>

The task representing the created BusinessInfoServiceClient.

GetBusinessInfo(BusinessInfoName, CallSettings)

Retrieves the business info of an account.

Declaration
public virtual BusinessInfo GetBusinessInfo(BusinessInfoName name, CallSettings callSettings = null)
Parameters
Type Name Description
BusinessInfoName name

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BusinessInfo

The RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = BusinessInfoServiceClient.Create();
// Initialize request argument(s)
BusinessInfoName name = BusinessInfoName.FromAccount("[ACCOUNT]");
// Make the request
BusinessInfo response = businessInfoServiceClient.GetBusinessInfo(name);

GetBusinessInfo(GetBusinessInfoRequest, CallSettings)

Retrieves the business info of an account.

Declaration
public virtual BusinessInfo GetBusinessInfo(GetBusinessInfoRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetBusinessInfoRequest 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
BusinessInfo

The RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = BusinessInfoServiceClient.Create();
// Initialize request argument(s)
GetBusinessInfoRequest request = new GetBusinessInfoRequest
{
    BusinessInfoName = BusinessInfoName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessInfo response = businessInfoServiceClient.GetBusinessInfo(request);

GetBusinessInfo(string, CallSettings)

Retrieves the business info of an account.

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

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BusinessInfo

The RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = BusinessInfoServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessInfo";
// Make the request
BusinessInfo response = businessInfoServiceClient.GetBusinessInfo(name);

GetBusinessInfoAsync(BusinessInfoName, CallSettings)

Retrieves the business info of an account.

Declaration
public virtual Task<BusinessInfo> GetBusinessInfoAsync(BusinessInfoName name, CallSettings callSettings = null)
Parameters
Type Name Description
BusinessInfoName name

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessInfoName name = BusinessInfoName.FromAccount("[ACCOUNT]");
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(name);

GetBusinessInfoAsync(BusinessInfoName, CancellationToken)

Retrieves the business info of an account.

Declaration
public virtual Task<BusinessInfo> GetBusinessInfoAsync(BusinessInfoName name, CancellationToken cancellationToken)
Parameters
Type Name Description
BusinessInfoName name

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessInfoName name = BusinessInfoName.FromAccount("[ACCOUNT]");
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(name);

GetBusinessInfoAsync(GetBusinessInfoRequest, CallSettings)

Retrieves the business info of an account.

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

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
GetBusinessInfoRequest request = new GetBusinessInfoRequest
{
    BusinessInfoName = BusinessInfoName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(request);

GetBusinessInfoAsync(GetBusinessInfoRequest, CancellationToken)

Retrieves the business info of an account.

Declaration
public virtual Task<BusinessInfo> GetBusinessInfoAsync(GetBusinessInfoRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetBusinessInfoRequest 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<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
GetBusinessInfoRequest request = new GetBusinessInfoRequest
{
    BusinessInfoName = BusinessInfoName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(request);

GetBusinessInfoAsync(string, CallSettings)

Retrieves the business info of an account.

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

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessInfo";
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(name);

GetBusinessInfoAsync(string, CancellationToken)

Retrieves the business info of an account.

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

Required. The resource name of the business info. Format: accounts/{account}/businessInfo. For example, accounts/123456/businessInfo.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessInfo";
// Make the request
BusinessInfo response = await businessInfoServiceClient.GetBusinessInfoAsync(name);

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.

UpdateBusinessInfo(BusinessInfo, FieldMask, CallSettings)

Updates the business info of an account. Executing this method requires admin access.

Declaration
public virtual BusinessInfo UpdateBusinessInfo(BusinessInfo businessInfo, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
BusinessInfo businessInfo

Required. The new version of the business info.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • address
  • customer_service
  • korean_business_registration_number
CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BusinessInfo

The RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = BusinessInfoServiceClient.Create();
// Initialize request argument(s)
BusinessInfo businessInfo = new BusinessInfo();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessInfo response = businessInfoServiceClient.UpdateBusinessInfo(businessInfo, updateMask);

UpdateBusinessInfo(UpdateBusinessInfoRequest, CallSettings)

Updates the business info of an account. Executing this method requires admin access.

Declaration
public virtual BusinessInfo UpdateBusinessInfo(UpdateBusinessInfoRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateBusinessInfoRequest 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
BusinessInfo

The RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = BusinessInfoServiceClient.Create();
// Initialize request argument(s)
UpdateBusinessInfoRequest request = new UpdateBusinessInfoRequest
{
    BusinessInfo = new BusinessInfo(),
    UpdateMask = new FieldMask(),
};
// Make the request
BusinessInfo response = businessInfoServiceClient.UpdateBusinessInfo(request);

UpdateBusinessInfoAsync(BusinessInfo, FieldMask, CallSettings)

Updates the business info of an account. Executing this method requires admin access.

Declaration
public virtual Task<BusinessInfo> UpdateBusinessInfoAsync(BusinessInfo businessInfo, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
BusinessInfo businessInfo

Required. The new version of the business info.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • address
  • customer_service
  • korean_business_registration_number
CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessInfo businessInfo = new BusinessInfo();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessInfo response = await businessInfoServiceClient.UpdateBusinessInfoAsync(businessInfo, updateMask);

UpdateBusinessInfoAsync(BusinessInfo, FieldMask, CancellationToken)

Updates the business info of an account. Executing this method requires admin access.

Declaration
public virtual Task<BusinessInfo> UpdateBusinessInfoAsync(BusinessInfo businessInfo, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
BusinessInfo businessInfo

Required. The new version of the business info.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • address
  • customer_service
  • korean_business_registration_number
CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessInfo businessInfo = new BusinessInfo();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessInfo response = await businessInfoServiceClient.UpdateBusinessInfoAsync(businessInfo, updateMask);

UpdateBusinessInfoAsync(UpdateBusinessInfoRequest, CallSettings)

Updates the business info of an account. Executing this method requires admin access.

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

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBusinessInfoRequest request = new UpdateBusinessInfoRequest
{
    BusinessInfo = new BusinessInfo(),
    UpdateMask = new FieldMask(),
};
// Make the request
BusinessInfo response = await businessInfoServiceClient.UpdateBusinessInfoAsync(request);

UpdateBusinessInfoAsync(UpdateBusinessInfoRequest, CancellationToken)

Updates the business info of an account. Executing this method requires admin access.

Declaration
public virtual Task<BusinessInfo> UpdateBusinessInfoAsync(UpdateBusinessInfoRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateBusinessInfoRequest 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<BusinessInfo>

A Task containing the RPC response.

Sample code
// Create client
BusinessInfoServiceClient businessInfoServiceClient = await BusinessInfoServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBusinessInfoRequest request = new UpdateBusinessInfoRequest
{
    BusinessInfo = new BusinessInfo(),
    UpdateMask = new FieldMask(),
};
// Make the request
BusinessInfo response = await businessInfoServiceClient.UpdateBusinessInfoAsync(request);
In this article
Back to top Generated by DocFX