WWW::LogicBoxes::Role::Command::Customer - Customer Related Operations
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; my $logic_boxes = WWW::LogicBoxes->new( ... ); # Creation my $customer = WWW::LogicBoxes->new( ... ); $logic_boxes->create_customer( customer => $customer, password => 'Top Secret!', ); # Retrieval my $retrieved_customer = $logic_boxes->get_customer_by_id( $customer->id ); my $retrieved_customer = $logic_boxes->get_customer_by_username( $customer->username ); # An email address
submit
Implements customer related operations with the LogicBoxes's API.
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; my $logic_boxes = WWW::LogicBoxes->new( ... ); my $customer = WWW::LogicBoxes->new( ... ); $logic_boxes->create_customer( customer => $customer, password => 'Top Secret!', ); print 'New customer id: ' . $customer->id . "\n";
Given a WWW::LogicBoxes::Customer or a HashRef that can coerced into a WWW::LogicBoxes::Customer and a password, creates the specified customer.
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; my $logic_boxes = WWW::LogicBoxes->new( ... ); my $retrieved_customer = $logic_boxes->get_customer_by_id( 42 );
Given an Integer ID, will return an instace of WWW::LogicBoxes::Customer. Returns undef if there is no matching WWW::LogicBoxes::Customer with the specified id.
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; my $logic_boxes = WWW::LogicBoxes->new( ... ); my $retrieved_customer = $logic_boxes->get_customer_by_username( 'domainbuyer@test-domain.com' );
Given an Email Address of a customer, will return an instance of WWW::LogicBoxes::Customer. Returns undef if there is no matching WWW::LogicBoxes::Customer with the specified email address.
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.