postDomainTransfer method

Future<RegisterResult?> postDomainTransfer(
  1. TransferReq transferReq
)

Moves a domain you own at another registrar onto your org here, using its authCode, and answers the same record-plus-quote a purchase does.

Moves a domain you own at another registrar onto your org here, using its authCode, and answers the same record-plus-quote a purchase does. It is priced and charged exactly like a registration: authorize the org's prepaid balance, ask the registrar for the transfer, capture only after the registrar accepts. A name the registrar will not price is 409, an insufficient balance is 402, and a deployment with no registrar credentials is 503. It requires a validated principal; the ownership record is written under that org as soon as the registrar ACCEPTS the request, which is not the same instant the transfer completes at the losing registrar. Unlike a registration this does not provision a zone, so the record carries this deployment's configured nameservers.

Parameters:

Implementation

Future<RegisterResult?> postDomainTransfer(TransferReq transferReq,) async {
  final response = await postDomainTransferWithHttpInfo(transferReq,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RegisterResult',) as RegisterResult;

  }
  return null;
}