public static function batchRecipientDeliveryReport($json)
    {
        $fields = Deserialize::_fromJson($json);

        if (!isset($fields->type)
            || $fields->type != 'recipient_delivery_report_sms'
        ) {
            throw new UnexpectedResponseException(
                "Expected recipient delivery report", $json
            );
        }

        $result = new Api\BatchRecipientDeliveryReport();

        $result->setBatchId($fields->batch_id);
        $result->setRecipient($fields->recipient);
        $result->setCode($fields->code);
        $result->setStatus($fields->status);
        $result->setStatusAt(Deserialize::_dateTime($json, $fields->at));

        if (isset($fields->status_message)) {
            $result->setStatusMessage($fields->status_message);
        }

        if (isset($fields->operator)) {
            $result->setOperator($fields->operator);
        }

        if (isset($fields->operator_status_at)) {
            $result->setOperatorStatusAt(
                Deserialize::_dateTime(
                    $json, $fields->operator_status_at
                )
            );
        }

        return $result;
    }
public static function batchRecipientDeliveryReport($json)
    {
        $fields = Deserialize::_fromJson($json);

        if (!isset($fields->type)
            || $fields->type != 'recipient_delivery_report_sms'
        ) {
            throw new UnexpectedResponseException(
                "Expected recipient delivery report", $json
            );
        }

        $result = new Api\BatchRecipientDeliveryReport();

        $result->setBatchId($fields->batch_id);
        $result->setRecipient($fields->recipient);
        $result->setCode($fields->code);
        $result->setStatus($fields->status);
        $result->setStatusAt(Deserialize::_dateTime($json, $fields->at));

        if (isset($fields->status_message)) {
            $result->setStatusMessage($fields->status_message);
        }

        if (isset($fields->operator)) {
            $result->setOperator($fields->operator);
        }

        if (isset($fields->operator_status_at)) {
            $result->setOperatorStatusAt(
                Deserialize::_dateTime(
                    $json, $fields->operator_status_at
                )
            );
        }

        return $result;
    }
public static function batchRecipientDeliveryReport ( $ json ) { $ fields = Deserialize :: _fromJson ( $ json ) ; if ( ! isset ( $ fields -> type ) || $ fields -> type != 'recipient_delivery_report_sms' ) { throw new UnexpectedResponseException ( "Expected recipient delivery report" , $ json ) ; } $ result = new Api \ BatchRecipientDeliveryReport ( ) ; $ result -> setBatchId ( $ fields -> batch_id ) ; $ result -> setRecipient ( $ fields -> recipient ) ; $ result -> setCode ( $ fields -> code ) ; $ result -> setStatus ( $ fields -> status ) ; $ result -> setStatusAt ( Deserialize :: _dateTime ( $ json , $ fields -> at ) ) ; if ( isset ( $ fields -> status_message ) ) { $ result -> setStatusMessage ( $ fields -> status_message ) ; } if ( isset ( $ fields -> operator ) ) { $ result -> setOperator ( $ fields -> operator ) ; } if ( isset ( $ fields -> operator_status_at ) ) { $ result -> setOperatorStatusAt ( Deserialize :: _dateTime ( $ json , $ fields -> operator_status_at ) ) ; } return $ result ; }
Reads a batch recipient delivery report from the given JSON
text.

@param string $json JSON formatted text

@return Api\batchRecipientDeliveryReport a delivery report

@throws UnexpectedResponseException if the JSON contained an
unexpected message type
Reads a batch recipient delivery report from the given JSON text .