Class OmnichannelSettingsServiceClient (0.23.0)

GitHub RepositoryProduct Reference

Service Description: The service facilitates the management of a merchant's omnichannel settings.

This API defines the following resource model:

OmnichannelSetting

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   OmnichannelSettingName name = OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]");
   OmnichannelSetting response = omnichannelSettingsServiceClient.getOmnichannelSetting(name);
 }
 

Note: close() needs to be called on the OmnichannelSettingsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

GetOmnichannelSetting

Get the omnichannel settings for a given merchant.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getOmnichannelSetting(GetOmnichannelSettingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getOmnichannelSetting(OmnichannelSettingName name)

  • getOmnichannelSetting(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getOmnichannelSettingCallable()

ListOmnichannelSettings

List all the omnichannel settings for a given merchant.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listOmnichannelSettings(ListOmnichannelSettingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listOmnichannelSettings(AccountName parent)

  • listOmnichannelSettings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listOmnichannelSettingsPagedCallable()

  • listOmnichannelSettingsCallable()

CreateOmnichannelSetting

Create the omnichannel settings for a given merchant.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createOmnichannelSetting(CreateOmnichannelSettingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createOmnichannelSetting(AccountName parent, OmnichannelSetting omnichannelSetting)

  • createOmnichannelSetting(String parent, OmnichannelSetting omnichannelSetting)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createOmnichannelSettingCallable()

UpdateOmnichannelSetting

Update the omnichannel setting for a given merchant in a given country.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateOmnichannelSetting(UpdateOmnichannelSettingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateOmnichannelSetting(OmnichannelSetting omnichannelSetting, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateOmnichannelSettingCallable()

RequestInventoryVerification

Requests inventory verification for a given merchant in a given country.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • requestInventoryVerification(OmnichannelSettingName name)

  • requestInventoryVerification(String name)

  • requestInventoryVerification(RequestInventoryVerificationRequest request)

  • requestInventoryVerificationCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of OmnichannelSettingsServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 OmnichannelSettingsServiceSettings omnichannelSettingsServiceSettings =
     OmnichannelSettingsServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create(omnichannelSettingsServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 OmnichannelSettingsServiceSettings omnichannelSettingsServiceSettings =
     OmnichannelSettingsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create(omnichannelSettingsServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 OmnichannelSettingsServiceSettings omnichannelSettingsServiceSettings =
     OmnichannelSettingsServiceSettings.newHttpJsonBuilder().build();
 OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create(omnichannelSettingsServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > OmnichannelSettingsServiceClient

Static Methods

create()

public static final OmnichannelSettingsServiceClient create()

Constructs an instance of OmnichannelSettingsServiceClient with default settings.

Returns
Type Description
OmnichannelSettingsServiceClient
Exceptions
Type Description
IOException

create(OmnichannelSettingsServiceSettings settings)

public static final OmnichannelSettingsServiceClient create(OmnichannelSettingsServiceSettings settings)

Constructs an instance of OmnichannelSettingsServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings OmnichannelSettingsServiceSettings
Returns
Type Description
OmnichannelSettingsServiceClient
Exceptions
Type Description
IOException

create(OmnichannelSettingsServiceStub stub)

public static final OmnichannelSettingsServiceClient create(OmnichannelSettingsServiceStub stub)

Constructs an instance of OmnichannelSettingsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(OmnichannelSettingsServiceSettings).

Parameter
Name Description
stub OmnichannelSettingsServiceStub
Returns
Type Description
OmnichannelSettingsServiceClient

Constructors

OmnichannelSettingsServiceClient(OmnichannelSettingsServiceSettings settings)

protected OmnichannelSettingsServiceClient(OmnichannelSettingsServiceSettings settings)

Constructs an instance of OmnichannelSettingsServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings OmnichannelSettingsServiceSettings

OmnichannelSettingsServiceClient(OmnichannelSettingsServiceStub stub)

protected OmnichannelSettingsServiceClient(OmnichannelSettingsServiceStub stub)
Parameter
Name Description
stub OmnichannelSettingsServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createOmnichannelSetting(AccountName parent, OmnichannelSetting omnichannelSetting)

public final OmnichannelSetting createOmnichannelSetting(AccountName parent, OmnichannelSetting omnichannelSetting)

Create the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   AccountName parent = AccountName.of("[ACCOUNT]");
   OmnichannelSetting omnichannelSetting = OmnichannelSetting.newBuilder().build();
   OmnichannelSetting response =
       omnichannelSettingsServiceClient.createOmnichannelSetting(parent, omnichannelSetting);
 }
 
Parameters
Name Description
parent AccountName

Required. The parent resource where this omnichannel setting will be created. Format: accounts/{account}

omnichannelSetting OmnichannelSetting

Required. The omnichannel setting to create.

Returns
Type Description
OmnichannelSetting

createOmnichannelSetting(CreateOmnichannelSettingRequest request)

public final OmnichannelSetting createOmnichannelSetting(CreateOmnichannelSettingRequest request)

Create the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   CreateOmnichannelSettingRequest request =
       CreateOmnichannelSettingRequest.newBuilder()
           .setParent(AccountName.of("[ACCOUNT]").toString())
           .setOmnichannelSetting(OmnichannelSetting.newBuilder().build())
           .build();
   OmnichannelSetting response =
       omnichannelSettingsServiceClient.createOmnichannelSetting(request);
 }
 
Parameter
Name Description
request CreateOmnichannelSettingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OmnichannelSetting

createOmnichannelSetting(String parent, OmnichannelSetting omnichannelSetting)

public final OmnichannelSetting createOmnichannelSetting(String parent, OmnichannelSetting omnichannelSetting)

Create the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   String parent = AccountName.of("[ACCOUNT]").toString();
   OmnichannelSetting omnichannelSetting = OmnichannelSetting.newBuilder().build();
   OmnichannelSetting response =
       omnichannelSettingsServiceClient.createOmnichannelSetting(parent, omnichannelSetting);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this omnichannel setting will be created. Format: accounts/{account}

omnichannelSetting OmnichannelSetting

Required. The omnichannel setting to create.

Returns
Type Description
OmnichannelSetting

createOmnichannelSettingCallable()

public final UnaryCallable<CreateOmnichannelSettingRequest,OmnichannelSetting> createOmnichannelSettingCallable()

Create the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   CreateOmnichannelSettingRequest request =
       CreateOmnichannelSettingRequest.newBuilder()
           .setParent(AccountName.of("[ACCOUNT]").toString())
           .setOmnichannelSetting(OmnichannelSetting.newBuilder().build())
           .build();
   ApiFuture<OmnichannelSetting> future =
       omnichannelSettingsServiceClient.createOmnichannelSettingCallable().futureCall(request);
   // Do something.
   OmnichannelSetting response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateOmnichannelSettingRequest,OmnichannelSetting>

getOmnichannelSetting(GetOmnichannelSettingRequest request)

public final OmnichannelSetting getOmnichannelSetting(GetOmnichannelSettingRequest request)

Get the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   GetOmnichannelSettingRequest request =
       GetOmnichannelSettingRequest.newBuilder()
           .setName(OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString())
           .build();
   OmnichannelSetting response = omnichannelSettingsServiceClient.getOmnichannelSetting(request);
 }
 
Parameter
Name Description
request GetOmnichannelSettingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OmnichannelSetting

getOmnichannelSetting(OmnichannelSettingName name)

public final OmnichannelSetting getOmnichannelSetting(OmnichannelSettingName name)

Get the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   OmnichannelSettingName name = OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]");
   OmnichannelSetting response = omnichannelSettingsServiceClient.getOmnichannelSetting(name);
 }
 
Parameter
Name Description
name OmnichannelSettingName

Required. The name of the omnichannel setting to retrieve. Format: accounts/{account}/omnichannelSettings/{omnichannel_setting}

Returns
Type Description
OmnichannelSetting

getOmnichannelSetting(String name)

public final OmnichannelSetting getOmnichannelSetting(String name)

Get the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   String name = OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString();
   OmnichannelSetting response = omnichannelSettingsServiceClient.getOmnichannelSetting(name);
 }
 
Parameter
Name Description
name String

Required. The name of the omnichannel setting to retrieve. Format: accounts/{account}/omnichannelSettings/{omnichannel_setting}

Returns
Type Description
OmnichannelSetting

getOmnichannelSettingCallable()

public final UnaryCallable<GetOmnichannelSettingRequest,OmnichannelSetting> getOmnichannelSettingCallable()

Get the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   GetOmnichannelSettingRequest request =
       GetOmnichannelSettingRequest.newBuilder()
           .setName(OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString())
           .build();
   ApiFuture<OmnichannelSetting> future =
       omnichannelSettingsServiceClient.getOmnichannelSettingCallable().futureCall(request);
   // Do something.
   OmnichannelSetting response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetOmnichannelSettingRequest,OmnichannelSetting>

getSettings()

public final OmnichannelSettingsServiceSettings getSettings()
Returns
Type Description
OmnichannelSettingsServiceSettings

getStub()

public OmnichannelSettingsServiceStub getStub()
Returns
Type Description
OmnichannelSettingsServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listOmnichannelSettings(AccountName parent)

public final OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse listOmnichannelSettings(AccountName parent)

List all the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   AccountName parent = AccountName.of("[ACCOUNT]");
   for (OmnichannelSetting element :
       omnichannelSettingsServiceClient.listOmnichannelSettings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent AccountName

Required. The parent, which owns this collection of omnichannel settings. Format: accounts/{account}

Returns
Type Description
OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse

listOmnichannelSettings(ListOmnichannelSettingsRequest request)

public final OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse listOmnichannelSettings(ListOmnichannelSettingsRequest request)

List all the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   ListOmnichannelSettingsRequest request =
       ListOmnichannelSettingsRequest.newBuilder()
           .setParent(AccountName.of("[ACCOUNT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (OmnichannelSetting element :
       omnichannelSettingsServiceClient.listOmnichannelSettings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListOmnichannelSettingsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse

listOmnichannelSettings(String parent)

public final OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse listOmnichannelSettings(String parent)

List all the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   String parent = AccountName.of("[ACCOUNT]").toString();
   for (OmnichannelSetting element :
       omnichannelSettingsServiceClient.listOmnichannelSettings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of omnichannel settings. Format: accounts/{account}

Returns
Type Description
OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse

listOmnichannelSettingsCallable()

public final UnaryCallable<ListOmnichannelSettingsRequest,ListOmnichannelSettingsResponse> listOmnichannelSettingsCallable()

List all the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   ListOmnichannelSettingsRequest request =
       ListOmnichannelSettingsRequest.newBuilder()
           .setParent(AccountName.of("[ACCOUNT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListOmnichannelSettingsResponse response =
         omnichannelSettingsServiceClient.listOmnichannelSettingsCallable().call(request);
     for (OmnichannelSetting element : response.getOmnichannelSettingsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListOmnichannelSettingsRequest,ListOmnichannelSettingsResponse>

listOmnichannelSettingsPagedCallable()

public final UnaryCallable<ListOmnichannelSettingsRequest,OmnichannelSettingsServiceClient.ListOmnichannelSettingsPagedResponse> listOmnichannelSettingsPagedCallable()

List all the omnichannel settings for a given merchant.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   ListOmnichannelSettingsRequest request =
       ListOmnichannelSettingsRequest.newBuilder()
           .setParent(AccountName.of("[ACCOUNT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<OmnichannelSetting> future =
       omnichannelSettingsServiceClient
           .listOmnichannelSettingsPagedCallable()
           .futureCall(request);
   // Do something.
   for (OmnichannelSetting element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListOmnichannelSettingsRequest,ListOmnichannelSettingsPagedResponse>

requestInventoryVerification(OmnichannelSettingName name)

public final RequestInventoryVerificationResponse requestInventoryVerification(OmnichannelSettingName name)

Requests inventory verification for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   OmnichannelSettingName name = OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]");
   RequestInventoryVerificationResponse response =
       omnichannelSettingsServiceClient.requestInventoryVerification(name);
 }
 
Parameter
Name Description
name OmnichannelSettingName

Required. The name of the omnichannel setting to request inventory verification. Format: accounts/{account}/omnichannelSettings/{omnichannel_setting}

Returns
Type Description
RequestInventoryVerificationResponse

requestInventoryVerification(RequestInventoryVerificationRequest request)

public final RequestInventoryVerificationResponse requestInventoryVerification(RequestInventoryVerificationRequest request)

Requests inventory verification for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   RequestInventoryVerificationRequest request =
       RequestInventoryVerificationRequest.newBuilder()
           .setName(OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString())
           .build();
   RequestInventoryVerificationResponse response =
       omnichannelSettingsServiceClient.requestInventoryVerification(request);
 }
 
Parameter
Name Description
request RequestInventoryVerificationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RequestInventoryVerificationResponse

requestInventoryVerification(String name)

public final RequestInventoryVerificationResponse requestInventoryVerification(String name)

Requests inventory verification for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   String name = OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString();
   RequestInventoryVerificationResponse response =
       omnichannelSettingsServiceClient.requestInventoryVerification(name);
 }
 
Parameter
Name Description
name String

Required. The name of the omnichannel setting to request inventory verification. Format: accounts/{account}/omnichannelSettings/{omnichannel_setting}

Returns
Type Description
RequestInventoryVerificationResponse

requestInventoryVerificationCallable()

public final UnaryCallable<RequestInventoryVerificationRequest,RequestInventoryVerificationResponse> requestInventoryVerificationCallable()

Requests inventory verification for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   RequestInventoryVerificationRequest request =
       RequestInventoryVerificationRequest.newBuilder()
           .setName(OmnichannelSettingName.of("[ACCOUNT]", "[OMNICHANNEL_SETTING]").toString())
           .build();
   ApiFuture<RequestInventoryVerificationResponse> future =
       omnichannelSettingsServiceClient
           .requestInventoryVerificationCallable()
           .futureCall(request);
   // Do something.
   RequestInventoryVerificationResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RequestInventoryVerificationRequest,RequestInventoryVerificationResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateOmnichannelSetting(OmnichannelSetting omnichannelSetting, FieldMask updateMask)

public final OmnichannelSetting updateOmnichannelSetting(OmnichannelSetting omnichannelSetting, FieldMask updateMask)

Update the omnichannel setting for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   OmnichannelSetting omnichannelSetting = OmnichannelSetting.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   OmnichannelSetting response =
       omnichannelSettingsServiceClient.updateOmnichannelSetting(omnichannelSetting, updateMask);
 }
 
Parameters
Name Description
omnichannelSetting OmnichannelSetting

Required. The omnichannel setting to update.

The omnichannel setting's name field is used to identify the omnichannel setting to be updated.

updateMask FieldMask

Required. The list of fields to be updated.

The following fields are supported in snake_case only: - lsf_type - in_stock - pickup - odo - about - inventory_verification

Full replacement with wildcard *is supported, while empty/implied update mask is not.

Returns
Type Description
OmnichannelSetting

updateOmnichannelSetting(UpdateOmnichannelSettingRequest request)

public final OmnichannelSetting updateOmnichannelSetting(UpdateOmnichannelSettingRequest request)

Update the omnichannel setting for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   UpdateOmnichannelSettingRequest request =
       UpdateOmnichannelSettingRequest.newBuilder()
           .setOmnichannelSetting(OmnichannelSetting.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OmnichannelSetting response =
       omnichannelSettingsServiceClient.updateOmnichannelSetting(request);
 }
 
Parameter
Name Description
request UpdateOmnichannelSettingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OmnichannelSetting

updateOmnichannelSettingCallable()

public final UnaryCallable<UpdateOmnichannelSettingRequest,OmnichannelSetting> updateOmnichannelSettingCallable()

Update the omnichannel setting for a given merchant in a given country.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (OmnichannelSettingsServiceClient omnichannelSettingsServiceClient =
     OmnichannelSettingsServiceClient.create()) {
   UpdateOmnichannelSettingRequest request =
       UpdateOmnichannelSettingRequest.newBuilder()
           .setOmnichannelSetting(OmnichannelSetting.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<OmnichannelSetting> future =
       omnichannelSettingsServiceClient.updateOmnichannelSettingCallable().futureCall(request);
   // Do something.
   OmnichannelSetting response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateOmnichannelSettingRequest,OmnichannelSetting>