createHoursOfOperationOverride method
Creates an hours of operation override in an Connect Customer hours of operation resource.
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter config :
Configuration information for the hours of operation override: day, start
time, and end time.
Parameter effectiveFrom :
The date from when the hours of operation override is effective.
Parameter effectiveTill :
The date until when the hours of operation override is effective.
Parameter hoursOfOperationId :
The identifier for the hours of operation
Parameter instanceId :
The identifier of the Connect Customer instance.
Parameter name :
The name of the hours of operation override.
Parameter description :
The description of the hours of operation override.
Parameter overrideType :
Whether the override will be defined as a standard or as a
recurring event.
For more information about how override types are applied, see Build your list of overrides in the Administrator Guide.
Parameter recurrenceConfig :
Configuration for a recurring event.
Implementation
Future<CreateHoursOfOperationOverrideResponse>
createHoursOfOperationOverride({
required List<HoursOfOperationOverrideConfig> config,
required String effectiveFrom,
required String effectiveTill,
required String hoursOfOperationId,
required String instanceId,
required String name,
String? description,
OverrideType? overrideType,
RecurrenceConfig? recurrenceConfig,
}) async {
final $payload = <String, dynamic>{
'Config': config,
'EffectiveFrom': effectiveFrom,
'EffectiveTill': effectiveTill,
'Name': name,
if (description != null) 'Description': description,
if (overrideType != null) 'OverrideType': overrideType.value,
if (recurrenceConfig != null) 'RecurrenceConfig': recurrenceConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/hours-of-operations/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(hoursOfOperationId)}/overrides',
exceptionFnMap: _exceptionFns,
);
return CreateHoursOfOperationOverrideResponse.fromJson(response);
}