コード例 #1
0
 /**
  * @param int $id
  * @return bool
  */
 public function accept($id)
 {
     $endpoint = new Accept($this->getTransport());
     $endpoint->setId($id);
     try {
         $result = $endpoint->performRequest();
     } catch (ResourceNotFoundException $e) {
         return false;
     }
     return $result['status'] == 204;
 }
コード例 #2
0
ファイル: AcceptTest.php プロジェクト: hitmeister/api-sdk-php
 /**
  * @expectedException \Hitmeister\Component\Api\Exceptions\RuntimeException
  * @expectedExceptionMessage Required params id is not set
  */
 public function testExceptionOnEmptyId()
 {
     $get = new Accept($this->transport);
     $get->getURI();
 }