Show / Hide Table of Contents

Class LfpMerchantStateServiceClient

LfpMerchantStateService client wrapper, for convenient use.

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

Service for a LFP partner to get the state of a merchant.

For information about onboarding a retailer, see How to onboard a retailer.

Properties

DefaultEndpoint

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

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

The default LfpMerchantStateService scopes are:

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

GrpcClient

The underlying gRPC LfpMerchantStateService client

Declaration
public virtual LfpMerchantStateService.LfpMerchantStateServiceClient GrpcClient { get; }
Property Value
Type Description
LfpMerchantStateService.LfpMerchantStateServiceClient

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

Declaration
public static LfpMerchantStateServiceClient Create()
Returns
Type Description
LfpMerchantStateServiceClient

The created LfpMerchantStateServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<LfpMerchantStateServiceClient>

The task representing the created LfpMerchantStateServiceClient.

GetLfpMerchantState(GetLfpMerchantStateRequest, CallSettings)

Gets the LFP state of a merchant

Declaration
public virtual LfpMerchantState GetLfpMerchantState(GetLfpMerchantStateRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetLfpMerchantStateRequest 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
LfpMerchantState

The RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = LfpMerchantStateServiceClient.Create();
// Initialize request argument(s)
GetLfpMerchantStateRequest request = new GetLfpMerchantStateRequest
{
    LfpMerchantStateName = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]"),
};
// Make the request
LfpMerchantState response = lfpMerchantStateServiceClient.GetLfpMerchantState(request);

GetLfpMerchantState(LfpMerchantStateName, CallSettings)

Gets the LFP state of a merchant

Declaration
public virtual LfpMerchantState GetLfpMerchantState(LfpMerchantStateName name, CallSettings callSettings = null)
Parameters
Type Name Description
LfpMerchantStateName name

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LfpMerchantState

The RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = LfpMerchantStateServiceClient.Create();
// Initialize request argument(s)
LfpMerchantStateName name = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]");
// Make the request
LfpMerchantState response = lfpMerchantStateServiceClient.GetLfpMerchantState(name);

GetLfpMerchantState(string, CallSettings)

Gets the LFP state of a merchant

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

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LfpMerchantState

The RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = LfpMerchantStateServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/lfpMerchantStates/[LFP_MERCHANT_STATE]";
// Make the request
LfpMerchantState response = lfpMerchantStateServiceClient.GetLfpMerchantState(name);

GetLfpMerchantStateAsync(GetLfpMerchantStateRequest, CallSettings)

Gets the LFP state of a merchant

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

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
GetLfpMerchantStateRequest request = new GetLfpMerchantStateRequest
{
    LfpMerchantStateName = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]"),
};
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(request);

GetLfpMerchantStateAsync(GetLfpMerchantStateRequest, CancellationToken)

Gets the LFP state of a merchant

Declaration
public virtual Task<LfpMerchantState> GetLfpMerchantStateAsync(GetLfpMerchantStateRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetLfpMerchantStateRequest 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<LfpMerchantState>

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
GetLfpMerchantStateRequest request = new GetLfpMerchantStateRequest
{
    LfpMerchantStateName = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]"),
};
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(request);

GetLfpMerchantStateAsync(LfpMerchantStateName, CallSettings)

Gets the LFP state of a merchant

Declaration
public virtual Task<LfpMerchantState> GetLfpMerchantStateAsync(LfpMerchantStateName name, CallSettings callSettings = null)
Parameters
Type Name Description
LfpMerchantStateName name

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<LfpMerchantState>

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
LfpMerchantStateName name = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]");
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(name);

GetLfpMerchantStateAsync(LfpMerchantStateName, CancellationToken)

Gets the LFP state of a merchant

Declaration
public virtual Task<LfpMerchantState> GetLfpMerchantStateAsync(LfpMerchantStateName name, CancellationToken cancellationToken)
Parameters
Type Name Description
LfpMerchantStateName name

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<LfpMerchantState>

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
LfpMerchantStateName name = LfpMerchantStateName.FromAccountLfpMerchantState("[ACCOUNT]", "[LFP_MERCHANT_STATE]");
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(name);

GetLfpMerchantStateAsync(string, CallSettings)

Gets the LFP state of a merchant

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

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<LfpMerchantState>

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/lfpMerchantStates/[LFP_MERCHANT_STATE]";
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(name);

GetLfpMerchantStateAsync(string, CancellationToken)

Gets the LFP state of a merchant

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

Required. The name of the state to retrieve. Format: accounts/{account}/lfpMerchantStates/{target_merchant}. For example, accounts/123456/lfpMerchantStates/567890.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<LfpMerchantState>

A Task containing the RPC response.

Sample code
// Create client
LfpMerchantStateServiceClient lfpMerchantStateServiceClient = await LfpMerchantStateServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/lfpMerchantStates/[LFP_MERCHANT_STATE]";
// Make the request
LfpMerchantState response = await lfpMerchantStateServiceClient.GetLfpMerchantStateAsync(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.

In this article
Back to top Generated by DocFX