original_string: public function cancelRefund(CardPayments\Refund $refund)
      {
          $refund->setRequiredFields(array('id'));
          $refund->checkRequiredFields();
  
          $tmpRefund = new CardPayments\Refund(array(
               'status' => 'CANCELLED'
          ));
          $request = new Request(array(
               'method' => Request::PUT,
               'uri' => $this->prepareURI("/refunds/" . $refund->id),
               'body' => $tmpRefund
          ));
          $response = $this->client->processRequest($request);
  
          return new CardPayments\Refund($response);
      }
code: public function cancelRefund(CardPayments\Refund $refund)
      {
          $refund->setRequiredFields(array('id'));
          $refund->checkRequiredFields();
  
          $tmpRefund = new CardPayments\Refund(array(
               'status' => 'CANCELLED'
          ));
          $request = new Request(array(
               'method' => Request::PUT,
               'uri' => $this->prepareURI("/refunds/" . $refund->id),
               'body' => $tmpRefund
          ));
          $response = $this->client->processRequest($request);
  
          return new CardPayments\Refund($response);
      }
code_tokens: public function cancelRefund ( CardPayments \ Refund $ refund ) { $ refund -> setRequiredFields ( array ( 'id' ) ) ; $ refund -> checkRequiredFields ( ) ; $ tmpRefund = new CardPayments \ Refund ( array ( 'status' => 'CANCELLED' ) ) ; $ request = new Request ( array ( 'method' => Request :: PUT , 'uri' => $ this -> prepareURI ( "/refunds/" . $ refund -> id ) , 'body' => $ tmpRefund ) ) ; $ response = $ this -> client -> processRequest ( $ request ) ; return new CardPayments \ Refund ( $ response ) ; }
docstring: Cancel Refund.
  
  @param \Paysafe\CardPayments\Refund $refund
  @return \Paysafe\CardPayments\Refund
  @throws PaysafeException
docstring_tokens: Cancel Refund .