WWW::eNom::Role::Command::Contact - Contact Related Operations
use WWW::eNom; use WWW::eNom::Contact; my $api = WWW::eNom->new( ... ); # Get Contacts for a Domain my $contacts = $api->get_contacts_by_domain_name( 'drzigman.com' ); for my $contact_type (qw( registrant_contact admin_contact technical_contact billing_contact )) { print "Email Address of $contact_type is: " . $contacts->{$contact_type}->email . "\n"; } # Update Contacts my $new_registrant_contact = WWW::eNom::Contact->new( ... ); my $new_admin_contact = WWW::eNom::Contact->new( ... ); my $new_technical_contact = WWW::eNom::Contact->new( ... ); my $new_billing_contact = WWW::eNom::Contact->new( ... ); my $updated_contacts = $api->update_contacts_for_domain_name( domain_name => 'drzigman.com', is_transfer_locked => 1, # Optional, Defaults to truthy registrant_contact => $new_registrant_contact, # Optional admin_contact => $new_admin_contact, # Optional technical_contact => $new_technical_contact, # Optional billing_contact => $new_billing_contact, # Optional );
Implements contact related operations with eNom's API.
my $contacts = $api->get_contacts_by_domain_name( 'drzigman.com' ); for my $contact_type (qw( registrant_contact admin_contact technical_contact billing_contact )) { print "Email Address of $contact_type is: " . $contacts->{$contact_type}->email . "\n"; }
Abstraction of the GetContacts eNom API Call. Given a FQDN, returns a HashRef of contacts for that domain. The keys for the returned HashRef are:
Each of these keys point to a value which is an instance of WWW::eNom::Contact.
my $updated_contacts = $api->update_contacts_for_domain_name( domain_name => 'drzigman.com', is_transfer_locked => 1, # Optional, Defaults to truthy registrant_contact => $new_registrant_contact, # Optional admin_contact => $new_admin_contact, # Optional technical_contact => $new_technical_contact, # Optional billing_contact => $new_billing_contact, # Optional );
Abstraction of the Contacts eNom API Call. Given a FQDN and new contacts to use, updates the specified contacts to match those provided. Returned is a HashRef of Contacts (see get_contacts_by_domain_name for response format).
AN interesting thing about this method is that you only need specify the contacts you wish to update. If you wish to update registrant, admin, technical, and billing great! Go for it and include all of them in one call. If you wish to update only a subset of the contacts (1, 2 or 3 of them) you should pass only the contacts to be updated.
Moreover, when making changes to the registrant_contact, per the 2016-12-01 ICANN Inter Registrar Transfer Policy, a 60 day transfer lock is imposed on the domain unless the requester explicitly states that they DO NOT wish to have this transfer lock imposed. By default the domain will be locked, however, if you pass a falsey value for is_transfer_locked that lock will not be applied.
To install WWW::eNom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::eNom
CPAN shell
perl -MCPAN -e shell install WWW::eNom
For more information on module installation, please visit the detailed CPAN module installation guide.