updatePaymentManager method

Future<UpdatePaymentManagerResponse> updatePaymentManager({
  1. required String paymentManagerId,
  2. AuthorizerConfiguration? authorizerConfiguration,
  3. PaymentsAuthorizerType? authorizerType,
  4. String? clientToken,
  5. String? description,
  6. String? roleArn,
})

Updates an existing payment manager. This operation uses PATCH semantics, so you only need to specify the fields you want to change.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter paymentManagerId : The unique identifier of the payment manager to update.

Parameter authorizerConfiguration : The updated authorizer configuration for the payment manager.

Parameter authorizerType : The updated authorizer type for the payment manager.

Parameter clientToken : A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

Parameter description : The updated description of the payment manager.

Parameter roleArn : The updated Amazon Resource Name (ARN) of the IAM role for the payment manager.

Implementation

Future<UpdatePaymentManagerResponse> updatePaymentManager({
  required String paymentManagerId,
  AuthorizerConfiguration? authorizerConfiguration,
  PaymentsAuthorizerType? authorizerType,
  String? clientToken,
  String? description,
  String? roleArn,
}) async {
  final $payload = <String, dynamic>{
    if (authorizerConfiguration != null)
      'authorizerConfiguration': authorizerConfiguration,
    if (authorizerType != null) 'authorizerType': authorizerType.value,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (roleArn != null) 'roleArn': roleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/payments/managers/${Uri.encodeComponent(paymentManagerId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePaymentManagerResponse.fromJson(response);
}