Class BusinessIdentityServiceClient
BusinessIdentityService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.Accounts.V1Beta
Assembly: Google.Shopping.Merchant.Accounts.V1Beta.dll
Syntax
public abstract class BusinessIdentityServiceClient
Remarks
Service to support business identity API.
Properties
DefaultEndpoint
The default endpoint for the BusinessIdentityService 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 BusinessIdentityService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default BusinessIdentityService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC BusinessIdentityService client
Declaration
public virtual BusinessIdentityService.BusinessIdentityServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
BusinessIdentityService.BusinessIdentityServiceClient |
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 BusinessIdentityServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BusinessIdentityServiceClientBuilder.
Declaration
public static BusinessIdentityServiceClient Create()
Returns
Type | Description |
---|---|
BusinessIdentityServiceClient | The created BusinessIdentityServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a BusinessIdentityServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BusinessIdentityServiceClientBuilder.
Declaration
public static Task<BusinessIdentityServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<BusinessIdentityServiceClient> | The task representing the created BusinessIdentityServiceClient. |
GetBusinessIdentity(BusinessIdentityName, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual BusinessIdentity GetBusinessIdentity(BusinessIdentityName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentityName | name | Required. The resource name of the business identity.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
BusinessIdentity | The RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = BusinessIdentityServiceClient.Create();
// Initialize request argument(s)
BusinessIdentityName name = BusinessIdentityName.FromAccount("[ACCOUNT]");
// Make the request
BusinessIdentity response = businessIdentityServiceClient.GetBusinessIdentity(name);
GetBusinessIdentity(GetBusinessIdentityRequest, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual BusinessIdentity GetBusinessIdentity(GetBusinessIdentityRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetBusinessIdentityRequest | 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 |
---|---|
BusinessIdentity | The RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = BusinessIdentityServiceClient.Create();
// Initialize request argument(s)
GetBusinessIdentityRequest request = new GetBusinessIdentityRequest
{
BusinessIdentityName = BusinessIdentityName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessIdentity response = businessIdentityServiceClient.GetBusinessIdentity(request);
GetBusinessIdentity(string, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual BusinessIdentity GetBusinessIdentity(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the business identity.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
BusinessIdentity | The RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = BusinessIdentityServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessIdentity";
// Make the request
BusinessIdentity response = businessIdentityServiceClient.GetBusinessIdentity(name);
GetBusinessIdentityAsync(BusinessIdentityName, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(BusinessIdentityName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentityName | name | Required. The resource name of the business identity.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessIdentityName name = BusinessIdentityName.FromAccount("[ACCOUNT]");
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(name);
GetBusinessIdentityAsync(BusinessIdentityName, CancellationToken)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(BusinessIdentityName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentityName | name | Required. The resource name of the business identity.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessIdentityName name = BusinessIdentityName.FromAccount("[ACCOUNT]");
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(name);
GetBusinessIdentityAsync(GetBusinessIdentityRequest, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(GetBusinessIdentityRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetBusinessIdentityRequest | 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<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
GetBusinessIdentityRequest request = new GetBusinessIdentityRequest
{
BusinessIdentityName = BusinessIdentityName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(request);
GetBusinessIdentityAsync(GetBusinessIdentityRequest, CancellationToken)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(GetBusinessIdentityRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetBusinessIdentityRequest | 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<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
GetBusinessIdentityRequest request = new GetBusinessIdentityRequest
{
BusinessIdentityName = BusinessIdentityName.FromAccount("[ACCOUNT]"),
};
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(request);
GetBusinessIdentityAsync(string, CallSettings)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the business identity.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessIdentity";
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(name);
GetBusinessIdentityAsync(string, CancellationToken)
Retrieves the business identity of an account.
Declaration
public virtual Task<BusinessIdentity> GetBusinessIdentityAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the business identity.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/businessIdentity";
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.GetBusinessIdentityAsync(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.
UpdateBusinessIdentity(BusinessIdentity, FieldMask, CallSettings)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual BusinessIdentity UpdateBusinessIdentity(BusinessIdentity businessIdentity, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentity | businessIdentity | Required. The new version of the business identity. |
FieldMask | updateMask | Required. List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
BusinessIdentity | The RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = BusinessIdentityServiceClient.Create();
// Initialize request argument(s)
BusinessIdentity businessIdentity = new BusinessIdentity();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessIdentity response = businessIdentityServiceClient.UpdateBusinessIdentity(businessIdentity, updateMask);
UpdateBusinessIdentity(UpdateBusinessIdentityRequest, CallSettings)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual BusinessIdentity UpdateBusinessIdentity(UpdateBusinessIdentityRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateBusinessIdentityRequest | 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 |
---|---|
BusinessIdentity | The RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = BusinessIdentityServiceClient.Create();
// Initialize request argument(s)
UpdateBusinessIdentityRequest request = new UpdateBusinessIdentityRequest
{
BusinessIdentity = new BusinessIdentity(),
UpdateMask = new FieldMask(),
};
// Make the request
BusinessIdentity response = businessIdentityServiceClient.UpdateBusinessIdentity(request);
UpdateBusinessIdentityAsync(BusinessIdentity, FieldMask, CallSettings)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual Task<BusinessIdentity> UpdateBusinessIdentityAsync(BusinessIdentity businessIdentity, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentity | businessIdentity | Required. The new version of the business identity. |
FieldMask | updateMask | Required. List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessIdentity businessIdentity = new BusinessIdentity();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.UpdateBusinessIdentityAsync(businessIdentity, updateMask);
UpdateBusinessIdentityAsync(BusinessIdentity, FieldMask, CancellationToken)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual Task<BusinessIdentity> UpdateBusinessIdentityAsync(BusinessIdentity businessIdentity, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BusinessIdentity | businessIdentity | Required. The new version of the business identity. |
FieldMask | updateMask | Required. List of fields being updated. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
BusinessIdentity businessIdentity = new BusinessIdentity();
FieldMask updateMask = new FieldMask();
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.UpdateBusinessIdentityAsync(businessIdentity, updateMask);
UpdateBusinessIdentityAsync(UpdateBusinessIdentityRequest, CallSettings)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual Task<BusinessIdentity> UpdateBusinessIdentityAsync(UpdateBusinessIdentityRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateBusinessIdentityRequest | 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<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBusinessIdentityRequest request = new UpdateBusinessIdentityRequest
{
BusinessIdentity = new BusinessIdentity(),
UpdateMask = new FieldMask(),
};
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.UpdateBusinessIdentityAsync(request);
UpdateBusinessIdentityAsync(UpdateBusinessIdentityRequest, CancellationToken)
Updates the business identity of an account. Executing this method requires admin access.
Declaration
public virtual Task<BusinessIdentity> UpdateBusinessIdentityAsync(UpdateBusinessIdentityRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateBusinessIdentityRequest | 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<BusinessIdentity> | A Task containing the RPC response. |
Sample code
// Create client
BusinessIdentityServiceClient businessIdentityServiceClient = await BusinessIdentityServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBusinessIdentityRequest request = new UpdateBusinessIdentityRequest
{
BusinessIdentity = new BusinessIdentity(),
UpdateMask = new FieldMask(),
};
// Make the request
BusinessIdentity response = await businessIdentityServiceClient.UpdateBusinessIdentityAsync(request);