resolveCustomer method

Future<ResolveCustomerResult> resolveCustomer({
  1. required String registrationToken,
})

ResolveCustomer is called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a registration token through their browser. The registration token is resolved through this API to obtain a CustomerIdentifier and product code.

May throw InvalidTokenException. May throw ExpiredTokenException. May throw ThrottlingException. May throw InternalServiceErrorException. May throw DisabledApiException.

Parameter registrationToken : When a buyer visits your website during the registration process, the buyer submits a registration token through the browser. The registration token is resolved to obtain a CustomerIdentifier and product code.

Implementation

Future<ResolveCustomerResult> resolveCustomer({
  required String registrationToken,
}) async {
  ArgumentError.checkNotNull(registrationToken, 'registrationToken');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSMPMeteringService.ResolveCustomer'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RegistrationToken': registrationToken,
    },
  );

  return ResolveCustomerResult.fromJson(jsonResponse.body);
}