code
stringlengths 15
9.96M
| docstring
stringlengths 1
10.1k
| func_name
stringlengths 1
124
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 6
186
| url
stringlengths 50
236
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public static function setMaxNetworkRetries($maxNetworkRetries)
{
self::$maxNetworkRetries = $maxNetworkRetries;
} | > NOTE: this value is only read during client creation, so creating a client and _then_ calling this method won't affect your client's behavior.
@param int $maxNetworkRetries maximum number of request retries | setMaxNetworkRetries | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function getMaxNetworkRetryDelay()
{
return self::$maxNetworkRetryDelay;
} | @return float Maximum delay between retries, in seconds | getMaxNetworkRetryDelay | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function getMaxRetryAfter()
{
return self::$maxRetryAfter;
} | @return float Maximum delay between retries, in seconds, that will be respected from the Stripe API | getMaxRetryAfter | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function getInitialNetworkRetryDelay()
{
return self::$initialNetworkRetryDelay;
} | @return float Initial delay between retries, in seconds | getInitialNetworkRetryDelay | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function getEnableTelemetry()
{
return self::$enableTelemetry;
} | @return bool Whether client telemetry is enabled | getEnableTelemetry | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function setEnableTelemetry($enableTelemetry)
{
self::$enableTelemetry = $enableTelemetry;
} | @param bool $enableTelemetry Enables client telemetry.
Client telemetry enables timing and request metrics to be sent back to Stripe as an HTTP Header
with the current request. This enables Stripe to do latency and metrics analysis without adding extra
overhead (such as extra network calls) on the client. | setEnableTelemetry | php | stripe/stripe-php | lib/Stripe.php | https://github.com/stripe/stripe-php/blob/master/lib/Stripe.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, Collection::class, $params, $opts);
} | A list of <a href="https://stripe.com/docs/tax/tax-categories">all tax codes
available</a> to add to Products in order to allow specific tax calculations.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return Collection<TaxCode> of ApiResources
@throws Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/TaxCode.php | https://github.com/stripe/stripe-php/blob/master/lib/TaxCode.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves the details of an existing tax code. Supply the unique tax code ID and
Stripe will return the corresponding tax code information.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return TaxCode
@throws Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/TaxCode.php | https://github.com/stripe/stripe-php/blob/master/lib/TaxCode.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Delete a specified external account for a given account.
@param null|array $params
@param null|array|string $opts
@return Card the deleted resource
@throws Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Card.php | https://github.com/stripe/stripe-php/blob/master/lib/Card.php | MIT |
public static function retrieve($_id, $_opts = null)
{
$msg = 'Cards cannot be retrieved without a customer ID or an '
. 'account ID. Retrieve a card using '
. "`Customer::retrieveSource('customer_id', 'card_id')` or "
. "`Account::retrieveExternalAccount('account_id', 'card_id')`.";
throw new Exception\BadMethodCallException($msg);
} | @param array|string $_id
@param null|array|string $_opts
@throws Exception\BadMethodCallException | retrieve | php | stripe/stripe-php | lib/Card.php | https://github.com/stripe/stripe-php/blob/master/lib/Card.php | MIT |
public static function update($_id, $_params = null, $_options = null)
{
$msg = 'Cards cannot be updated without a customer ID or an '
. 'account ID. Update a card using '
. "`Customer::updateSource('customer_id', 'card_id', "
. '$updateParams)` or `Account::updateExternalAccount('
. "'account_id', 'card_id', \$updateParams)`.";
throw new Exception\BadMethodCallException($msg);
} | @param string $_id
@param null|array $_params
@param null|array|string $_options
@throws Exception\BadMethodCallException | update | php | stripe/stripe-php | lib/Card.php | https://github.com/stripe/stripe-php/blob/master/lib/Card.php | MIT |
public function save($opts = null)
{
$params = $this->serializeParameters();
if (\count($params) > 0) {
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
$this->refreshFrom($response, $opts);
}
return $this;
} | @param null|array|string $opts
@return static the saved resource
@throws Exception\ApiErrorException if the request fails
@deprecated The `save` method is deprecated and will be removed in a
future major version of the library. Use the static method `update`
on the resource instead. | save | php | stripe/stripe-php | lib/Card.php | https://github.com/stripe/stripe-php/blob/master/lib/Card.php | MIT |
public static function retrieve($opts = null)
{
$opts = Util\RequestOptions::parse($opts);
$instance = new static(null, $opts);
$instance->refresh();
return $instance;
} | Retrieves the current account balance, based on the authentication that was used
to make the request. For a sample request, see <a
href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting
for negative balances</a>.
@param null|array|string $opts
@return Balance
@throws Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Balance.php | https://github.com/stripe/stripe-php/blob/master/lib/Balance.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a Customer Session object that includes a single-use client secret that
you can use on your front-end to grant client-side API access for certain
customer resources.
@param null|array{components: array{buy_button?: array{enabled: bool}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
@param null|array|string $options
@return CustomerSession the created resource
@throws Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/CustomerSession.php | https://github.com/stripe/stripe-php/blob/master/lib/CustomerSession.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | To send funds to your own bank account, create a new payout object. Your <a
href="#balance">Stripe balance</a> must cover the payout amount. If it doesn’t,
you receive an “Insufficient Funds” error.
If your API key is in test mode, money won’t actually be sent, though every
other action occurs as if you’re in live mode.
If you create a manual payout on a Stripe account that uses multiple payment
source types, you need to specify the source type balance that the payout draws
from. The <a href="#balance_object">balance object</a> details available and
pending amounts by source type.
@param null|array{amount: int, currency: string, description?: string, destination?: string, expand?: string[], metadata?: StripeObject, method?: string, source_type?: string, statement_descriptor?: string} $params
@param null|array|string $options
@return Payout the created resource
@throws Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, Collection::class, $params, $opts);
} | Returns a list of existing payouts sent to third-party bank accounts or payouts
that Stripe sent to you. The payouts return in sorted order, with the most
recently created payouts appearing first.
@param null|array{arrival_date?: array|int, created?: array|int, destination?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
@param null|array|string $opts
@return Collection<Payout> of ApiResources
@throws Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves the details of an existing payout. Supply the unique payout ID from
either a payout creation request or the payout list. Stripe returns the
corresponding payout information.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Payout
@throws Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates the specified payout by setting the values of the parameters you pass.
We don’t change parameters that you don’t provide. This request only accepts the
metadata as arguments.
@param string $id the ID of the resource to update
@param null|array{expand?: string[], metadata?: null|StripeObject} $params
@param null|array|string $opts
@return Payout the updated resource
@throws Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public function cancel($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/cancel';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Payout the canceled payout
@throws Exception\ApiErrorException if the request fails | cancel | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public function reverse($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/reverse';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Payout the reversed payout
@throws Exception\ApiErrorException if the request fails | reverse | php | stripe/stripe-php | lib/Payout.php | https://github.com/stripe/stripe-php/blob/master/lib/Payout.php | MIT |
public function __construct($requestId, $requestDuration, $usage = [])
{
$this->requestId = $requestId;
$this->requestDuration = $requestDuration;
$this->usage = $usage;
} | Initialize a new telemetry object.
@param string $requestId the request's request ID
@param int $requestDuration the request's duration in milliseconds
@param string[] $usage names of tracked behaviors associated with this request | __construct | php | stripe/stripe-php | lib/RequestTelemetry.php | https://github.com/stripe/stripe-php/blob/master/lib/RequestTelemetry.php | MIT |
public function refreshFrom($values, $opts, $partial = false, $apiMode = 'v1')
{
// Unlike most other API resources, the API will omit attributes in
// error objects when they have a null value. We manually set default
// values here to facilitate generic error handling.
$values = \array_merge([
'error' => null,
'error_description' => null,
], $values);
parent::refreshFrom($values, $opts, $partial);
} | Refreshes this object using the provided values.
@param array $values
@param null|array|string|Util\RequestOptions $opts
@param bool $partial defaults to false
@param 'v1'|'v2' $apiMode | refreshFrom | php | stripe/stripe-php | lib/OAuthErrorObject.php | https://github.com/stripe/stripe-php/blob/master/lib/OAuthErrorObject.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, Collection::class, $params, $opts);
} | Lists all Country Spec objects available in the API.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return Collection<CountrySpec> of ApiResources
@throws Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/CountrySpec.php | https://github.com/stripe/stripe-php/blob/master/lib/CountrySpec.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Returns a Country Spec for a given Country code.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return CountrySpec
@throws Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/CountrySpec.php | https://github.com/stripe/stripe-php/blob/master/lib/CountrySpec.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Create or replace a secret in the secret store.
@param null|array{expand?: string[], expires_at?: int, name: string, payload: string, scope: array{type: string, user?: string}} $params
@param null|array|string $options
@return Secret the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Apps/Secret.php | https://github.com/stripe/stripe-php/blob/master/lib/Apps/Secret.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | List all secrets stored on the given scope.
@param null|array{ending_before?: string, expand?: string[], limit?: int, scope: array{type: string, user?: string}, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Secret> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Apps/Secret.php | https://github.com/stripe/stripe-php/blob/master/lib/Apps/Secret.php | MIT |
public static function deleteWhere($params = null, $opts = null)
{
$url = static::classUrl() . '/delete';
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | @param null|array $params
@param null|array|string $opts
@return Secret the deleted secret
@throws \Stripe\Exception\ApiErrorException if the request fails | deleteWhere | php | stripe/stripe-php | lib/Apps/Secret.php | https://github.com/stripe/stripe-php/blob/master/lib/Apps/Secret.php | MIT |
public static function find($params = null, $opts = null)
{
$url = static::classUrl() . '/find';
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | @param null|array $params
@param null|array|string $opts
@return Secret the finded secret
@throws \Stripe\Exception\ApiErrorException if the request fails | find | php | stripe/stripe-php | lib/Apps/Secret.php | https://github.com/stripe/stripe-php/blob/master/lib/Apps/Secret.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a new <code>Configuration</code> object.
@param null|array{bbpos_wisepos_e?: array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
@param null|array|string $options
@return Configuration the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Terminal/Configuration.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Configuration.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Deletes a <code>Configuration</code> object.
@param null|array $params
@param null|array|string $opts
@return Configuration the deleted resource
@throws \Stripe\Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Terminal/Configuration.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Configuration.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of <code>Configuration</code> objects.
@param null|array{ending_before?: string, expand?: string[], is_account_default?: bool, limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Configuration> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Terminal/Configuration.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Configuration.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a <code>Configuration</code> object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Configuration
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Terminal/Configuration.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Configuration.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a new <code>Configuration</code> object.
@param string $id the ID of the resource to update
@param null|array{bbpos_wisepos_e?: null|array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: null|array{end_hour: int, start_hour: int}, stripe_s700?: null|array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
@param null|array|string $opts
@return Configuration the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Terminal/Configuration.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Configuration.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a new <code>Location</code> object. For further details, including which
address fields are required in each country, see the <a
href="/docs/terminal/fleet/locations">Manage locations</a> guide.
@param null|array{address: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: string, display_name: string, expand?: string[], metadata?: null|\Stripe\StripeObject} $params
@param null|array|string $options
@return Location the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Terminal/Location.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Location.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Deletes a <code>Location</code> object.
@param null|array $params
@param null|array|string $opts
@return Location the deleted resource
@throws \Stripe\Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Terminal/Location.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Location.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of <code>Location</code> objects.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Location> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Terminal/Location.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Location.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a <code>Location</code> object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Location
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Terminal/Location.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Location.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a <code>Location</code> object by setting the values of the parameters
passed. Any parameters not provided will be left unchanged.
@param string $id the ID of the resource to update
@param null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: null|string, display_name?: string, expand?: string[], metadata?: null|\Stripe\StripeObject} $params
@param null|array|string $opts
@return Location the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Terminal/Location.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Location.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a new <code>Reader</code> object.
@param null|array{expand?: string[], label?: string, location?: string, metadata?: null|\Stripe\StripeObject, registration_code: string} $params
@param null|array|string $options
@return Reader the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Deletes a <code>Reader</code> object.
@param null|array $params
@param null|array|string $opts
@return Reader the deleted resource
@throws \Stripe\Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of <code>Reader</code> objects.
@param null|array{device_type?: string, ending_before?: string, expand?: string[], limit?: int, location?: string, serial_number?: string, starting_after?: string, status?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Reader> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a <code>Reader</code> object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Reader
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a <code>Reader</code> object by setting the values of the parameters
passed. Any parameters not provided will be left unchanged.
@param string $id the ID of the resource to update
@param null|array{expand?: string[], label?: null|string, metadata?: null|\Stripe\StripeObject} $params
@param null|array|string $opts
@return Reader the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function cancelAction($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/cancel_action';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Reader the canceled reader
@throws \Stripe\Exception\ApiErrorException if the request fails | cancelAction | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function processPaymentIntent($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/process_payment_intent';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Reader the processed reader
@throws \Stripe\Exception\ApiErrorException if the request fails | processPaymentIntent | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function processSetupIntent($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/process_setup_intent';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Reader the processed reader
@throws \Stripe\Exception\ApiErrorException if the request fails | processSetupIntent | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function refundPayment($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/refund_payment';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Reader the refunded reader
@throws \Stripe\Exception\ApiErrorException if the request fails | refundPayment | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public function setReaderDisplay($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/set_reader_display';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Reader the seted reader
@throws \Stripe\Exception\ApiErrorException if the request fails | setReaderDisplay | php | stripe/stripe-php | lib/Terminal/Reader.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/Reader.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived
connection token from Stripe, proxied through your server. On your backend, add
an endpoint that creates and returns a connection token.
@param null|array{expand?: string[], location?: string} $params
@param null|array|string $options
@return ConnectionToken the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Terminal/ConnectionToken.php | https://github.com/stripe/stripe-php/blob/master/lib/Terminal/ConnectionToken.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Lists all available Climate supplier objects.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Supplier> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Climate/Supplier.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Supplier.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a Climate supplier object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Supplier
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Climate/Supplier.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Supplier.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Lists all available Climate product objects.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Product> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Climate/Product.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Product.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves the details of a Climate product with the given ID.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Product
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Climate/Product.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Product.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a Climate order object for a given Climate product. The order will be
processed immediately after creation and payment will be deducted your Stripe
balance.
@param null|array{amount?: int, beneficiary?: array{public_name: string}, currency?: string, expand?: string[], metadata?: \Stripe\StripeObject, metric_tons?: string, product: string} $params
@param null|array|string $options
@return Order the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Climate/Order.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Order.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Lists all Climate order objects. The orders are returned sorted by creation
date, with the most recently created orders appearing first.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Order> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Climate/Order.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Order.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves the details of a Climate order object with the given ID.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Order
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Climate/Order.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Order.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates the specified order by setting the values of the parameters passed.
@param string $id the ID of the resource to update
@param null|array{beneficiary?: null|array{public_name: null|string}, expand?: string[], metadata?: \Stripe\StripeObject} $params
@param null|array|string $opts
@return Order the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Climate/Order.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Order.php | MIT |
public function cancel($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/cancel';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Order the canceled order
@throws \Stripe\Exception\ApiErrorException if the request fails | cancel | php | stripe/stripe-php | lib/Climate/Order.php | https://github.com/stripe/stripe-php/blob/master/lib/Climate/Order.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a credit grant.
@param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: \Stripe\StripeObject, name?: string, priority?: int} $params
@param null|array|string $options
@return CreditGrant the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Retrieve a list of credit grants.
@param null|array{customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<CreditGrant> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a credit grant.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return CreditGrant
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a credit grant.
@param string $id the ID of the resource to update
@param null|array{expand?: string[], expires_at?: null|int, metadata?: \Stripe\StripeObject} $params
@param null|array|string $opts
@return CreditGrant the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public function expire($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/expire';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return CreditGrant the expired credit grant
@throws \Stripe\Exception\ApiErrorException if the request fails | expire | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public function voidGrant($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/void';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return CreditGrant the voided credit grant
@throws \Stripe\Exception\ApiErrorException if the request fails | voidGrant | php | stripe/stripe-php | lib/Billing/CreditGrant.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditGrant.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Retrieve a list of credit balance transactions.
@param null|array{credit_grant?: string, customer: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<CreditBalanceTransaction> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Billing/CreditBalanceTransaction.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditBalanceTransaction.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a credit balance transaction.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return CreditBalanceTransaction
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Billing/CreditBalanceTransaction.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditBalanceTransaction.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a billing meter.
@param null|array{customer_mapping?: array{event_payload_key: string, type: string}, default_aggregation: array{formula: string}, display_name: string, event_name: string, event_time_window?: string, expand?: string[], value_settings?: array{event_payload_key: string}} $params
@param null|array|string $options
@return Meter the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Retrieve a list of billing meters.
@param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Meter> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a billing meter given an ID.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Meter
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a billing meter.
@param string $id the ID of the resource to update
@param null|array{display_name?: string, expand?: string[]} $params
@param null|array|string $opts
@return Meter the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public function deactivate($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/deactivate';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Meter the deactivated meter
@throws \Stripe\Exception\ApiErrorException if the request fails | deactivate | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public function reactivate($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/reactivate';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Meter the reactivated meter
@throws \Stripe\Exception\ApiErrorException if the request fails | reactivate | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public static function allEventSummaries($id, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_EVENT_SUMMARIES, $params, $opts);
} | @param string $id the ID of the meter on which to retrieve the meter event summaries
@param null|array $params
@param null|array|string $opts
@return \Stripe\Collection<MeterEventSummary> the list of meter event summaries
@throws \Stripe\Exception\ApiErrorException if the request fails | allEventSummaries | php | stripe/stripe-php | lib/Billing/Meter.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Meter.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a billing meter event.
@param null|array{event_name: string, expand?: string[], identifier?: string, payload: \Stripe\StripeObject, timestamp?: int} $params
@param null|array|string $options
@return MeterEvent the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Billing/MeterEvent.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/MeterEvent.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a billing alert.
@param null|array{alert_type: string, expand?: string[], title: string, usage_threshold?: array{filters?: array{customer?: string, type: string}[], gte: int, meter?: string, recurrence: string}} $params
@param null|array|string $options
@return Alert the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Lists billing active and inactive alerts.
@param null|array{alert_type?: string, ending_before?: string, expand?: string[], limit?: int, meter?: string, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<Alert> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a billing alert given an ID.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return Alert
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public function activate($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/activate';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Alert the activated alert
@throws \Stripe\Exception\ApiErrorException if the request fails | activate | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public function archive($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/archive';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Alert the archived alert
@throws \Stripe\Exception\ApiErrorException if the request fails | archive | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public function deactivate($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/deactivate';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | @param null|array $params
@param null|array|string $opts
@return Alert the deactivated alert
@throws \Stripe\Exception\ApiErrorException if the request fails | deactivate | php | stripe/stripe-php | lib/Billing/Alert.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/Alert.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a billing meter event adjustment.
@param null|array{cancel?: array{identifier?: string}, event_name: string, expand?: string[], type: string} $params
@param null|array|string $options
@return MeterEventAdjustment the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Billing/MeterEventAdjustment.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/MeterEventAdjustment.php | MIT |
public static function retrieve($opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static(null, $opts);
$instance->refresh();
return $instance;
} | Retrieves the credit balance summary for a customer.
@param null|array|string $opts
@return CreditBalanceSummary
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Billing/CreditBalanceSummary.php | https://github.com/stripe/stripe-php/blob/master/lib/Billing/CreditBalanceSummary.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of early fraud warnings.
@param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<EarlyFraudWarning> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Radar/EarlyFraudWarning.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/EarlyFraudWarning.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves the details of an early fraud warning that has previously been
created.
Please refer to the <a href="#early_fraud_warning_object">early fraud
warning</a> object reference for more details.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return EarlyFraudWarning
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Radar/EarlyFraudWarning.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/EarlyFraudWarning.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a new <code>ValueListItem</code> object, which is added to the specified
parent value list.
@param null|array{expand?: string[], value: string, value_list: string} $params
@param null|array|string $options
@return ValueListItem the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Radar/ValueListItem.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueListItem.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Deletes a <code>ValueListItem</code> object, removing it from its parent value
list.
@param null|array $params
@param null|array|string $opts
@return ValueListItem the deleted resource
@throws \Stripe\Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Radar/ValueListItem.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueListItem.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of <code>ValueListItem</code> objects. The objects are sorted in
descending order by creation date, with the most recently created object
appearing first.
@param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, value?: string, value_list: string} $params
@param null|array|string $opts
@return \Stripe\Collection<ValueListItem> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Radar/ValueListItem.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueListItem.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a <code>ValueListItem</code> object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return ValueListItem
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Radar/ValueListItem.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueListItem.php | MIT |
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Creates a new <code>ValueList</code> object, which can then be referenced in
rules.
@param null|array{alias: string, expand?: string[], item_type?: string, metadata?: \Stripe\StripeObject, name: string} $params
@param null|array|string $options
@return ValueList the created resource
@throws \Stripe\Exception\ApiErrorException if the request fails | create | php | stripe/stripe-php | lib/Radar/ValueList.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueList.php | MIT |
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
} | Deletes a <code>ValueList</code> object, also deleting any items contained
within the value list. To be deleted, a value list must not be referenced in any
rules.
@param null|array $params
@param null|array|string $opts
@return ValueList the deleted resource
@throws \Stripe\Exception\ApiErrorException if the request fails | delete | php | stripe/stripe-php | lib/Radar/ValueList.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueList.php | MIT |
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
} | Returns a list of <code>ValueList</code> objects. The objects are sorted in
descending order by creation date, with the most recently created object
appearing first.
@param null|array{alias?: string, contains?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
@param null|array|string $opts
@return \Stripe\Collection<ValueList> of ApiResources
@throws \Stripe\Exception\ApiErrorException if the request fails | all | php | stripe/stripe-php | lib/Radar/ValueList.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueList.php | MIT |
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
} | Retrieves a <code>ValueList</code> object.
@param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
@param null|array|string $opts
@return ValueList
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Radar/ValueList.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueList.php | MIT |
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
} | Updates a <code>ValueList</code> object by setting the values of the parameters
passed. Any parameters not provided will be left unchanged. Note that
<code>item_type</code> is immutable.
@param string $id the ID of the resource to update
@param null|array{alias?: string, expand?: string[], metadata?: \Stripe\StripeObject, name?: string} $params
@param null|array|string $opts
@return ValueList the updated resource
@throws \Stripe\Exception\ApiErrorException if the request fails | update | php | stripe/stripe-php | lib/Radar/ValueList.php | https://github.com/stripe/stripe-php/blob/master/lib/Radar/ValueList.php | MIT |
public static function baseUrl()
{
return \Stripe\Stripe::$apiBase;
} | @return string the base URL for the given class | baseUrl | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public function offsetGet($k)
{
if (\is_string($k)) {
return parent::offsetGet($k);
}
$msg = "You tried to access the {$k} index, but V2Collection "
. 'types only support string keys. (HINT: List calls '
. 'return an object with a `data` (which is the data '
. "array). You likely want to call ->data[{$k}])";
throw new \Stripe\Exception\InvalidArgumentException($msg);
} | [\ReturnTypeWillChange] | offsetGet | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public function count()
{
return \count($this->data);
} | [\ReturnTypeWillChange] | count | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public function getIterator()
{
return new \ArrayIterator($this->data);
} | [\ReturnTypeWillChange] | getIterator | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public function getReverseIterator()
{
return new \ArrayIterator(\array_reverse($this->data));
} | @return \ArrayIterator an iterator that can be used to iterate
backwards across objects in the current page | getReverseIterator | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public function autoPagingIterator()
{
$page = $this->data;
$next_page_url = $this->next_page_url;
while (true) {
foreach ($page as $item) {
yield $item;
}
if (null === $next_page_url) {
break;
}
list($response, $opts) = $this->_request(
'get',
$next_page_url,
null,
null,
[],
'v2'
);
$obj = \Stripe\Util\Util::convertToStripeObject($response, $opts, 'v2');
/** @phpstan-ignore-next-line */
$page = $obj->data;
/** @phpstan-ignore-next-line */
$next_page_url = $obj->next_page_url;
}
} | @return \Generator|TStripeObject[] A generator that can be used to
iterate across all objects across all pages. As page boundaries are
encountered, the next page will be fetched automatically for
continued iteration.
@throws \Stripe\Exception\ApiErrorException | autoPagingIterator | php | stripe/stripe-php | lib/V2/Collection.php | https://github.com/stripe/stripe-php/blob/master/lib/V2/Collection.php | MIT |
public static function retrieve($opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static(null, $opts);
$instance->refresh();
return $instance;
} | Retrieves Tax <code>Settings</code> for a merchant.
@param null|array|string $opts
@return Settings
@throws \Stripe\Exception\ApiErrorException if the request fails | retrieve | php | stripe/stripe-php | lib/Tax/Settings.php | https://github.com/stripe/stripe-php/blob/master/lib/Tax/Settings.php | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.