registrationSessionVerifyWithHttpInfo method

Future<Response> registrationSessionVerifyWithHttpInfo(
  1. String sessionId,
  2. UserRegistrationVerifyRequest verifyRequest
)

Verify email address

Verify email address

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> registrationSessionVerifyWithHttpInfo(
    String sessionId, UserRegistrationVerifyRequest verifyRequest) async {
  // Verify required params are set.
  if (sessionId == null) {
    throw ApiException(HttpStatus.badRequest, 'Missing required param: sessionId');
  }
  if (verifyRequest == null) {
    throw ApiException(HttpStatus.badRequest, 'Missing required param: verifyRequest');
  }

  final path = r'/registration/{sessionId}/verify/'
      .replaceAll('{' + 'sessionId' + '}', sessionId.toString());

  Object postBody = verifyRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  final contentTypes = <String>['application/json'];
  final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
  final authNames = <String>['Bearer'];

  if (nullableContentType != null &&
      nullableContentType.toLowerCase().startsWith('multipart/form-data')) {
    bool hasFields = false;
    final mp = MultipartRequest("", Uri());
    if (hasFields) {
      postBody = mp;
    }
  } else {}

  return await apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    nullableContentType,
    authNames,
  );
}