setomnichannelexperience method
Sets the omnichannel experience for the specified country.
Only supported for merchants whose POS data provider is trusted to enable the corresponding experience. For more context, see these help articles about LFP and how to get started with it.
Request parameters:
merchantId
- The ID of the managing account. If this parameter is not
the same as accountId, then this account must be a multi-client account
and accountId
must be the ID of a sub-account of this account.
accountId
- The ID of the account for which to retrieve accessible
Business Profiles.
country
- The CLDR country code (for example, "US") for which the
omnichannel experience is selected.
lsfType
- The Local Store Front (LSF) type for this country. Acceptable
values are: - "ghlsf
" (Google-Hosted Local Store Front) - "mhlsfBasic
"
(Merchant-Hosted Local Store Front Basic) - "mhlsfFull
" (Merchant-Hosted
Local Store Front Full) More details about these types can be found here.
pickupTypes
- The Pickup types for this country. Acceptable values are:
- "
pickupToday
" - "pickupLater
"
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a LiaOmnichannelExperience.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<LiaOmnichannelExperience> setomnichannelexperience(
core.String merchantId,
core.String accountId, {
core.String? country,
core.String? lsfType,
core.List<core.String>? pickupTypes,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (country != null) 'country': [country],
if (lsfType != null) 'lsfType': [lsfType],
if (pickupTypes != null) 'pickupTypes': pickupTypes,
if ($fields != null) 'fields': [$fields],
};
final url_ = commons.escapeVariable('$merchantId') +
'/liasettings/' +
commons.escapeVariable('$accountId') +
'/setomnichannelexperience';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return LiaOmnichannelExperience.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}