<?phprequire_once(__DIR__.'/../../vendor/autoload.php');/** * * @author braango * * Sample code showing how to get Footers for a personnel * */// TEST auth token. Please contact// sales@braango.com to have one// created for youBraango\Configuration::getDefaultConfiguration()->setApiKey('auth_token','ISNWF0P30WM0CMK');$api_instance=newBraango\braangoapi\FootersApi();// string | id of _sub_dealer_$subdealerid="subdealers2002";// string | id of _personnel_$salespersonid="d1e5cb9c-def7-4273-85c7-46a1b5e46869";// string | Footer type - `client` , `dealer` , `supervisor`$footertype="supervisor";// string | API Key to access this dealer's resources.// Value was returned when create_account api was called and dealer was created first time$apiKey="ISNMdzuNiKG7jhl9d9v";// string | Dealer or partner is accessing this API$accountType="partner";try{$result=$api_instance->getFooters($subdealerid,$salespersonid,$footertype,$apiKey,$accountType);if($result!=null){// Extract out response hdr and bdy$rspHdr=$result->getHeader();if($requestHdr=!null){$rspId=$rspHdr->getId();$braangoRequestId=$rspHdr->getIsnRequestId();print_r("Response ID = ".$rspId.", API Request Id = ".$braangoRequestId."\n");}$rspBdy=$result->getBody();if($rspBdy!=null){$footersOutPutBodyData=$rspBdy->getData();$footersDealer=$footersOutPutBodyData->getDealerFooters();$footersClient=$footersOutPutBodyData->getClientFooters();$footersSupervisor=$footersOutPutBodyData->getSupervisorFooters();// Prints the Client, Dealer, and Supervisor footersif($footertype=="dealer"){print"Dealer Footers = ";print_r($footersDealer);}elseif($footertype=="client"){print"Client Footers = ";print_r($footersClient);}else{print"Supervisor Footers = ";print_r($footersSupervisor);}}}}catch(Exception$e){echo'Exception when calling FootersApi->getFooters: ',$e->getMessage(),PHP_EOL;}?>
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.