The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::eNom::Role::Command::Domain::Transfer - Domain Transfer API Calls

SYNOPSIS

    use WWW::eNom;
    use WWW::eNom::DomainRequest::Transfer;
    use WWW::eNom::DomainTransfer;

    my $api = WWW::eNom->new( ... );

    # Start a Domain Transfer
    my $transfer_request = WWW::eNom::DomainRequest::Transfer->new( ... );
    my $transfer         = $api->transfer_domain( request => $transfer_request );

    # Get the Status of An In Progress Transfer
    my $in_progress_transfer = WWW::eNom::DomainTransfer->new( ... );
    my $updated_transfer     = $api->get_transfer_by_order_id( $in_progress_transfer->order_id );

    # Get history of transfer attempts for a domain
    my $transfers = $api->get_transfer_by_name( 'drzigman.com' );

    for my $transfer (@{ $transfers }) {
        print 'Transfer Order ID: ' . $transfer->order_id . "\n";
        print 'Transfer Status:   ' . $transfer->status   . "\n";
    }

    # Get a Transfer's order_id by the parent order id
    my $order_id = $api->get_transfer_order_id_from_parent_order_id( 42 );
    my $transfer = $api->get_transfer_by_order_id( $order_id );

REQUIRES

submit
get_domain_privacy_wholesale_price

This is needed in order to purchase domain privacy for instances of WWW::eNom::DomainRequest::Transfer that have is_private set to true.

DESCRIPTION

Implements domain transfer operations with the eNom API.

METHODS

transfer_domain

    my $transfer_request = WWW::eNom::DomainRequest::Transfer->new( ... );
    my $transfer         = $api->transfer_domain( request => $transfer_request );

Abstraction of the TP_CreateOrder eNom API Call. Given a WWW::eNom::DomainRequest::Transfer or a HashRef that can be coerced into a WWW::eNom::DomainRequest::Transfer, attempts to start the domain transfer process to move the domain to eNom. Returned is a provisional WWW::eNom::DomainTransfer object.

NOTE Unfortunately, eNom does not process it's transfer requests live, meaning if there are errors with the request (bad EPP Key, domain is not actually registered, etc) you won't find that out for several minutes after submitting the transfer request. That's why a "provisional" WWW::eNom::DomainTransfer object is returned. It is recommended that you periodically check the status of the transfer by using the get_transfer_by_order_id method, paying attention to the status and status_id to ensure the transfer is proceeding smoothly.

FURTHER NOTE If a domain transfer fails for some reason you will have to submit an entirely new transfer_domain request. There is no way to "restart" a failed transfer.

get_transfer_by_order_id

    my $in_progress_transfer = WWW::eNom::DomainTransfer->new( ... );
    my $updated_transfer     = $api->get_transfer_by_order_id( $in_progress_transfer->order_id );

Abstract of the TP_GetOrderDetail eNom API Call. Given the order_id of an in progress domain transfer, returns an instance of WWW::eNom::DomainTransfer with the latest available information.

Please pay special attention to pass the right order_id (a WWW::eNom::DomainTransfer->order_id is always the right order_id). See "order_id" in WWW::eNom::DomainTransfer for a discussion on the different types of order_ids.

get_transfer_by_name

    my $transfers = $api->get_transfer_by_name( 'drzigman.com' );

    for my $transfer (@{ $transfers }) {
        print 'Transfer Order ID: ' . $transfer->order_id . "\n";
        print 'Transfer Status:   ' . $transfer->status   . "\n";
    }

Abstraction of the TP_GetDetailsByDomain eNom API Call. Usually you want to make use of get_transfer_by_order_id however there are several reasons why you make use of get_transfer_by_name.

You don't know the order_id

You really should be saving the order_id but if you don't know it you can search by domain name

You want the fully history of all transfer attempts

The ArrayRef of WWW::eNom::DomainTransfer objects returned contains the full history and what happened with each transfer attempt.

Given a FQDN, returns an ArrayRef of WWW::eNom::DomainTransfer objects representing all of the attempted transfers of the specified FQDN.

get_transfer_order_id_from_parent_order_id

    my $order_id = $api->get_transfer_order_id_from_parent_order_id( 42 );
    my $transfer = $api->get_transfer_by_order_id( $order_id );

Abstraction of the TP_GetOrder eNom API Call. If you only have the parent_order_id for a domain transfer and not the actual transfer's order_id, this method will accept that parent_order_id and provide you with the correct order_id (for usage in methods such as get_transfer_by_order_id).

For a discussion about the different types of order_ids please see "order_id" in WWW::eNom::DomainTransfer