Show / Hide Table of Contents

Class LfpInventoryServiceClient

LfpInventoryService client wrapper, for convenient use.

Inheritance
object
LfpInventoryServiceClient
LfpInventoryServiceClientImpl
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 LfpInventoryServiceClient
Remarks

Service for a LFP partner to submit local inventories for a merchant.

Properties

DefaultEndpoint

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

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

The default LfpInventoryService scopes are:

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

GrpcClient

The underlying gRPC LfpInventoryService client

Declaration
public virtual LfpInventoryService.LfpInventoryServiceClient GrpcClient { get; }
Property Value
Type Description
LfpInventoryService.LfpInventoryServiceClient

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

Declaration
public static LfpInventoryServiceClient Create()
Returns
Type Description
LfpInventoryServiceClient

The created LfpInventoryServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<LfpInventoryServiceClient>

The task representing the created LfpInventoryServiceClient.

InsertLfpInventory(InsertLfpInventoryRequest, CallSettings)

Inserts a LfpInventory resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days.

Declaration
public virtual LfpInventory InsertLfpInventory(InsertLfpInventoryRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
InsertLfpInventoryRequest 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
LfpInventory

The RPC response.

Sample code
// Create client
LfpInventoryServiceClient lfpInventoryServiceClient = LfpInventoryServiceClient.Create();
// Initialize request argument(s)
InsertLfpInventoryRequest request = new InsertLfpInventoryRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    LfpInventory = new LfpInventory(),
};
// Make the request
LfpInventory response = lfpInventoryServiceClient.InsertLfpInventory(request);

InsertLfpInventoryAsync(InsertLfpInventoryRequest, CallSettings)

Inserts a LfpInventory resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days.

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

A Task containing the RPC response.

Sample code
// Create client
LfpInventoryServiceClient lfpInventoryServiceClient = await LfpInventoryServiceClient.CreateAsync();
// Initialize request argument(s)
InsertLfpInventoryRequest request = new InsertLfpInventoryRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    LfpInventory = new LfpInventory(),
};
// Make the request
LfpInventory response = await lfpInventoryServiceClient.InsertLfpInventoryAsync(request);

InsertLfpInventoryAsync(InsertLfpInventoryRequest, CancellationToken)

Inserts a LfpInventory resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days.

Declaration
public virtual Task<LfpInventory> InsertLfpInventoryAsync(InsertLfpInventoryRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
InsertLfpInventoryRequest 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<LfpInventory>

A Task containing the RPC response.

Sample code
// Create client
LfpInventoryServiceClient lfpInventoryServiceClient = await LfpInventoryServiceClient.CreateAsync();
// Initialize request argument(s)
InsertLfpInventoryRequest request = new InsertLfpInventoryRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    LfpInventory = new LfpInventory(),
};
// Make the request
LfpInventory response = await lfpInventoryServiceClient.InsertLfpInventoryAsync(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