public static function binaryBatchUpdate(Api\MtBatchBinarySmsUpdate $batch)
    {
        $fields = Serialize::_batchUpdateHelper($batch);

        $fields['type'] = 'mt_binary';

        if (null != $batch->getBody()) {
            $fields['body'] = base64_encode($batch->getBody());
        }

        if (null != $batch->getUdh()) {
            $fields['udh'] = bin2hex($batch->getUdh());
        }

        return Serialize::_toJson($fields);
    }
public static function binaryBatchUpdate(Api\MtBatchBinarySmsUpdate $batch)
    {
        $fields = Serialize::_batchUpdateHelper($batch);

        $fields['type'] = 'mt_binary';

        if (null != $batch->getBody()) {
            $fields['body'] = base64_encode($batch->getBody());
        }

        if (null != $batch->getUdh()) {
            $fields['udh'] = bin2hex($batch->getUdh());
        }

        return Serialize::_toJson($fields);
    }
public static function binaryBatchUpdate ( Api \ MtBatchBinarySmsUpdate $ batch ) { $ fields = Serialize :: _batchUpdateHelper ( $ batch ) ; $ fields [ 'type' ] = 'mt_binary' ; if ( null != $ batch -> getBody ( ) ) { $ fields [ 'body' ] = base64_encode ( $ batch -> getBody ( ) ) ; } if ( null != $ batch -> getUdh ( ) ) { $ fields [ 'udh' ] = bin2hex ( $ batch -> getUdh ( ) ) ; } return Serialize :: _toJson ( $ fields ) ; }
Serializes the given binary batch update into JSON.

@param Api\MtBatchBinarySmsUpdate $batch the batch update to serialize

@return string JSON formatted string
Serializes the given binary batch update into JSON .