NAME

WWW::LogicBoxes::Contact - Representation of Domain Contact

SYNOPSIS

use strict;
use warnings;

use WWW::LogicBoxes::Customer;
use WWW::LogicBoxes::Contact;

my $customer = WWW::LogicBoxes::Customer->new( ... ); # Valid LogicBoxes Customer

my $contact = WWW::LogicBoxes::Contact->new(
    id           => 42,
    name         => 'Edsger Dijkstra',
    company      => 'University of Texas at Austin',
    email        => 'depth.first@search.com',
    address1     => 'University of Texas',
    address2     => '42 Main St',
    city         => 'Austin',
    state        => 'Texas',
    country      => 'US',
    zipcode      => '78713',
    phone_number => '18005551212',
    fax_number   => '18005551212',
    type         => 'Contact',
    customer_id  => $customer->id,
);

DESCRIPTION

Representation of a LogicBoxes domain contact.

ATTRIBUTES

id

Contacts that have actually been created will have an id assigned for them. A predicate exists 'has_id' that can be used to check to see if an id has been assigned to this contact. A private writer of _set_id is also provided.

name

company

Company of the contact. This is a required field so if there is no company some sentinal string of "None" or something similiar should be used.

email

address1

address2

Predicate of has_address2.

address3

Predicate of has_address3.

city

state

This is the full name of the state, so Texas rather than TX should be used. Not all regions in the world have states so this is not a required field, a predicate of has_state exists.

country

The ISO-3166 code for the country. For more information on ISO-3166 please see Wikipedia.

zipcode

phone_number

Be sure to include the country code. When it comes to the phone number a string or Number::Phone object can be provided and it will be coerced into the WWW::LogicBoxes::PhoneNumber internal representation used.

fax_number

Predicate of has_fax_number

type

The type of contact, NOT TO BE CONFUSED with what this contact is being used for on a domain. This IS NOT Registrant, Billing, Admin, or Technical. The default value is 'Contact' and you almost never want to change this.

customer_id

The id of the customer that this contact is assoicated with.

METHODS

These methods are used internally, it's fairly unlikely that consumers will ever call them directly.

construct_creation_request

my $logic_boxes = WWW::LogicBoxes->new( ... );
my $contact     = WWW::LogicBoxes::Contact->new( ... );

my $response = $logic_boxes->submit({
    method => 'contacts__add',
    params => $contact->construct_creation_request(),
});

Converts $self into a HashRef suitable for creation of a contact with LogicBoxes

construct_from_response

my $logic_boxes = WWW::LogicBoxes->new( ... );

my $response = $logic_boxes->submit({
    method => 'contacts__details',
    params => {
        'contact-id' => 42,
    }
});

my $contact = WWW::LogicBoxes::Contact->construct_from_response( $response );

Creates an instance of $self from a LogicBoxes response.

SEE ALSO

For .us domains WWW::LogicBoxes::Contact::US must be used for at least the registrant contact.