예제 #1
0
 /**
  * @param int $id
  * @param int $amount
  * @return bool
  */
 public function refund($id, $amount)
 {
     $data = new ClaimRefundTransfer();
     $data->amount = (int) $amount;
     $endpoint = new Refund($this->getTransport());
     $endpoint->setId($id);
     $endpoint->setTransfer($data);
     try {
         $result = $endpoint->performRequest();
     } catch (ResourceNotFoundException $e) {
         return false;
     }
     return $result['status'] == 204;
 }
예제 #2
0
 /**
  * @expectedException \Hitmeister\Component\Api\Exceptions\RuntimeException
  * @expectedExceptionMessage Required params id is not set
  */
 public function testExceptionOnEmptyId()
 {
     $get = new Refund($this->transport);
     $get->getURI();
 }