WWW::LogicBoxes::Role::Command::Contact - Contact Related Operations
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; use WWW::LogicBoxes::Contact; my $customer = WWW::LogicBoxes::Customer->new( ... ); my $contact = WWW::LogicBoxes::Contact->new( ... ); # Creation my $logic_boxes = WWW::LogicBoxes->new( ... ); $logic_boxes->create_contact( contact => $contact ); # Retrieval my $retrieved_contact = $logic_boxes->get_contact_by_id( $contact->id ); # Update my $old_contact = $logic_boxes->get_contact_by_id( 42 ); my $contact = WWW::LogicBoxes::Contact->new( id => $old_contact->id, ... ); $logic_boxes->update_contact( contact => $contact ); # Deletion $logic_boxes->delete_contact_by_id( $contact->id );
submit
Implements contact related operations with the LogicBoxes's API.
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; use WWW::LogicBoxes::Contact; my $customer = WWW::LogicBoxes::Customer->new( ... ); my $contact = WWW::LogicBoxes::Contact->new( ... ); my $logic_boxes = WWW::LogicBoxes->new( ... ); $logic_boxes->create_contact( contact => $contact ); print 'New contact id: ' . $contact->id . "\n";
Given a WWW::LogicBoxes::Contact or a HashRef that can be coerced into a WWW::LogicBoxes::Contact, creates the specified contact with LogicBoxes.
use WWW::LogicBoxes; use WWW::LogicBoxes::Contact; my $logic_boxes = WWW::LogicBoxes->new( ... ); my $contact = $logic_boxes->get_contact_by_id( 42 );
Given an Integer ID, will return an instance of WWW::LogicBoxes::Contact (or one of it's subclass for specialized contacts). Returns undef if there is no matching contact with the specified id.
use WWW::LogicBoxes; use WWW::LogicBoxes::Customer; use WWW::LogicBoxes::Contact; my $logic_boxes = WWW::LogicBoxes->new( ... ); my $old_contact = $logic_boxes->get_contact_by_id( 42 ); my $contact = WWW::LogicBoxes::Contact->new( id => $old_contact->id, ... ); $logic_boxes->update_contact( contact => $contact );
Given a WWW::LogicBoxes::Contact or a HashRef that can be coerced into a WWW::LogicBoxes::Contact, updates the contact with the specified id with LogicBoxes.
use WWW::LogicBoxes; use WWW::LogicBoxes::Contact; my $logic_boxes = WWW::LogicBoxes->new( ... ); $logic_boxes->delete_contact_by_id( 42 );
Given an Integer ID, will delete the contact with LogicBoxes.
This method will croak if the contact is in use (assigned to a domain).
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.