code: public function updateMedia($id, Media $media)
          {
              if ($media instanceof MediaResponse) {
                  // Downcast to skip unnecessary params.
                  $media = new Media(json_decode(json_encode($media), true));
              }
  
              $parameters = [
              'query' => [],
              'body' => json_encode(['media' => $media], JSON_UNESCAPED_UNICODE),
              'headers' => [],
          ];
  
              $result = $this->post('v1/media/' . $id . '', $parameters);
              $result = new MediaResponse($result);
  
              return $result;
          }
docs: Update a specific Media.
  
  Note that type_id cannot be set directly, but must be decided by the category. The properties parameter of the media
  
  @param  int           $id    the Media identifier
  @param  Media         $media A JSON encoded Media representing the updates
  @return MediaResponse