コード例 #1
0
ファイル: Transfer.php プロジェクト: neevan1e/Done
 public function transactions($params = null)
 {
     $requestor = new Stripe_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl() . '/transactions';
     list($response, $apiKey) = $requestor->request('get', $url, $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #2
0
ファイル: Invoice.php プロジェクト: ilaro-org/processing-docs
 public static function upcoming($params = null, $apiKey = null)
 {
     $requestor = new Stripe_ApiRequestor($apiKey);
     $url = self::classUrl(get_class()) . '/upcoming';
     list($response, $apiKey) = $requestor->request('get', $url, $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #3
0
 protected static function _scopedCreate($class, $params = null, $apiKey = null)
 {
     self::_validateCall('create', $params, $apiKey);
     $requestor = new Stripe_ApiRequestor($apiKey);
     $url = self::classUrl($class);
     list($response, $apiKey) = $requestor->request('post', $url, $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #4
0
ファイル: List.php プロジェクト: danielcoats/schoolpress
 public function retrieve($id, $params = null)
 {
     $requestor = new Stripe_ApiRequestor($this->_apiKey);
     $base = $this['url'];
     $id = Stripe_ApiRequestor::utf8($id);
     $extn = urlencode($id);
     list($response, $apiKey) = $requestor->request('get', "{$base}/{$extn}", $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #5
0
ファイル: List.php プロジェクト: hyrmedia/builderengine
 public function retrieve($id, $params = null)
 {
     list($url, $params) = $this->extractPathAndUpdateParams($params);
     $requestor = new Stripe_ApiRequestor($this->_apiKey);
     $id = Stripe_ApiRequestor::utf8($id);
     $extn = urlencode($id);
     list($response, $apiKey) = $requestor->request('get', "{$url}/{$extn}", $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #6
0
ファイル: Object.php プロジェクト: sgh1986915/php-crm
 public function refreshFrom($values, $apiKey, $partial = false)
 {
     $this->_apiKey = $apiKey;
     // Wipe old state before setting new.  This is useful for e.g. updating a
     // customer, where there is no persistent card parameter.  Mark those values
     // which don't persist as transient
     if ($partial) {
         $removed = new Stripe_Util_Set();
     } else {
         $removed = array_diff(array_keys($this->_values), array_keys($values));
     }
     foreach ($removed as $k) {
         if (self::$_permanentAttributes->includes($k)) {
             continue;
         }
         unset($this->{$k});
     }
     foreach ($values as $k => $v) {
         if (self::$_permanentAttributes->includes($k)) {
             continue;
         }
         if (self::$_nestedUpdatableAttributes->includes($k) && is_array($v)) {
             $this->_values[$k] = Stripe_Object::scopedConstructFrom('Stripe_AttachedObject', $v, $apiKey);
         } else {
             $this->_values[$k] = Stripe_Util::convertToStripeObject($v, $apiKey);
         }
         $this->_transientValues->discard($k);
         $this->_unsavedValues->discard($k);
     }
 }
コード例 #7
0
ファイル: ApiResource.php プロジェクト: q0821/esportshop
 protected static function _scopedCreate($class, $params = null, $options = null)
 {
     self::_validateCall('create', $params, $options);
     $opts = Stripe_RequestOptions::parse($options);
     $base = self::_scopedLsb($class, 'baseUrl');
     $requestor = new Stripe_ApiRequestor($opts->apiKey, $base);
     $url = self::_scopedLsb($class, 'classUrl', $class);
     list($response, $apiKey) = $requestor->request('post', $url, $params, $opts->headers);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #8
0
ファイル: List.php プロジェクト: sgh1986915/php-crm
 public function all($params = null)
 {
     $requestor = new Stripe_ApiRequestor($this->_apiKey);
     list($response, $apiKey) = $requestor->request('get', $this['url'], $params);
     return Stripe_Util::convertToStripeObject($response, $apiKey);
 }
コード例 #9
0
ファイル: Object.php プロジェクト: q0821/esportshop
 public function refreshFrom($values, $apiKey, $partial = false)
 {
     $this->_apiKey = $apiKey;
     if ($partial) {
         $removed = new Stripe_Util_Set();
     } else {
         $removed = array_diff(array_keys($this->_values), array_keys($values));
     }
     foreach ($removed as $k) {
         if (self::$permanentAttributes->includes($k)) {
             continue;
         }
         unset($this->{$k});
     }
     foreach ($values as $k => $v) {
         if (self::$permanentAttributes->includes($k) && isset($this[$k])) {
             continue;
         }
         if (self::$nestedUpdatableAttributes->includes($k) && is_array($v)) {
             $this->_values[$k] = Stripe_Object::scopedConstructFrom('Stripe_AttachedObject', $v, $apiKey);
         } else {
             $this->_values[$k] = Stripe_Util::convertToStripeObject($v, $apiKey);
         }
         $this->_transientValues->discard($k);
         $this->_unsavedValues->discard($k);
     }
 }