original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Serializes the given binary batch update into JSON.
  
  @param Api\MtBatchBinarySmsUpdate $batch the batch update to serialize
  
  @return string JSON formatted string
docstring_tokens: Serializes the given binary batch update into JSON .