NAME

WWW::eNom::DomainRequest::Registration - Domain Registration Request

SYNOPSIS

use WWW::eNom;
use WWW::eNom::Contact;
use WWW::eNom::DomainRequest::Registration;

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

# Register a New Domain
my $registration_request = WWW::eNom::DomainRequest::Registration->new(
    name               => 'drzigman.com',
    ns                 => [ 'ns1.enom.com', 'ns2.enom.com' ],
    is_ns_fail_fatal   => 0,   # Optional, defaults to false
    is_locked          => 1,   # Optional, defaults to true
    is_private         => 1,   # Optional, defaults to false
    is_auto_renew      => 0,   # Optional, defaults to false
    is_queueable       => 0,   # Optional, defaults to false
    years              => 1,
    nexus_purpose      => 'P1',    # Only for .us domains
    nexus_category     => 'C11',   # Only for .us domains
    registrant_contact => $contact,
    technical_contact  => $contact,
    admin_contact      => $contact,
    billing_contact    => $contact,
);

# Real way of using this module to register a domain
my $domain = $api->register_domain( request => $registration_request );


# Example showing construct_request, contrived!  Use register_domain in real life!
my $response = $api->submit({
    method => 'Purchase',
    params => $registration_request->construct_request(),
});

WITH

WWW::eNom::Role::ParseDomain

DESCRIPTION

WWW::eNom::DomainRequest::Registration is a representation of all the data needed in order to complete a domain registration. It is used when requesting a new registration from eNom.

ATTRIBUTES

name

The FQDN to register.

ns

ArrayRef of Domain Names that are to be authoritative nameservers for this domain.

Predicate of has_ns. If not specified, eNom's nameservers (or whatever you specially configured in your eNom Reseller Panel) will be used.

is_ns_fail_fatal

Boolean that defaults to false. If set to true, the provided ns values must resolve otherwise the domain registration request will fail.

is_locked

Boolean that defaults to true. Indicates if the domain should be locked, preventing transfers.

is_private

Boolean that defaults to false. If true, the WPPS Service (what eNom calls Privacy Protection) will automatically be purchased and enabled.

It's worth noting that not all domains permit domain privacy. If you attempt to purchase a domain with privacy for one of these domains (such as a .us registration) construction of the request will croak.

is_auto_renew

Boolean that defaults to false. If true, this domain will be automatically renewed by eNom before it expires.

is_queueable

Boolean that defaults to false. If true, eNom will "queue" domain registration requests that it can not be complete in real time (example: the registry connectivity is down).

years

The number of years to register the domain for. Keep in mind there are limits (based on the Public Suffix) but generally this is a Positive Integer between 1 and 10.

nexus_purpose

This is the Domain Name Application Purpose Code, the reason this domain was registered and a bit about it's intended usage. This should be populated ONLY for .us domain registrations. The descriptions come from http://www.whois.us/whois-gui/US/faqs.html.

Must be one of the following 2 character values:

P1 - Business use for profit.
P2 - Non-profit business, club, association, religious organization, etc.
P3 - Personal use.
P4 - Education purposes.
P5 - Government purposes

nexus_category

This is the Nexus Code, it contains information about the contact and their relationship with respect to US residency. This should be populated ONLY for .us domain registrations. The descriptions come from http://www.whois.us/whois-gui/US/faqs.html.

Must be one of the following 2 character values:

C11 - A natural person who is a United States citizen.
C12 - A natural person who is a permanent resident of the United States of America, or any of its possessions or territories.
C21 - A US-based organization or company (A US-based organization or company formed within one of the fifty (50) U.S. states, the District of Columbia, or any of the United States possessions or territories, or organized or otherwise constituted under the laws of a state of the United States of America, the District of Columbia or any of its possessions or territories or a U.S. federal, state, or local government entity or a political subdivision thereof).
C31 - A foreign entity or organization (A foreign entity or organization that has a bona fide presence in the United States of America or any of its possessions or territories who regularly engages in lawful activities (sales of goods or services or other business, commercial or non-commercial, including not-for-profit relations in the United States)).
C32 - Entity has an office or other facility in the United States.

registrant_contact

A WWW::eNom::Contact for the Registrant Contact.

admin_contact

A WWW::eNom::Contact for the Admin Contact.

technical_contact

A WWW::eNom::Contact for the Technical Contact.

billing_contact

A WWW::eNom::Contact for the Billing Contact.

NOTE eNom actually calls this the AuxBilling contact since the primary billing contact is the reseller's information.

METHODS

construct_request

my $registration_request = WWW::eNom::DomainRequest::Registration->new( ... );

my $response = $api->submit({
    method => 'Purchase',
    params => $registration_request->construct_request(),
});

Converts $self into a HashRef suitable for the Purchase of a Domain Name.