User Guide and Documentation

getReport()Release Date: 2019/08/01

With the obtained report number, we question the status of the sent phone numbers.

It is ensured that numbers are returned as (Pending, Forwarded, Incorrect).

Parameters;

  • $id --- if the the external report number is empty, getReportID() function is used.
public function getReport($id=0){
    $id     = ($id == 0) ? $this->getReportID() : $id;
    $content = $this->instance->ReportLook($id);
    if(!$content){
        $this->error = $this->instance->error;
        return false;
    }

    $waiting            = $content["enroute"];
    $conducted          = $content["delivered"];
    $erroneous          = $content["undelivered"];
    $waiting_arr        = $waiting["data"];
    $conducted_arr      = $conducted["data"];
    $erroneous_arr      = $erroneous["data"];
    $waiting_count      = $waiting["count"];
    $conducted_count    = $conducted["count"];
    $erroneous_count    = $erroneous["count"];
    return [
        'waiting'       => ['data' => $waiting_arr, 'count' => $waiting_count],
        'conducted'     => ['data' => $conducted_arr, 'count' => $conducted_count],
        'erroneous'     => ['data' => $erroneous_arr, 'count' => $erroneous_count],
    ];
}

Return Value;

Array
(
    [waiting] => Array
        (
            [data] => Array
                (
                )

            [count] => 0
        )
Copyright © 2019. All rights reserved.
Top