amendBenefitApplication method
Modifies an existing benefit application by applying amendments to specific fields while maintaining revision control.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter amendmentReason :
A descriptive reason explaining why the benefit application is being
amended.
Parameter amendments :
A list of specific field amendments to apply to the benefit application.
Parameter catalog :
The catalog identifier that specifies which benefit catalog the
application belongs to.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotent processing of the
amendment request.
Parameter identifier :
The unique identifier of the benefit application to be amended.
Parameter revision :
The current revision number of the benefit application to ensure
optimistic concurrency control.
Implementation
Future<void> amendBenefitApplication({
required String amendmentReason,
required List<Amendment> amendments,
required String catalog,
required String clientToken,
required String identifier,
required String revision,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PartnerCentralBenefitsService.AmendBenefitApplication'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AmendmentReason': amendmentReason,
'Amendments': amendments,
'Catalog': catalog,
'ClientToken': clientToken,
'Identifier': identifier,
'Revision': revision,
},
);
}