Show / Hide Table of Contents

Class ShippingSettingsServiceClient

ShippingSettingsService client wrapper, for convenient use.

Inheritance
object
ShippingSettingsServiceClient
ShippingSettingsServiceClientImpl
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 ShippingSettingsServiceClient
Remarks

Service to get method call shipping setting information per Merchant API method.

Properties

DefaultEndpoint

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

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

The default ShippingSettingsService scopes are:

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

GrpcClient

The underlying gRPC ShippingSettingsService client

Declaration
public virtual ShippingSettingsService.ShippingSettingsServiceClient GrpcClient { get; }
Property Value
Type Description
ShippingSettingsService.ShippingSettingsServiceClient

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

Declaration
public static ShippingSettingsServiceClient Create()
Returns
Type Description
ShippingSettingsServiceClient

The created ShippingSettingsServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<ShippingSettingsServiceClient>

The task representing the created ShippingSettingsServiceClient.

GetShippingSettings(GetShippingSettingsRequest, CallSettings)

Retrieve shipping setting information.

Declaration
public virtual ShippingSettings GetShippingSettings(GetShippingSettingsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetShippingSettingsRequest 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
ShippingSettings

The RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = ShippingSettingsServiceClient.Create();
// Initialize request argument(s)
GetShippingSettingsRequest request = new GetShippingSettingsRequest
{
    ShippingSettingsName = ShippingSettingsName.FromAccount("[ACCOUNT]"),
};
// Make the request
ShippingSettings response = shippingSettingsServiceClient.GetShippingSettings(request);

GetShippingSettings(ShippingSettingsName, CallSettings)

Retrieve shipping setting information.

Declaration
public virtual ShippingSettings GetShippingSettings(ShippingSettingsName name, CallSettings callSettings = null)
Parameters
Type Name Description
ShippingSettingsName name

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ShippingSettings

The RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = ShippingSettingsServiceClient.Create();
// Initialize request argument(s)
ShippingSettingsName name = ShippingSettingsName.FromAccount("[ACCOUNT]");
// Make the request
ShippingSettings response = shippingSettingsServiceClient.GetShippingSettings(name);

GetShippingSettings(string, CallSettings)

Retrieve shipping setting information.

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

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ShippingSettings

The RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = ShippingSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/shippingSettings";
// Make the request
ShippingSettings response = shippingSettingsServiceClient.GetShippingSettings(name);

GetShippingSettingsAsync(GetShippingSettingsRequest, CallSettings)

Retrieve shipping setting information.

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

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetShippingSettingsRequest request = new GetShippingSettingsRequest
{
    ShippingSettingsName = ShippingSettingsName.FromAccount("[ACCOUNT]"),
};
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(request);

GetShippingSettingsAsync(GetShippingSettingsRequest, CancellationToken)

Retrieve shipping setting information.

Declaration
public virtual Task<ShippingSettings> GetShippingSettingsAsync(GetShippingSettingsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetShippingSettingsRequest 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<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetShippingSettingsRequest request = new GetShippingSettingsRequest
{
    ShippingSettingsName = ShippingSettingsName.FromAccount("[ACCOUNT]"),
};
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(request);

GetShippingSettingsAsync(ShippingSettingsName, CallSettings)

Retrieve shipping setting information.

Declaration
public virtual Task<ShippingSettings> GetShippingSettingsAsync(ShippingSettingsName name, CallSettings callSettings = null)
Parameters
Type Name Description
ShippingSettingsName name

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ShippingSettingsName name = ShippingSettingsName.FromAccount("[ACCOUNT]");
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(name);

GetShippingSettingsAsync(ShippingSettingsName, CancellationToken)

Retrieve shipping setting information.

Declaration
public virtual Task<ShippingSettings> GetShippingSettingsAsync(ShippingSettingsName name, CancellationToken cancellationToken)
Parameters
Type Name Description
ShippingSettingsName name

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ShippingSettingsName name = ShippingSettingsName.FromAccount("[ACCOUNT]");
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(name);

GetShippingSettingsAsync(string, CallSettings)

Retrieve shipping setting information.

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

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/shippingSettings";
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(name);

GetShippingSettingsAsync(string, CancellationToken)

Retrieve shipping setting information.

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

Required. The name of the shipping setting to retrieve. Format: accounts/{account}/shippingsettings

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/shippingSettings";
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.GetShippingSettingsAsync(name);

InsertShippingSettings(InsertShippingSettingsRequest, CallSettings)

Replace the shipping setting of a business with the request shipping setting. Executing this method requires admin access.

Declaration
public virtual ShippingSettings InsertShippingSettings(InsertShippingSettingsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
InsertShippingSettingsRequest 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
ShippingSettings

The RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = ShippingSettingsServiceClient.Create();
// Initialize request argument(s)
InsertShippingSettingsRequest request = new InsertShippingSettingsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    ShippingSetting = new ShippingSettings(),
};
// Make the request
ShippingSettings response = shippingSettingsServiceClient.InsertShippingSettings(request);

InsertShippingSettingsAsync(InsertShippingSettingsRequest, CallSettings)

Replace the shipping setting of a business with the request shipping setting. Executing this method requires admin access.

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

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
InsertShippingSettingsRequest request = new InsertShippingSettingsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    ShippingSetting = new ShippingSettings(),
};
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.InsertShippingSettingsAsync(request);

InsertShippingSettingsAsync(InsertShippingSettingsRequest, CancellationToken)

Replace the shipping setting of a business with the request shipping setting. Executing this method requires admin access.

Declaration
public virtual Task<ShippingSettings> InsertShippingSettingsAsync(InsertShippingSettingsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
InsertShippingSettingsRequest 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<ShippingSettings>

A Task containing the RPC response.

Sample code
// Create client
ShippingSettingsServiceClient shippingSettingsServiceClient = await ShippingSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
InsertShippingSettingsRequest request = new InsertShippingSettingsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    ShippingSetting = new ShippingSettings(),
};
// Make the request
ShippingSettings response = await shippingSettingsServiceClient.InsertShippingSettingsAsync(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