示例#1
0
 public function testWrongType()
 {
     $caught = false;
     try {
         $opts = Stripe_RequestOptions::parse(5);
     } catch (Stripe_Error $e) {
         $caught = true;
     }
     $this->assertTrue($caught);
 }
示例#2
0
 protected function _scopedDelete($class, $params = null, $options = null)
 {
     self::_validateCall('delete', $params, $options);
     $opts = Stripe_RequestOptions::parse($options);
     $key = $opts->apiKey ? $opts->apiKey : $this->_apiKey;
     $requestor = new Stripe_ApiRequestor($key, self::baseUrl());
     $url = $this->instanceUrl();
     list($response, $apiKey) = $requestor->request('delete', $url, $params);
     $this->refreshFrom($response, $apiKey);
     return $this;
 }