WWW::LogicBoxes::Contact::Factory - Factory for Construction of Contact Objects
use WWW::LogicBoxes; use WWW::LogicBoxes::Contact::Factory; my $api = WWW::LogicBoxes->new( ... ); my $response = $api->submit({ method => 'contacts__details', params => { 'contact-id' => 42, }, }); my $contact = WWW::LogicBoxes::Contact::Factory->construct_from_response( $response );
Abstract Factory that accepts the raw response from LogicBoxes and returns a fully formed WWW::LogicBoxes::Contact or one of it's subclasses.
my $response = $api->submit({ method => 'contacts__details', params => { 'contact-id' => 42, }, }); my $contact = WWW::LogicBoxes::Contact::Factory->construct_from_response( $response );
Given a HashRef that is the JSON response from LogicBoxes when retrieving contact details, returns an instance of WWW::LogicBoxes::Contact or one of it's subclasses.
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.