コード例 #1
0
 /**
  * Initiates organization object
  *
  * @param Client $client Billy API Client
  *
  * @throws Exception
  */
 public function __construct($client)
 {
     $response = $client->get('/organization');
     if ($response->isSuccess()) {
         $this->organization = $response->getBody()->organization;
     } else {
         throw new BillyException('Unable to retrieve organization information.');
     }
 }
コード例 #2
0
 /**
  * Deletes a single item for an object endpoint
  *
  * @param string $apiID API ID
  *
  * @return mixed
  * @throws \Billy\Exception\BillyException
  */
 public function delete($apiID)
 {
     $response = parent::delete($this->url . '?ids[]=' . $apiID);
     $this->validateResponse($response);
     return $response->getBody();
 }