updateHoursOfOperationOverride method

Future<void> updateHoursOfOperationOverride({
  1. required String hoursOfOperationId,
  2. required String hoursOfOperationOverrideId,
  3. required String instanceId,
  4. List<HoursOfOperationOverrideConfig>? config,
  5. String? description,
  6. String? effectiveFrom,
  7. String? effectiveTill,
  8. String? name,
  9. OverrideType? overrideType,
  10. RecurrenceConfig? recurrenceConfig,
})

Update the hours of operation override.

May throw ConditionalOperationFailedException. May throw DuplicateResourceException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter hoursOfOperationId : The identifier for the hours of operation.

Parameter hoursOfOperationOverrideId : The identifier for the hours of operation override.

Parameter instanceId : The identifier of the Connect Customer instance.

Parameter config : Configuration information for the hours of operation override: day, start time, and end time.

Parameter description : The description of the hours of operation override.

Parameter effectiveFrom : The date from when the hours of operation override would be effective.

Parameter effectiveTill : The date until the hours of operation override is effective.

Parameter name : The name 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<void> updateHoursOfOperationOverride({
  required String hoursOfOperationId,
  required String hoursOfOperationOverrideId,
  required String instanceId,
  List<HoursOfOperationOverrideConfig>? config,
  String? description,
  String? effectiveFrom,
  String? effectiveTill,
  String? name,
  OverrideType? overrideType,
  RecurrenceConfig? recurrenceConfig,
}) async {
  final $payload = <String, dynamic>{
    if (config != null) 'Config': config,
    if (description != null) 'Description': description,
    if (effectiveFrom != null) 'EffectiveFrom': effectiveFrom,
    if (effectiveTill != null) 'EffectiveTill': effectiveTill,
    if (name != null) 'Name': name,
    if (overrideType != null) 'OverrideType': overrideType.value,
    if (recurrenceConfig != null) 'RecurrenceConfig': recurrenceConfig,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/hours-of-operations/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(hoursOfOperationId)}/overrides/${Uri.encodeComponent(hoursOfOperationOverrideId)}',
    exceptionFnMap: _exceptionFns,
  );
}