WWW::LogicBoxes::Customer - Representation of LogicBoxes Customer
use strict; use warnings; use WWW::LogicBoxes::Customer; my $customer = WWW::LogicBoxes::Customer->new( id => 42, username => 'alan.turing@enigma-crackers.com', name => 'Alan Turing', company => 'Princeton University', address1 => 'Office P is Equal to NP', address2 => '123 Turing Machine Way', address3 => 'Suite 100', city => 'New York', state => 'New York', country => 'US', zipcode => '10108', phone_number => '18005551212', alt_phone_number => '18005551212', mobile_phone_number => '18005551212', fax_number => '18005551212', language_preference => 'en', );
Representation of a LogicBoxes customer.
Customers that have been created with LogicBoxes 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 customer. A private writer of _set_id is also provided.
Email address for customer.
Company of the customer. This is a required field so if there is no company some sentinal string of "None" or something similiar shou ld be used.
Predicate of has_address2.
Predicate of has_address3.
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.
The ISO-3166 code for the country. For more information on ISO-3166 please see Wikipedia.
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 wi ll be coerced into the WWW::LogicBoxes::PhoneNumber internal representation used.
Predicate of has_alt_phone_number.
Predicate of has_mobile_phone_number.
Predicate of has_fax_number.
The default language to use for messages that are displayed to customers if they log directly into LogicBoxes. This must be an ISO-639-1 two digit language code as detailed in https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes. The default is en for English.
If you have fully abstracted LogicBoxes for your customers and they never log in directly to manage their domains then this value doesn't really matter.
These methods are used internally, it's fairly unlikely that consumers will ever call them directly.
my $logic_boxes = WWW::LogicBoxes->new( ... ); my $response = $logic_boxes->submit({ method => 'customers__details_by_id', params => { 'customer-id' => 42, } }); my $customer = WWW::LogicBoxes::Customer->construct_from_response( $response );
Creates an instance of $self from a LogicBoxes response.
To install WWW::LogicBoxes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::LogicBoxes
CPAN shell
perl -MCPAN -e shell install WWW::LogicBoxes
For more information on module installation, please visit the detailed CPAN module installation guide.