private static function _createBatchHelper(Api\MtBatchSmsCreate &$batch)
    {
        $fields = [
            'from' => $batch->getSender(),
            'to' => $batch->getRecipients()
        ];

        if (null != $batch->getDeliveryReport()) {
            $fields['delivery_report'] = $batch->getDeliveryReport();
        }

        if (null != $batch->getSendAt()) {
            $fields['send_at'] = Serialize::_dateTime($batch->getSendAt());
        }

        if (null != $batch->getExpireAt()) {
            $fields['expire_at'] = Serialize::_dateTime($batch->getExpireAt());
        }

        if (null != $batch->getTags()) {
            $fields['tags'] = $batch->getTags();
        }

        if (null != $batch->getCallbackUrl()) {
            $fields['callback_url'] = $batch->getCallbackUrl();
        }

        return $fields;
    }
private static function _createBatchHelper(Api\MtBatchSmsCreate &$batch)
    {
        $fields = [
            'from' => $batch->getSender(),
            'to' => $batch->getRecipients()
        ];

        if (null != $batch->getDeliveryReport()) {
            $fields['delivery_report'] = $batch->getDeliveryReport();
        }

        if (null != $batch->getSendAt()) {
            $fields['send_at'] = Serialize::_dateTime($batch->getSendAt());
        }

        if (null != $batch->getExpireAt()) {
            $fields['expire_at'] = Serialize::_dateTime($batch->getExpireAt());
        }

        if (null != $batch->getTags()) {
            $fields['tags'] = $batch->getTags();
        }

        if (null != $batch->getCallbackUrl()) {
            $fields['callback_url'] = $batch->getCallbackUrl();
        }

        return $fields;
    }
private static function _createBatchHelper ( Api \ MtBatchSmsCreate & $ batch ) { $ fields = [ 'from' => $ batch -> getSender ( ) , 'to' => $ batch -> getRecipients ( ) ] ; if ( null != $ batch -> getDeliveryReport ( ) ) { $ fields [ 'delivery_report' ] = $ batch -> getDeliveryReport ( ) ; } if ( null != $ batch -> getSendAt ( ) ) { $ fields [ 'send_at' ] = Serialize :: _dateTime ( $ batch -> getSendAt ( ) ) ; } if ( null != $ batch -> getExpireAt ( ) ) { $ fields [ 'expire_at' ] = Serialize :: _dateTime ( $ batch -> getExpireAt ( ) ) ; } if ( null != $ batch -> getTags ( ) ) { $ fields [ 'tags' ] = $ batch -> getTags ( ) ; } if ( null != $ batch -> getCallbackUrl ( ) ) { $ fields [ 'callback_url' ] = $ batch -> getCallbackUrl ( ) ; } return $ fields ; }
Helper that prepares the fields of a batch creates for JSON
serialization.

@param Api\MtBatchSmsCreate $batch the batch to serialize

@return [] associative array for JSON serialization
Helper that prepares the fields of a batch creates for JSON serialization .