Difference between revisions of "Freeside:3:Documentation:Developer/FS/part export/domreg opensrs"
m (Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Latest revision as of 21:08, 27 June 2012
Contents
NAME
FS::part_export::domreg_opensrs - Register or transfer domains with Tucows OpenSRS
DESCRIPTION
This module handles registering and transferring domains using a registration service provider (RSP) account at Tucows OpenSRS, an ICANN-approved domain registrar.
As a part_export, this module can be designated for use with svc_domain services. When the svc_domain object is inserted into the Freeside database, registration or transferring of the domain may be initiated, depending on the setting of the svc_domain's action field.
- N - Register the domain; M - Transfer the domain; I - Ignore the domain for registration purposes
This export uses Net::OpenSRS. Registration and transfer attempts will fail unless Net::OpenSRS is installed and LWP::UserAgent is able to make HTTPS posts. You can turn on debugging messages and use the OpenSRS test gateway when setting up this export.
METHODS
- format_tel
- Reformats a phone number according to registry rules. Currently Freeside stores phone numbers in NANPA format and the registry prefers "+CCC.NPANPXNNNN"
- gen_contact_info
- Generates contact data for the domain based on the customer data.
- Currently relies on Net::OpenSRS to format the telephone number for OpenSRS.
- validate_contact_info
- Attempts to validate contact data for the domain based on OpenSRS rules.
- Returns undef if the contact data is acceptable, an error message if the contact data lacks one or more required fields.
- testmode
- Returns the Net::OpenSRS-required test mode string based on whether the export is configured to use the live or the test gateway.
- _export_insert
- Attempts to "export" the domain, i.e. register or transfer it if the user selected that option when editing the domain.
- Returns an error message on failure or undef on success.
- May also return an error message if it cannot load the required Perl module Net::OpenSRS, or if the domain is not registerable, or if insufficient data is provided in the customer record to generate the required contact information to register or transfer the domain.
- is_supported_domain
- Return undef if the domain name uses a TLD or SLD that is supported by this registrar. Otherwise return an error message explaining what's wrong.
- get_srs; get_status
- Returns a reference to a hashref containing information on the domain's status. The keys defined depend on the status.
- 'unregistered' means the domain is not registered.
- Otherwise, if the domain is in an asynchronous operation such as a transfer, returns the state of that operation.
- Otherwise returns a value indicating if the domain can be managed through our reseller account.
- register
- Attempts to register the domain through the reseller account associated with this export.
- Like most export functions, returns an error message on failure or undef on success.
- transfer
- Attempts to transfer the domain into the reseller account associated with this export.
- Like most export functions, returns an error message on failure or undef on success.
- renew
- Attempts to renew the domain for the specified number of years.
- Like most export functions, returns an error message on failure or undef on success.
- renew_through [ EPOCH_DATE ]
- Attempts to renew the domain through the specified date. If no date is provided it is gleaned from the associated cust_pkg bill date
- Like some export functions, dies on failure or returns undef on success. It is always called from the queue.
- revoke
- Attempts to revoke the domain registration. Only succeeds if invoked during the OpenSRS grace period immediately after registration.
- Like most export functions, returns an error message on failure or undef on success.
- registrar
- Should return a full-blown object representing OpenSRS, but current just returns a hashref containing the registrar name.
SEE ALSO
Net::OpenSRS, FS::part_export_option, FS::export_svc, FS::svc_domain, FS::Record, schema.html from the base documentation.