Show / Hide Table of Contents

Class LfpSaleServiceClient

LfpSaleService client wrapper, for convenient use.

Inheritance
object
LfpSaleServiceClient
LfpSaleServiceClientImpl
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 LfpSaleServiceClient
Remarks

Service for a LFP partner to submit sales data for a merchant.

Properties

DefaultEndpoint

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

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

The default LfpSaleService scopes are:

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

GrpcClient

The underlying gRPC LfpSaleService client

Declaration
public virtual LfpSaleService.LfpSaleServiceClient GrpcClient { get; }
Property Value
Type Description
LfpSaleService.LfpSaleServiceClient

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

Declaration
public static LfpSaleServiceClient Create()
Returns
Type Description
LfpSaleServiceClient

The created LfpSaleServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<LfpSaleServiceClient>

The task representing the created LfpSaleServiceClient.

InsertLfpSale(InsertLfpSaleRequest, CallSettings)

Inserts a LfpSale for the given merchant.

Declaration
public virtual LfpSale InsertLfpSale(InsertLfpSaleRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
InsertLfpSaleRequest 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
LfpSale

The RPC response.

Sample code
// Create client
LfpSaleServiceClient lfpSaleServiceClient = LfpSaleServiceClient.Create();
// Initialize request argument(s)
InsertLfpSaleRequest request = new InsertLfpSaleRequest
{
    Parent = "",
    LfpSale = new LfpSale(),
};
// Make the request
LfpSale response = lfpSaleServiceClient.InsertLfpSale(request);

InsertLfpSaleAsync(InsertLfpSaleRequest, CallSettings)

Inserts a LfpSale for the given merchant.

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

A Task containing the RPC response.

Sample code
// Create client
LfpSaleServiceClient lfpSaleServiceClient = await LfpSaleServiceClient.CreateAsync();
// Initialize request argument(s)
InsertLfpSaleRequest request = new InsertLfpSaleRequest
{
    Parent = "",
    LfpSale = new LfpSale(),
};
// Make the request
LfpSale response = await lfpSaleServiceClient.InsertLfpSaleAsync(request);

InsertLfpSaleAsync(InsertLfpSaleRequest, CancellationToken)

Inserts a LfpSale for the given merchant.

Declaration
public virtual Task<LfpSale> InsertLfpSaleAsync(InsertLfpSaleRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
InsertLfpSaleRequest 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<LfpSale>

A Task containing the RPC response.

Sample code
// Create client
LfpSaleServiceClient lfpSaleServiceClient = await LfpSaleServiceClient.CreateAsync();
// Initialize request argument(s)
InsertLfpSaleRequest request = new InsertLfpSaleRequest
{
    Parent = "",
    LfpSale = new LfpSale(),
};
// Make the request
LfpSale response = await lfpSaleServiceClient.InsertLfpSaleAsync(request);

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