getResourcePaymentToken method
Generates authentication tokens for payment providers that use vendor-specific authentication mechanisms.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter paymentTokenRequest :
Vendor-specific token request input. Contains all request parameters in a
type-safe, vendor-specific structure.
Parameter resourceCredentialProviderName :
Name of the payment credential provider to use.
Parameter workloadIdentityToken :
Workload access token for authorization.
Implementation
Future<GetResourcePaymentTokenResponse> getResourcePaymentToken({
required PaymentTokenRequestInput paymentTokenRequest,
required String resourceCredentialProviderName,
required String workloadIdentityToken,
}) async {
final $payload = <String, dynamic>{
'paymentTokenRequest': paymentTokenRequest,
'resourceCredentialProviderName': resourceCredentialProviderName,
'workloadIdentityToken': workloadIdentityToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/identities/payment/token',
exceptionFnMap: _exceptionFns,
);
return GetResourcePaymentTokenResponse.fromJson(response);
}