redeemCredits method
Redeems an Amazon Web Services promotional credit code on behalf of the calling account. On success, a new credit is added to the account's credit ledger with the amount, validity period, and applicable products defined by the promotion. The credit is then automatically applied to subsequent bills according to the standard credit application order.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter promoCode :
The promotional credit code to redeem.
Implementation
Future<void> redeemCredits({
required String promoCode,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBilling.RedeemCredits'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'promoCode': promoCode,
},
);
}