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

NAME

WWW::LogicBoxes - Interact with LogicBoxes Reseller API

SYNOPSIS

    use strict;
    use warnings;

    use WWW::LogicBoxes;

    my $logic_boxes = WWW::LogicBoxes->new(
        username      => 'resellerid',

        # You may specify a password OR an api_key
        password      => 'Top S3cr3t!',
        api_key       => 'reseller_api_key',

        response_type => 'json',
        sandbox       => 0,
    );

    my $domain_availabilities = $logic_boxes->check_domain_availability(
        slds => [qw( cpan drzigman brainstormincubator ],
        tlds => [qw( com net org )],
        suggestions => 0,
    );

DESCRIPTION

WWW::LogicBoxes is a module for interacting with the LogicBoxes API. LogicBoxes is a domain registrar and the API performs operations such as checking domain availability, purchasing domains, and managing them.

This module is broken down into two primary components (documented below). These are "COMMANDS" in WWW::LogicBoxes which are used for making requests and "OBJECTS" in WWW::LogicBoxes which are used to represent data. Below these, documentation for the WWW::LogicBoxes module is included.

COMMANDS

Commands are how operations are performed using the WWW::LogicBoxes API. They are seperated into related operations, for documentation on the specific command please see the linked pages.

Raw

Low level direct access to the LogicBoxes API. You rarely want to make use of this and instead want to use the abstracted commands outlined below.

Customer

Customer creation and retrieval. All domains belong to a customer.

create_customer
get_customer_by_id
get_customer_by_username

Contact

Contacts are used in whois information and are required for domain registration.

create_contact
get_contact_by_id
update_contact - OBSOLETE!
delete_contact_by_id
get_ca_registrant_agreement

Domain Availability

Used for checking to see if a domain is available for registration as well as getting suggestions of other potentially relevant domains.

check_domain_availability
suggest_domain_names

Domain Registration

New Domain Registration.

register_domain
delete_domain_registration_by_id

Domain Transfer

New Domain Transfers.

is_domain_transferable
transfer_domain
delete_domain_transfer_by_id
resend_transfer_approval_mail_by_id

Domain

Retrieval of and management of registered domains.

get_domain_by_id
get_domain_by_name
update_domain_contacts
enable_domain_lock_by_id
disable_domain_lock_by_id
update_domain_nameservers
renew_domain
resend_verification_email

Domain Private Nameservers

Private nameservers are those that are based on the registered domain. For example, a domain of test-domain.com could have private nameservers ns1.test-domain.com and ns2.test-domain.com.

create_private_nameserver
rename_private_nameserver
modify_private_nameserver_ip
delete_private_nameserver_ip
delete_private_nameserver

OBJECTS

Rather than working with messy JSON objects, WWW::LogicBoxes implements a series of Moose objects for making requests and processing responses. All commands that take an object have coercion so a HashRef can be used in it's place.

WWW::LogicBoxes

Primary interface to LogicBoxes. Documented further below.

WWW::LogicBoxes::Contact

WHOIS data contacts. Typically (with few exceptions) domains contains a Registrant, Admin, Technical, and Billing contact.

WWW::LogicBoxes::Contact::US

Extended contact used for .us domain registrations that contains the required Nexus Data.

WWW::LogicBoxes::Contact::CA

Extended contact used for .ca domain registrations that contains the required CPR and CA Registrant Agreement Data.

WWW::LogicBoxes::Contact::CA::Agreement

The CA Registrant Agreement, contacts for .ca domains must accept it before being allowed to purchase .ca domains.

WWW::LogicBoxes::Customer

A LogicBoxes customer under the reseller account.

WWW::LogicBoxes::IRTPDetail

With the changes that became effective on Dec 1st, 2016 to ICANN rules for updating the registrant contact, this object was created to contain information related to an in progress IRTP Verification. See this object for additional information about the IRTP Changes.

WWW::LogicBoxes::Domain

A registered domain and all of it's related information.

WWW::LogicBoxes::DomainTransfer

A pending domain transfer and all of it's related information.

WWW::LogicBoxes::DomainAvailability

A response to a domain availability request. Contains the status of the domain and if it is available for registration.

WWW::LogicBoxes::DomainRequest::Registration

Request to register a domain.

WWW::LogicBoxes::DomainRequest::Transfer

Request to transfer a domain.

WWW::LogicBoxes::PrivateNameServer

Private Name Server record for a domain. Not all domains will have these.

FACTORIES

In cases where a domain or contact requires additional information (such as .us domains requirning nexus data) factories exist so that the correct subclassed object is returned. As a consumer, you almost never want to call these directly, rather make use of the above "COMMANDS" and let this library worry about constructing the correct objects.

WWW::LogicBoxes::Contact::Factory

Constructs the correct subclassed contact.

WITH

WWW::LogicBoxes::Role::Command

ATTRIBUTES

username

The reseller id to use.

password

NOTE Password based authentication is now deprecated and is not allowed unless specifically requested from LogicBoxes for your reseller account. Instead, you should be using the api_key.

api_key

The API Key used for authentication. Either the password or the api_key MUST be specified, but NOT both. For backwards compatability apikey is an alias.

sandbox

Defaults to false. Determines if requests should go to the production system https://httpapi.com or the development environment https://test.httpapi.com

response_type

Defaults to "xml." Valid values include:

xml
json
xml_simple

It should be noted that this setting is really only relevant when making Raw requests of the LogicBoxes API. When doing so this attribute defines the format of the responses.

Defaults to

METHODS

new

    my $logic_boxes = WWW::LogicBoxes->new(
        username      => 'resellerid',

        # You may specify a password OR an api_key
        password      => 'Top S3cr3t!',
        api_key       => 'reseller_api_key',

        response_type => 'json',
        sandbox       => 0,
    );

Creates a new instance of WWW::LogicBoxes that can be used for API Requests.

AUTHORS

Robert Stone, <drzigman AT cpan DOT org >

ACKNOWLEDGMENTS

Thanks to HostGator and BrainStorm Incubator for funding the development of this module and providing test resources.

CONTRIBUTIONS

Special thanks to the following individuals who have offered commits, bug reports, and/or pull requests.

Doug Schrag
Brandon Husbands
Slaven Rezic
David Foster
Eris Caffee
Boris Voskresenskiy

COPYRIGHT & LICENSE

Copyright 2016 Robert Stone

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU Lesser General Public License as published by the Free Software Foundation; or any compatible license.

See http://dev.perl.org/licenses/ for more information.