mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-11 13:28:40 +00:00
Test fixes
This commit is contained in:
parent
2ffb129021
commit
876867f744
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,32 +13,32 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/accounts">create and manage Express or
|
||||
* Custom accounts</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $business_profile Business information about the account.
|
||||
* @property null|string $business_type The business type.
|
||||
* @property \Stripe\StripeObject $capabilities
|
||||
* @property bool $charges_enabled Whether the account can create live charges.
|
||||
* @property \Stripe\StripeObject $company
|
||||
* @property \Stripe\StripeObject $controller
|
||||
* @property string $country The account's country.
|
||||
* @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
|
||||
* @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>.
|
||||
* @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
|
||||
* @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
|
||||
* @property \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
|
||||
* @property \Stripe\StripeObject $future_requirements
|
||||
* @property \Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the <a href="https://stripe.com/docs/connect/standard-accounts">Standard onboarding</a> or <a href="https://stripe.com/docs/connect/express-accounts">Express onboarding documentation</a> for information about platform pre-filling and account onboarding steps.</p><p>Related guide: <a href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling Identity Verification with the API</a>.</p>
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property bool $payouts_enabled Whether Stripe can send payouts to this account.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe.
|
||||
* @property \Stripe\StripeObject $tos_acceptance
|
||||
* @property string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, or <code>custom</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $business_profile Business information about the account.
|
||||
* @property null|string $business_type The business type.
|
||||
* @property \Stripe\StripeObject $capabilities
|
||||
* @property bool $charges_enabled Whether the account can create live charges.
|
||||
* @property \Stripe\StripeObject $company
|
||||
* @property \Stripe\StripeObject $controller
|
||||
* @property string $country The account's country.
|
||||
* @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
|
||||
* @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>.
|
||||
* @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
|
||||
* @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
|
||||
* @property \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
|
||||
* @property \Stripe\StripeObject $future_requirements
|
||||
* @property \Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the <a href="https://stripe.com/docs/connect/standard-accounts">Standard onboarding</a> or <a href="https://stripe.com/docs/connect/express-accounts">Express onboarding documentation</a> for information about platform pre-filling and account onboarding steps.</p><p>Related guide: <a href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling Identity Verification with the API</a>.</p>
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property bool $payouts_enabled Whether Stripe can send payouts to this account.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe.
|
||||
* @property \Stripe\StripeObject $tos_acceptance
|
||||
* @property string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, or <code>custom</code>.
|
||||
*/
|
||||
class Account extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'account';
|
||||
public const OBJECT_NAME = 'account';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -46,14 +46,19 @@ class Account extends ApiResource
|
|||
use ApiOperations\NestedResource;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const BUSINESS_TYPE_COMPANY = 'company';
|
||||
const BUSINESS_TYPE_GOVERNMENT_ENTITY = 'government_entity';
|
||||
const BUSINESS_TYPE_INDIVIDUAL = 'individual';
|
||||
const BUSINESS_TYPE_NON_PROFIT = 'non_profit';
|
||||
public const BUSINESS_TYPE_COMPANY = 'company';
|
||||
|
||||
const TYPE_CUSTOM = 'custom';
|
||||
const TYPE_EXPRESS = 'express';
|
||||
const TYPE_STANDARD = 'standard';
|
||||
public const BUSINESS_TYPE_GOVERNMENT_ENTITY = 'government_entity';
|
||||
|
||||
public const BUSINESS_TYPE_INDIVIDUAL = 'individual';
|
||||
|
||||
public const BUSINESS_TYPE_NON_PROFIT = 'non_profit';
|
||||
|
||||
public const TYPE_CUSTOM = 'custom';
|
||||
|
||||
public const TYPE_EXPRESS = 'express';
|
||||
|
||||
public const TYPE_STANDARD = 'standard';
|
||||
|
||||
use ApiOperations\Retrieve {
|
||||
retrieve as protected _retrieve;
|
||||
|
|
@ -62,7 +67,7 @@ class Account extends ApiResource
|
|||
public static function getSavedNestedResources()
|
||||
{
|
||||
static $savedNestedResources = null;
|
||||
if (null === $savedNestedResources) {
|
||||
if ($savedNestedResources === null) {
|
||||
$savedNestedResources = new Util\Set([
|
||||
'external_account',
|
||||
'bank_account',
|
||||
|
|
@ -74,7 +79,7 @@ class Account extends ApiResource
|
|||
|
||||
public function instanceUrl()
|
||||
{
|
||||
if (null === $this['id']) {
|
||||
if ($this['id'] === null) {
|
||||
return '/v1/account';
|
||||
}
|
||||
|
||||
|
|
@ -82,8 +87,8 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array|string $id the ID of the account to retrieve, or an
|
||||
* options array containing an `id` key
|
||||
* @param null|array|string $id the ID of the account to retrieve, or an
|
||||
* options array containing an `id` key
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -92,9 +97,9 @@ class Account extends ApiResource
|
|||
*/
|
||||
public static function retrieve($id = null, $opts = null)
|
||||
{
|
||||
if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) {
|
||||
if (!$opts && \is_string($id) && \substr($id, 0, 3) === 'sk_') {
|
||||
$opts = $id;
|
||||
$id = null;
|
||||
$id = null;
|
||||
}
|
||||
|
||||
return self::_retrieve($id, $opts);
|
||||
|
|
@ -106,10 +111,10 @@ class Account extends ApiResource
|
|||
if (isset($this->_values['legal_entity'])) {
|
||||
$entity = $this['legal_entity'];
|
||||
if (isset($entity->_values['additional_owners'])) {
|
||||
$owners = $entity['additional_owners'];
|
||||
$entityUpdate = isset($update['legal_entity']) ? $update['legal_entity'] : [];
|
||||
$owners = $entity['additional_owners'];
|
||||
$entityUpdate = isset($update['legal_entity']) ? $update['legal_entity'] : [];
|
||||
$entityUpdate['additional_owners'] = $this->serializeAdditionalOwners($entity, $owners);
|
||||
$update['legal_entity'] = $entityUpdate;
|
||||
$update['legal_entity'] = $entityUpdate;
|
||||
}
|
||||
}
|
||||
if (isset($this->_values['individual'])) {
|
||||
|
|
@ -139,7 +144,7 @@ class Account extends ApiResource
|
|||
foreach ($additionalOwners as $i => $v) {
|
||||
$update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v;
|
||||
|
||||
if ([] !== $update) {
|
||||
if ($update !== []) {
|
||||
if (!$originalValue
|
||||
|| !\array_key_exists($i, $originalValue)
|
||||
|| ($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
|
||||
|
|
@ -152,7 +157,7 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $clientId
|
||||
* @param null|array $clientId
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -162,7 +167,7 @@ class Account extends ApiResource
|
|||
public function deauthorize($clientId = null, $opts = null)
|
||||
{
|
||||
$params = [
|
||||
'client_id' => $clientId,
|
||||
'client_id' => $clientId,
|
||||
'stripe_user_id' => $this->id,
|
||||
];
|
||||
|
||||
|
|
@ -170,7 +175,7 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -179,18 +184,18 @@ class Account extends ApiResource
|
|||
*/
|
||||
public function reject($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/reject';
|
||||
$url = $this->instanceUrl() . '/reject';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
const PATH_CAPABILITIES = '/capabilities';
|
||||
public const PATH_CAPABILITIES = '/capabilities';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to retrieve the capabilities
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to retrieve the capabilities
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -203,9 +208,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the capability belongs
|
||||
* @param string $capabilityId the ID of the capability to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the capability belongs
|
||||
* @param string $capabilityId the ID of the capability to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -218,9 +223,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the capability belongs
|
||||
* @param string $capabilityId the ID of the capability to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the capability belongs
|
||||
* @param string $capabilityId the ID of the capability to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -231,11 +236,12 @@ class Account extends ApiResource
|
|||
{
|
||||
return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
|
||||
}
|
||||
const PATH_EXTERNAL_ACCOUNTS = '/external_accounts';
|
||||
|
||||
public const PATH_EXTERNAL_ACCOUNTS = '/external_accounts';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to retrieve the external accounts
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to retrieve the external accounts
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -248,8 +254,8 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to create the external account
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to create the external account
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -262,9 +268,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to delete
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to delete
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -277,9 +283,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -292,9 +298,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the external account belongs
|
||||
* @param string $externalAccountId the ID of the external account to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -305,11 +311,12 @@ class Account extends ApiResource
|
|||
{
|
||||
return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
|
||||
}
|
||||
const PATH_LOGIN_LINKS = '/login_links';
|
||||
|
||||
public const PATH_LOGIN_LINKS = '/login_links';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to create the login link
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to create the login link
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -320,11 +327,12 @@ class Account extends ApiResource
|
|||
{
|
||||
return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts);
|
||||
}
|
||||
const PATH_PERSONS = '/persons';
|
||||
|
||||
public const PATH_PERSONS = '/persons';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to retrieve the persons
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to retrieve the persons
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -337,8 +345,8 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account on which to create the person
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account on which to create the person
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -351,9 +359,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to delete
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to delete
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -366,9 +374,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -381,9 +389,9 @@ class Account extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the account to which the person belongs
|
||||
* @param string $personId the ID of the person to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,14 +13,14 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/connect-onboarding">Connect
|
||||
* Onboarding</a>.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property int $expires_at The timestamp at which this account link will expire.
|
||||
* @property string $url The URL for the account link.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property int $expires_at The timestamp at which this account link will expire.
|
||||
* @property string $url The URL for the account link.
|
||||
*/
|
||||
class AccountLink extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'account_link';
|
||||
public const OBJECT_NAME = 'account_link';
|
||||
|
||||
use ApiOperations\Create;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace Stripe\ApiOperations;
|
|||
trait All
|
||||
{
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -23,7 +23,7 @@ trait All
|
|||
$url = static::classUrl();
|
||||
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
if (!($obj instanceof \Stripe\Collection)) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace Stripe\ApiOperations;
|
|||
trait Create
|
||||
{
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -23,7 +23,7 @@ trait Create
|
|||
$url = static::classUrl();
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace Stripe\ApiOperations;
|
|||
trait Delete
|
||||
{
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -21,7 +21,7 @@ trait Delete
|
|||
{
|
||||
self::_validateParams($params);
|
||||
|
||||
$url = $this->instanceUrl();
|
||||
$url = $this->instanceUrl();
|
||||
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -10,9 +10,9 @@ namespace Stripe\ApiOperations;
|
|||
trait NestedResource
|
||||
{
|
||||
/**
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param null|array $params
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
|
|
@ -22,15 +22,15 @@ trait NestedResource
|
|||
self::_validateParams($params);
|
||||
|
||||
list($response, $opts) = static::_staticRequest($method, $url, $params, $options);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
*
|
||||
* @return string
|
||||
|
|
@ -38,7 +38,7 @@ trait NestedResource
|
|||
protected static function _nestedResourceUrl($id, $nestedPath, $nestedId = null)
|
||||
{
|
||||
$url = static::resourceUrl($id) . $nestedPath;
|
||||
if (null !== $nestedId) {
|
||||
if ($nestedId !== null) {
|
||||
$url .= "/{$nestedId}";
|
||||
}
|
||||
|
||||
|
|
@ -46,9 +46,9 @@ trait NestedResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -63,10 +63,10 @@ trait NestedResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -81,10 +81,10 @@ trait NestedResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -99,10 +99,10 @@ trait NestedResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|string $nestedId
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -117,9 +117,9 @@ trait NestedResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param string $nestedPath
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ trait Request
|
|||
*
|
||||
* @throws \Stripe\Exception\InvalidArgumentException if $params exists and is not an array
|
||||
*/
|
||||
protected static function _validateParams($params = null)
|
||||
protected static function _validateParams($params = null) : void
|
||||
{
|
||||
if ($params && !\is_array($params)) {
|
||||
$message = 'You must pass an array as the first argument to Stripe API '
|
||||
|
|
@ -27,9 +27,9 @@ trait Request
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param array $params list of parameters for the request
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param array $params list of parameters for the request
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -38,7 +38,7 @@ trait Request
|
|||
*/
|
||||
protected function _request($method, $url, $params = [], $options = null)
|
||||
{
|
||||
$opts = $this->_opts->merge($options);
|
||||
$opts = $this->_opts->merge($options);
|
||||
list($resp, $options) = static::_staticRequest($method, $url, $params, $opts);
|
||||
$this->setLastResponse($resp);
|
||||
|
||||
|
|
@ -46,24 +46,24 @@ trait Request
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
|
||||
* @param array $params list of parameters for the request
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
|
||||
* @param array $params list of parameters for the request
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null)
|
||||
protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null) : void
|
||||
{
|
||||
$opts = $this->_opts->merge($options);
|
||||
static::_staticStreamingRequest($method, $url, $readBodyChunk, $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param array $params list of parameters for the request
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param array $params list of parameters for the request
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -72,9 +72,9 @@ trait Request
|
|||
*/
|
||||
protected static function _staticRequest($method, $url, $params, $options)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($options);
|
||||
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
|
||||
$requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
|
||||
$opts = \Stripe\Util\RequestOptions::parse($options);
|
||||
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
|
||||
$requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
|
||||
list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers);
|
||||
$opts->discardNonPersistentHeaders();
|
||||
|
||||
|
|
@ -82,18 +82,18 @@ trait Request
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
|
||||
* @param array $params list of parameters for the request
|
||||
* @param string $method HTTP method ('get', 'post', etc.)
|
||||
* @param string $url URL for the request
|
||||
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
|
||||
* @param array $params list of parameters for the request
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options)
|
||||
protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options) : void
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($options);
|
||||
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
|
||||
$opts = \Stripe\Util\RequestOptions::parse($options);
|
||||
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
|
||||
$requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
|
||||
$requestor->requestStream($method, $url, $readBodyChunk, $params, $opts->headers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -11,8 +11,8 @@ namespace Stripe\ApiOperations;
|
|||
trait Retrieve
|
||||
{
|
||||
/**
|
||||
* @param array|string $id the ID of the API resource to retrieve,
|
||||
* or an options array containing an `id` key
|
||||
* @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
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -21,7 +21,7 @@ trait Retrieve
|
|||
*/
|
||||
public static function retrieve($id, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$instance = new static($id, $opts);
|
||||
$instance->refresh();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -10,8 +10,8 @@ namespace Stripe\ApiOperations;
|
|||
trait Search
|
||||
{
|
||||
/**
|
||||
* @param string $searchUrl
|
||||
* @param null|array $params
|
||||
* @param string $searchUrl
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -23,7 +23,7 @@ trait Search
|
|||
self::_validateParams($params);
|
||||
|
||||
list($response, $opts) = static::_staticRequest('get', $searchUrl, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
if (!($obj instanceof \Stripe\SearchResult)) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -11,8 +11,8 @@ namespace Stripe\ApiOperations;
|
|||
trait SingletonRetrieve
|
||||
{
|
||||
/**
|
||||
* @param array|string $id the ID of the API resource to retrieve,
|
||||
* or an options array containing an `id` key
|
||||
* @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
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -21,7 +21,7 @@ trait SingletonRetrieve
|
|||
*/
|
||||
public static function retrieve($opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$instance = new static(null, $opts);
|
||||
$instance->refresh();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
|
|
@ -11,8 +11,8 @@ namespace Stripe\ApiOperations;
|
|||
trait Update
|
||||
{
|
||||
/**
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -25,7 +25,7 @@ trait Update
|
|||
$url = static::resourceUrl($id);
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
|
@ -46,7 +46,7 @@ trait Update
|
|||
{
|
||||
$params = $this->serializeParameters();
|
||||
if (\count($params) > 0) {
|
||||
$url = $this->instanceUrl();
|
||||
$url = $this->instanceUrl();
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -21,6 +21,7 @@ class ApiRequestor
|
|||
* @var HttpClient\ClientInterface
|
||||
*/
|
||||
private static $_httpClient;
|
||||
|
||||
/**
|
||||
* @var HttpClient\StreamingClientInterface
|
||||
*/
|
||||
|
|
@ -61,13 +62,13 @@ class ApiRequestor
|
|||
{
|
||||
$payload = [
|
||||
'last_request_metrics' => [
|
||||
'request_id' => $requestTelemetry->requestId,
|
||||
'request_id' => $requestTelemetry->requestId,
|
||||
'request_duration_ms' => $requestTelemetry->requestDuration,
|
||||
],
|
||||
];
|
||||
|
||||
$result = \json_encode($payload);
|
||||
if (false !== $result) {
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
}
|
||||
Stripe::getLogger()->error('Serializing telemetry payload failed!');
|
||||
|
|
@ -87,10 +88,10 @@ class ApiRequestor
|
|||
if ($d instanceof ApiResource) {
|
||||
return Util\Util::utf8($d->id);
|
||||
}
|
||||
if (true === $d) {
|
||||
if ($d === true) {
|
||||
return 'true';
|
||||
}
|
||||
if (false === $d) {
|
||||
if ($d === false) {
|
||||
return 'false';
|
||||
}
|
||||
if (\is_array($d)) {
|
||||
|
|
@ -117,12 +118,11 @@ class ApiRequestor
|
|||
*/
|
||||
public function request($method, $url, $params = null, $headers = null)
|
||||
{
|
||||
$params = $params ?: [];
|
||||
$headers = $headers ?: [];
|
||||
list($rbody, $rcode, $rheaders, $myApiKey) =
|
||||
$this->_requestRaw($method, $url, $params, $headers);
|
||||
$json = $this->_interpretResponse($rbody, $rcode, $rheaders);
|
||||
$resp = new ApiResponse($rbody, $rcode, $rheaders, $json);
|
||||
$params = $params ?: [];
|
||||
$headers = $headers ?: [];
|
||||
list($rbody, $rcode, $rheaders, $myApiKey) = $this->_requestRaw($method, $url, $params, $headers);
|
||||
$json = $this->_interpretResponse($rbody, $rcode, $rheaders);
|
||||
$resp = new ApiResponse($rbody, $rcode, $rheaders, $json);
|
||||
|
||||
return [$resp, $myApiKey];
|
||||
}
|
||||
|
|
@ -130,33 +130,32 @@ class ApiRequestor
|
|||
/**
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param callable $readBodyChunkCallable
|
||||
* @param callable $readBodyChunkCallable
|
||||
* @param null|array $params
|
||||
* @param null|array $headers
|
||||
*
|
||||
* @throws Exception\ApiErrorException
|
||||
*/
|
||||
public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null)
|
||||
public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null) : void
|
||||
{
|
||||
$params = $params ?: [];
|
||||
$headers = $headers ?: [];
|
||||
list($rbody, $rcode, $rheaders, $myApiKey) =
|
||||
$this->_requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable);
|
||||
$params = $params ?: [];
|
||||
$headers = $headers ?: [];
|
||||
list($rbody, $rcode, $rheaders, $myApiKey) = $this->_requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable);
|
||||
if ($rcode >= 300) {
|
||||
$this->_interpretResponse($rbody, $rcode, $rheaders);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $rbody a JSON string
|
||||
* @param int $rcode
|
||||
* @param array $rheaders
|
||||
* @param array $resp
|
||||
* @param string $rbody a JSON string
|
||||
* @param int $rcode
|
||||
* @param array $rheaders
|
||||
* @param array $resp
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException
|
||||
* @throws Exception\ApiErrorException
|
||||
*/
|
||||
public function handleErrorResponse($rbody, $rcode, $rheaders, $resp)
|
||||
public function handleErrorResponse($rbody, $rcode, $rheaders, $resp) : void
|
||||
{
|
||||
if (!\is_array($resp) || !isset($resp['error'])) {
|
||||
$msg = "Invalid response object from API: {$rbody} "
|
||||
|
|
@ -191,39 +190,34 @@ class ApiRequestor
|
|||
*/
|
||||
private static function _specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData)
|
||||
{
|
||||
$msg = isset($errorData['message']) ? $errorData['message'] : null;
|
||||
$param = isset($errorData['param']) ? $errorData['param'] : null;
|
||||
$code = isset($errorData['code']) ? $errorData['code'] : null;
|
||||
$type = isset($errorData['type']) ? $errorData['type'] : null;
|
||||
$msg = isset($errorData['message']) ? $errorData['message'] : null;
|
||||
$param = isset($errorData['param']) ? $errorData['param'] : null;
|
||||
$code = isset($errorData['code']) ? $errorData['code'] : null;
|
||||
$type = isset($errorData['type']) ? $errorData['type'] : null;
|
||||
$declineCode = isset($errorData['decline_code']) ? $errorData['decline_code'] : null;
|
||||
|
||||
switch ($rcode) {
|
||||
case 400:
|
||||
// 'rate_limit' code is deprecated, but left here for backwards compatibility
|
||||
// for API versions earlier than 2015-09-08
|
||||
if ('rate_limit' === $code) {
|
||||
if ($code === 'rate_limit') {
|
||||
return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
|
||||
}
|
||||
if ('idempotency_error' === $type) {
|
||||
if ($type === 'idempotency_error') {
|
||||
return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
|
||||
}
|
||||
|
||||
// no break
|
||||
case 404:
|
||||
return Exception\InvalidRequestException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
|
||||
|
||||
case 401:
|
||||
return Exception\AuthenticationException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
|
||||
|
||||
case 402:
|
||||
return Exception\CardException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $declineCode, $param);
|
||||
|
||||
case 403:
|
||||
return Exception\PermissionException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
|
||||
|
||||
case 429:
|
||||
return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
|
||||
|
||||
default:
|
||||
return Exception\UnknownApiErrorException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
|
||||
}
|
||||
|
|
@ -247,22 +241,16 @@ class ApiRequestor
|
|||
switch ($errorCode) {
|
||||
case 'invalid_client':
|
||||
return Exception\OAuth\InvalidClientException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
case 'invalid_grant':
|
||||
return Exception\OAuth\InvalidGrantException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
case 'invalid_request':
|
||||
return Exception\OAuth\InvalidRequestException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
case 'invalid_scope':
|
||||
return Exception\OAuth\InvalidScopeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
case 'unsupported_grant_type':
|
||||
return Exception\OAuth\UnsupportedGrantTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
case 'unsupported_response_type':
|
||||
return Exception\OAuth\UnsupportedResponseTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
|
||||
default:
|
||||
return Exception\OAuth\UnknownOAuthErrorException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
|
||||
}
|
||||
|
|
@ -277,12 +265,12 @@ class ApiRequestor
|
|||
*/
|
||||
private static function _formatAppInfo($appInfo)
|
||||
{
|
||||
if (null !== $appInfo) {
|
||||
if ($appInfo !== null) {
|
||||
$string = $appInfo['name'];
|
||||
if (null !== $appInfo['version']) {
|
||||
if ($appInfo['version'] !== null) {
|
||||
$string .= '/' . $appInfo['version'];
|
||||
}
|
||||
if (null !== $appInfo['url']) {
|
||||
if ($appInfo['url'] !== null) {
|
||||
$string .= ' (' . $appInfo['url'] . ')';
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +284,7 @@ class ApiRequestor
|
|||
* @static
|
||||
*
|
||||
* @param string $disableFunctionsOutput - String value of the 'disable_function' setting, as output by \ini_get('disable_functions')
|
||||
* @param string $functionName - Name of the function we are interesting in seeing whether or not it is disabled
|
||||
* @param string $functionName - Name of the function we are interesting in seeing whether or not it is disabled
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -324,30 +312,30 @@ class ApiRequestor
|
|||
{
|
||||
$uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION;
|
||||
|
||||
$langVersion = \PHP_VERSION;
|
||||
$langVersion = \PHP_VERSION;
|
||||
$uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname');
|
||||
$uname = $uname_disabled ? '(disabled)' : \php_uname();
|
||||
$uname = $uname_disabled ? '(disabled)' : \php_uname();
|
||||
|
||||
$appInfo = Stripe::getAppInfo();
|
||||
$ua = [
|
||||
$ua = [
|
||||
'bindings_version' => Stripe::VERSION,
|
||||
'lang' => 'php',
|
||||
'lang_version' => $langVersion,
|
||||
'publisher' => 'stripe',
|
||||
'uname' => $uname,
|
||||
'lang' => 'php',
|
||||
'lang_version' => $langVersion,
|
||||
'publisher' => 'stripe',
|
||||
'uname' => $uname,
|
||||
];
|
||||
if ($clientInfo) {
|
||||
$ua = \array_merge($clientInfo, $ua);
|
||||
}
|
||||
if (null !== $appInfo) {
|
||||
if ($appInfo !== null) {
|
||||
$uaString .= ' ' . self::_formatAppInfo($appInfo);
|
||||
$ua['application'] = $appInfo;
|
||||
}
|
||||
|
||||
return [
|
||||
'X-Stripe-Client-User-Agent' => \json_encode($ua),
|
||||
'User-Agent' => $uaString,
|
||||
'Authorization' => 'Bearer ' . $apiKey,
|
||||
'User-Agent' => $uaString,
|
||||
'Authorization' => 'Bearer ' . $apiKey,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -390,8 +378,8 @@ class ApiRequestor
|
|||
}
|
||||
}
|
||||
|
||||
$absUrl = $this->_apiBase . $url;
|
||||
$params = self::_encodeObjects($params);
|
||||
$absUrl = $this->_apiBase . $url;
|
||||
$params = self::_encodeObjects($params);
|
||||
$defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo);
|
||||
if (Stripe::$apiVersion) {
|
||||
$defaultHeaders['Stripe-Version'] = Stripe::$apiVersion;
|
||||
|
|
@ -401,14 +389,14 @@ class ApiRequestor
|
|||
$defaultHeaders['Stripe-Account'] = Stripe::$accountId;
|
||||
}
|
||||
|
||||
if (Stripe::$enableTelemetry && null !== self::$requestTelemetry) {
|
||||
if (Stripe::$enableTelemetry && self::$requestTelemetry !== null) {
|
||||
$defaultHeaders['X-Stripe-Client-Telemetry'] = self::_telemetryJson(self::$requestTelemetry);
|
||||
}
|
||||
|
||||
$hasFile = false;
|
||||
foreach ($params as $k => $v) {
|
||||
if (\is_resource($v)) {
|
||||
$hasFile = true;
|
||||
$hasFile = true;
|
||||
$params[$k] = self::_processResourceParam($v);
|
||||
} elseif ($v instanceof \CURLFile) {
|
||||
$hasFile = true;
|
||||
|
|
@ -422,7 +410,7 @@ class ApiRequestor
|
|||
}
|
||||
|
||||
$combinedHeaders = \array_merge($defaultHeaders, $headers);
|
||||
$rawHeaders = [];
|
||||
$rawHeaders = [];
|
||||
|
||||
foreach ($combinedHeaders as $header => $value) {
|
||||
$rawHeaders[] = $header . ': ' . $value;
|
||||
|
|
@ -434,8 +422,8 @@ class ApiRequestor
|
|||
/**
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param array $params
|
||||
* @param array $headers
|
||||
* @param array $params
|
||||
* @param array $headers
|
||||
*
|
||||
* @throws Exception\AuthenticationException
|
||||
* @throws Exception\ApiConnectionException
|
||||
|
|
@ -458,7 +446,7 @@ class ApiRequestor
|
|||
|
||||
if (isset($rheaders['request-id'])
|
||||
&& \is_string($rheaders['request-id'])
|
||||
&& '' !== $rheaders['request-id']) {
|
||||
&& $rheaders['request-id'] !== '') {
|
||||
self::$requestTelemetry = new RequestTelemetry(
|
||||
$rheaders['request-id'],
|
||||
Util\Util::currentTimeMillis() - $requestStartMs
|
||||
|
|
@ -469,10 +457,10 @@ class ApiRequestor
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param array $params
|
||||
* @param array $headers
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
* @param array $params
|
||||
* @param array $headers
|
||||
* @param callable $readBodyChunkCallable
|
||||
*
|
||||
* @throws Exception\AuthenticationException
|
||||
|
|
@ -497,7 +485,7 @@ class ApiRequestor
|
|||
|
||||
if (isset($rheaders['request-id'])
|
||||
&& \is_string($rheaders['request-id'])
|
||||
&& '' !== $rheaders['request-id']) {
|
||||
&& $rheaders['request-id'] !== '') {
|
||||
self::$requestTelemetry = new RequestTelemetry(
|
||||
$rheaders['request-id'],
|
||||
Util\Util::currentTimeMillis() - $requestStartMs
|
||||
|
|
@ -516,14 +504,14 @@ class ApiRequestor
|
|||
*/
|
||||
private function _processResourceParam($resource)
|
||||
{
|
||||
if ('stream' !== \get_resource_type($resource)) {
|
||||
if (\get_resource_type($resource) !== 'stream') {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Attempted to upload a resource that is not a stream'
|
||||
);
|
||||
}
|
||||
|
||||
$metaData = \stream_get_meta_data($resource);
|
||||
if ('plainfile' !== $metaData['wrapper_type']) {
|
||||
if ($metaData['wrapper_type'] !== 'plainfile') {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Only plainfile resource streams are supported'
|
||||
);
|
||||
|
|
@ -545,9 +533,9 @@ class ApiRequestor
|
|||
*/
|
||||
private function _interpretResponse($rbody, $rcode, $rheaders)
|
||||
{
|
||||
$resp = \json_decode($rbody, true);
|
||||
$resp = \json_decode($rbody, true);
|
||||
$jsonError = \json_last_error();
|
||||
if (null === $resp && \JSON_ERROR_NONE !== $jsonError) {
|
||||
if ($resp === null && $jsonError !== \JSON_ERROR_NONE) {
|
||||
$msg = "Invalid response body from API: {$rbody} "
|
||||
. "(HTTP response code was {$rcode}, json_last_error() was {$jsonError})";
|
||||
|
||||
|
|
@ -566,7 +554,7 @@ class ApiRequestor
|
|||
*
|
||||
* @param HttpClient\ClientInterface $client
|
||||
*/
|
||||
public static function setHttpClient($client)
|
||||
public static function setHttpClient($client) : void
|
||||
{
|
||||
self::$_httpClient = $client;
|
||||
}
|
||||
|
|
@ -576,7 +564,7 @@ class ApiRequestor
|
|||
*
|
||||
* @param HttpClient\StreamingClientInterface $client
|
||||
*/
|
||||
public static function setStreamingHttpClient($client)
|
||||
public static function setStreamingHttpClient($client) : void
|
||||
{
|
||||
self::$_streamingHttpClient = $client;
|
||||
}
|
||||
|
|
@ -586,7 +574,7 @@ class ApiRequestor
|
|||
*
|
||||
* Resets any stateful telemetry data
|
||||
*/
|
||||
public static function resetTelemetry()
|
||||
public static function resetTelemetry() : void
|
||||
{
|
||||
self::$requestTelemetry = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -11,15 +11,15 @@ abstract class ApiResource extends StripeObject
|
|||
|
||||
/**
|
||||
* @return \Stripe\Util\Set A list of fields that can be their own type of
|
||||
* API resource (say a nested card under an account for example), and if
|
||||
* that resource is set, it should be transmitted to the API on a create or
|
||||
* update. Doing so is not the default behavior because API resources
|
||||
* should normally be persisted on their own RESTful endpoints.
|
||||
* API resource (say a nested card under an account for example), and if
|
||||
* that resource is set, it should be transmitted to the API on a create or
|
||||
* update. Doing so is not the default behavior because API resources
|
||||
* should normally be persisted on their own RESTful endpoints.
|
||||
*/
|
||||
public static function getSavedNestedResources()
|
||||
{
|
||||
static $savedNestedResources = null;
|
||||
if (null === $savedNestedResources) {
|
||||
if ($savedNestedResources === null) {
|
||||
$savedNestedResources = new Util\Set();
|
||||
}
|
||||
|
||||
|
|
@ -28,19 +28,19 @@ abstract class ApiResource extends StripeObject
|
|||
|
||||
/**
|
||||
* @var bool A flag that can be set a behavior that will cause this
|
||||
* resource to be encoded and sent up along with an update of its parent
|
||||
* resource. This is usually not desirable because resources are updated
|
||||
* individually on their own endpoints, but there are certain cases,
|
||||
* replacing a customer's source for example, where this is allowed.
|
||||
* resource to be encoded and sent up along with an update of its parent
|
||||
* resource. This is usually not desirable because resources are updated
|
||||
* individually on their own endpoints, but there are certain cases,
|
||||
* replacing a customer's source for example, where this is allowed.
|
||||
*/
|
||||
public $saveWithParent = false;
|
||||
|
||||
public function __set($k, $v)
|
||||
public function __set($k, $v) : void
|
||||
{
|
||||
parent::__set($k, $v);
|
||||
$v = $this->{$k};
|
||||
if ((static::getSavedNestedResources()->includes($k))
|
||||
&& ($v instanceof ApiResource)) {
|
||||
&& ($v instanceof self)) {
|
||||
$v->saveWithParent = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ abstract class ApiResource extends StripeObject
|
|||
public function refresh()
|
||||
{
|
||||
$requestor = new ApiRequestor($this->_opts->apiKey, static::baseUrl());
|
||||
$url = $this->instanceUrl();
|
||||
$url = $this->instanceUrl();
|
||||
|
||||
list($response, $this->_opts->apiKey) = $requestor->request(
|
||||
'get',
|
||||
|
|
@ -98,14 +98,14 @@ abstract class ApiResource extends StripeObject
|
|||
*/
|
||||
public static function resourceUrl($id)
|
||||
{
|
||||
if (null === $id) {
|
||||
$class = static::class;
|
||||
if ($id === null) {
|
||||
$class = static::class;
|
||||
$message = 'Could not determine which URL to request: '
|
||||
. "{$class} instance has invalid ID: {$id}";
|
||||
|
||||
throw new Exception\UnexpectedValueException($message);
|
||||
}
|
||||
$id = Util\Util::utf8($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$base = static::classUrl();
|
||||
$extn = \urlencode($id);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -30,16 +30,16 @@ class ApiResponse
|
|||
public $code;
|
||||
|
||||
/**
|
||||
* @param string $body
|
||||
* @param int $code
|
||||
* @param string $body
|
||||
* @param int $code
|
||||
* @param null|array|CaseInsensitiveArray $headers
|
||||
* @param null|array $json
|
||||
* @param null|array $json
|
||||
*/
|
||||
public function __construct($body, $code, $headers, $json)
|
||||
{
|
||||
$this->body = $body;
|
||||
$this->code = $code;
|
||||
$this->body = $body;
|
||||
$this->code = $code;
|
||||
$this->headers = $headers;
|
||||
$this->json = $json;
|
||||
$this->json = $json;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $domain_name
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
*/
|
||||
class ApplePayDomain extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'apple_pay_domain';
|
||||
public const OBJECT_NAME = 'apple_pay_domain';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -22,7 +22,7 @@ class ApplePayDomain extends ApiResource
|
|||
|
||||
/**
|
||||
* @return string The class URL for this resource. It needs to be special
|
||||
* cased because it doesn't fit into the standard resource pattern.
|
||||
* cased because it doesn't fit into the standard resource pattern.
|
||||
*/
|
||||
public static function classUrl()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,38 +1,38 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string|\Stripe\Account $account ID of the Stripe account this fee was taken from.
|
||||
* @property int $amount Amount earned, in %s.
|
||||
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)
|
||||
* @property string|\Stripe\StripeObject $application ID of the Connect application that earned the fee.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
|
||||
* @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the <code>destination</code> parameter.
|
||||
* @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
|
||||
* @property \Stripe\Collection<\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string|\Stripe\Account $account ID of the Stripe account this fee was taken from.
|
||||
* @property int $amount Amount earned, in %s.
|
||||
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)
|
||||
* @property string|\Stripe\StripeObject $application ID of the Connect application that earned the fee.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
|
||||
* @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the <code>destination</code> parameter.
|
||||
* @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
|
||||
* @property \Stripe\Collection<\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee.
|
||||
*/
|
||||
class ApplicationFee extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'application_fee';
|
||||
public const OBJECT_NAME = 'application_fee';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\NestedResource;
|
||||
use ApiOperations\Retrieve;
|
||||
|
||||
const PATH_REFUNDS = '/refunds';
|
||||
public const PATH_REFUNDS = '/refunds';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the application fee on which to retrieve the fee refunds
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the application fee on which to retrieve the fee refunds
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -45,8 +45,8 @@ class ApplicationFee extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the application fee on which to create the fee refund
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the application fee on which to create the fee refund
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -59,9 +59,9 @@ class ApplicationFee extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the application fee to which the fee refund belongs
|
||||
* @param string $refundId the ID of the fee refund to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the application fee to which the fee refund belongs
|
||||
* @param string $refundId the ID of the fee refund to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -74,9 +74,9 @@ class ApplicationFee extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the application fee to which the fee refund belongs
|
||||
* @param string $refundId the ID of the fee refund to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the application fee to which the fee refund belongs
|
||||
* @param string $refundId the ID of the fee refund to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,18 +13,18 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding
|
||||
* Application Fees</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount, in %s.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount, in %s.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
class ApplicationFeeRefund extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'fee_refund';
|
||||
public const OBJECT_NAME = 'fee_refund';
|
||||
|
||||
use ApiOperations\Update {
|
||||
save as protected _save;
|
||||
|
|
@ -35,7 +35,7 @@ class ApplicationFeeRefund extends ApiResource
|
|||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
$id = $this['id'];
|
||||
$id = $this['id'];
|
||||
$fee = $this['fee'];
|
||||
if (!$id) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
|
|
@ -44,12 +44,12 @@ class ApplicationFeeRefund extends ApiResource
|
|||
null
|
||||
);
|
||||
}
|
||||
$id = Util\Util::utf8($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$fee = Util\Util::utf8($fee);
|
||||
|
||||
$base = ApplicationFee::classUrl();
|
||||
$base = ApplicationFee::classUrl();
|
||||
$feeExtn = \urlencode($fee);
|
||||
$extn = \urlencode($id);
|
||||
$extn = \urlencode($id);
|
||||
|
||||
return "{$base}/{$feeExtn}/refunds/{$extn}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -25,24 +25,24 @@ namespace Stripe\Apps;
|
|||
* href="https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects">Store
|
||||
* data between page reloads</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $name A name for the secret that's unique within the scope.
|
||||
* @property null|string $payload The plaintext secret value to be stored.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $name A name for the secret that's unique within the scope.
|
||||
* @property null|string $payload The plaintext secret value to be stored.
|
||||
* @property \Stripe\StripeObject $scope
|
||||
*/
|
||||
class Secret extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'apps.secret';
|
||||
public const OBJECT_NAME = 'apps.secret';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -51,16 +51,16 @@ class Secret extends \Stripe\ApiResource
|
|||
*/
|
||||
public static function deleteWhere($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/delete';
|
||||
$url = static::classUrl() . '/delete';
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -69,9 +69,9 @@ class Secret extends \Stripe\ApiResource
|
|||
*/
|
||||
public static function find($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/find';
|
||||
$url = static::classUrl() . '/find';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -19,17 +19,17 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/account-balances">Understanding Connect
|
||||
* Account Balances</a>.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. The available balance for each currency and payment type can be found in the <code>source_types</code> property.
|
||||
* @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the <code>source_types</code> property.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. The available balance for each currency and payment type can be found in the <code>source_types</code> property.
|
||||
* @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the <code>source_types</code> property.
|
||||
* @property \Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
|
||||
* @property \Stripe\StripeObject $issuing
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
|
||||
* @property \Stripe\StripeObject $issuing
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
|
||||
*/
|
||||
class Balance extends SingletonApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'balance';
|
||||
public const OBJECT_NAME = 'balance';
|
||||
|
||||
use ApiOperations\SingletonRetrieve;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,59 +13,90 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/reports/balance-transaction-types">Balance
|
||||
* Transaction Types</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Gross amount of the transaction, in %s.
|
||||
* @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the <code>amount</code> in currency A, times <code>exchange_rate</code>, would be the <code>amount</code> in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's <code>amount</code> would be <code>1000</code> and <code>currency</code> would be <code>eur</code>. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's <code>amount</code> would be <code>1234</code>, <code>currency</code> would be <code>usd</code>, and <code>exchange_rate</code> would be <code>1.234</code>.
|
||||
* @property int $fee Fees (in %s) paid for this transaction.
|
||||
* @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
|
||||
* @property int $net Net amount of the transaction, in %s.
|
||||
* @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> about how reporting categories can help you understand balance transactions from an accounting perspective.
|
||||
* @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related.
|
||||
* @property string $status If the transaction's net funds are available in the Stripe balance yet. Either <code>available</code> or <code>pending</code>.
|
||||
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Gross amount of the transaction, in %s.
|
||||
* @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the <code>amount</code> in currency A, times <code>exchange_rate</code>, would be the <code>amount</code> in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's <code>amount</code> would be <code>1000</code> and <code>currency</code> would be <code>eur</code>. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's <code>amount</code> would be <code>1234</code>, <code>currency</code> would be <code>usd</code>, and <code>exchange_rate</code> would be <code>1.234</code>.
|
||||
* @property int $fee Fees (in %s) paid for this transaction.
|
||||
* @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
|
||||
* @property int $net Net amount of the transaction, in %s.
|
||||
* @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> about how reporting categories can help you understand balance transactions from an accounting perspective.
|
||||
* @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related.
|
||||
* @property string $status If the transaction's net funds are available in the Stripe balance yet. Either <code>available</code> or <code>pending</code>.
|
||||
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
|
||||
*/
|
||||
class BalanceTransaction extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'balance_transaction';
|
||||
public const OBJECT_NAME = 'balance_transaction';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
||||
const TYPE_ADJUSTMENT = 'adjustment';
|
||||
const TYPE_ADVANCE = 'advance';
|
||||
const TYPE_ADVANCE_FUNDING = 'advance_funding';
|
||||
const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
|
||||
const TYPE_APPLICATION_FEE = 'application_fee';
|
||||
const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
|
||||
const TYPE_CHARGE = 'charge';
|
||||
const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
|
||||
const TYPE_CONTRIBUTION = 'contribution';
|
||||
const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
|
||||
const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
|
||||
const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
|
||||
const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
|
||||
const TYPE_PAYMENT = 'payment';
|
||||
const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
|
||||
const TYPE_PAYMENT_REFUND = 'payment_refund';
|
||||
const TYPE_PAYOUT = 'payout';
|
||||
const TYPE_PAYOUT_CANCEL = 'payout_cancel';
|
||||
const TYPE_PAYOUT_FAILURE = 'payout_failure';
|
||||
const TYPE_REFUND = 'refund';
|
||||
const TYPE_REFUND_FAILURE = 'refund_failure';
|
||||
const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
|
||||
const TYPE_RESERVED_FUNDS = 'reserved_funds';
|
||||
const TYPE_STRIPE_FEE = 'stripe_fee';
|
||||
const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
|
||||
const TYPE_TAX_FEE = 'tax_fee';
|
||||
const TYPE_TOPUP = 'topup';
|
||||
const TYPE_TOPUP_REVERSAL = 'topup_reversal';
|
||||
const TYPE_TRANSFER = 'transfer';
|
||||
const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
|
||||
const TYPE_TRANSFER_FAILURE = 'transfer_failure';
|
||||
const TYPE_TRANSFER_REFUND = 'transfer_refund';
|
||||
public const TYPE_ADJUSTMENT = 'adjustment';
|
||||
|
||||
public const TYPE_ADVANCE = 'advance';
|
||||
|
||||
public const TYPE_ADVANCE_FUNDING = 'advance_funding';
|
||||
|
||||
public const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
|
||||
|
||||
public const TYPE_APPLICATION_FEE = 'application_fee';
|
||||
|
||||
public const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
|
||||
|
||||
public const TYPE_CHARGE = 'charge';
|
||||
|
||||
public const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
|
||||
|
||||
public const TYPE_CONTRIBUTION = 'contribution';
|
||||
|
||||
public const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
|
||||
|
||||
public const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
|
||||
|
||||
public const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
|
||||
|
||||
public const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
|
||||
|
||||
public const TYPE_PAYMENT = 'payment';
|
||||
|
||||
public const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
|
||||
|
||||
public const TYPE_PAYMENT_REFUND = 'payment_refund';
|
||||
|
||||
public const TYPE_PAYOUT = 'payout';
|
||||
|
||||
public const TYPE_PAYOUT_CANCEL = 'payout_cancel';
|
||||
|
||||
public const TYPE_PAYOUT_FAILURE = 'payout_failure';
|
||||
|
||||
public const TYPE_REFUND = 'refund';
|
||||
|
||||
public const TYPE_REFUND_FAILURE = 'refund_failure';
|
||||
|
||||
public const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
|
||||
|
||||
public const TYPE_RESERVED_FUNDS = 'reserved_funds';
|
||||
|
||||
public const TYPE_STRIPE_FEE = 'stripe_fee';
|
||||
|
||||
public const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
|
||||
|
||||
public const TYPE_TAX_FEE = 'tax_fee';
|
||||
|
||||
public const TYPE_TOPUP = 'topup';
|
||||
|
||||
public const TYPE_TOPUP_REVERSAL = 'topup_reversal';
|
||||
|
||||
public const TYPE_TRANSFER = 'transfer';
|
||||
|
||||
public const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
|
||||
|
||||
public const TYPE_TRANSFER_FAILURE = 'transfer_failure';
|
||||
|
||||
public const TYPE_TRANSFER_REFUND = 'transfer_refund';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -18,27 +18,27 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/payments/bank-debits-transfers">Bank Debits and
|
||||
* Transfers</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string|\Stripe\Account $account The ID of the account that the bank account is associated with.
|
||||
* @property null|string $account_holder_name The name of the person or business that owns the bank account.
|
||||
* @property null|string $account_holder_type The type of entity that holds the account. This can be either <code>individual</code> or <code>company</code>.
|
||||
* @property null|string $account_type The bank account type. This can only be <code>checking</code> or <code>savings</code> in most countries. In Japan, this can only be <code>futsu</code> or <code>toza</code>.
|
||||
* @property null|string[] $available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the <code>method</code> when creating a payout.
|
||||
* @property null|string $bank_name Name of the bank associated with the routing number (e.g., <code>WELLS FARGO</code>).
|
||||
* @property string $country Two-letter ISO code representing the country the bank account is located in.
|
||||
* @property string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for the currency</a> paid out to the bank account.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with.
|
||||
* @property null|bool $default_for_currency Whether this bank account is the default external account for its currency.
|
||||
* @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
|
||||
* @property string $last4 The last four digits of the bank account number.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $routing_number The routing transit number for the bank account.
|
||||
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a transfer sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send transfers until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code> and <code>errored</code>. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.</p>
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string|\Stripe\Account $account The ID of the account that the bank account is associated with.
|
||||
* @property null|string $account_holder_name The name of the person or business that owns the bank account.
|
||||
* @property null|string $account_holder_type The type of entity that holds the account. This can be either <code>individual</code> or <code>company</code>.
|
||||
* @property null|string $account_type The bank account type. This can only be <code>checking</code> or <code>savings</code> in most countries. In Japan, this can only be <code>futsu</code> or <code>toza</code>.
|
||||
* @property null|string[] $available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the <code>method</code> when creating a payout.
|
||||
* @property null|string $bank_name Name of the bank associated with the routing number (e.g., <code>WELLS FARGO</code>).
|
||||
* @property string $country Two-letter ISO code representing the country the bank account is located in.
|
||||
* @property string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for the currency</a> paid out to the bank account.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with.
|
||||
* @property null|bool $default_for_currency Whether this bank account is the default external account for its currency.
|
||||
* @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
|
||||
* @property string $last4 The last four digits of the bank account number.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $routing_number The routing transit number for the bank account.
|
||||
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a transfer sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send transfers until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code> and <code>errored</code>. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.</p>
|
||||
*/
|
||||
class BankAccount extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'bank_account';
|
||||
public const OBJECT_NAME = 'bank_account';
|
||||
|
||||
use ApiOperations\Delete;
|
||||
use ApiOperations\Update;
|
||||
|
|
@ -48,44 +48,48 @@ class BankAccount extends ApiResource
|
|||
*
|
||||
* @see https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status
|
||||
*/
|
||||
const STATUS_NEW = 'new';
|
||||
const STATUS_VALIDATED = 'validated';
|
||||
const STATUS_VERIFIED = 'verified';
|
||||
const STATUS_VERIFICATION_FAILED = 'verification_failed';
|
||||
const STATUS_ERRORED = 'errored';
|
||||
public const STATUS_NEW = 'new';
|
||||
|
||||
public const STATUS_VALIDATED = 'validated';
|
||||
|
||||
public const STATUS_VERIFIED = 'verified';
|
||||
|
||||
public const STATUS_VERIFICATION_FAILED = 'verification_failed';
|
||||
|
||||
public const STATUS_ERRORED = 'errored';
|
||||
|
||||
/**
|
||||
* @return string The instance URL for this resource. It needs to be special
|
||||
* cased because it doesn't fit into the standard resource pattern.
|
||||
* cased because it doesn't fit into the standard resource pattern.
|
||||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
if ($this['customer']) {
|
||||
$base = Customer::classUrl();
|
||||
$base = Customer::classUrl();
|
||||
$parent = $this['customer'];
|
||||
$path = 'sources';
|
||||
$path = 'sources';
|
||||
} elseif ($this['account']) {
|
||||
$base = Account::classUrl();
|
||||
$base = Account::classUrl();
|
||||
$parent = $this['account'];
|
||||
$path = 'external_accounts';
|
||||
$path = 'external_accounts';
|
||||
} else {
|
||||
$msg = 'Bank accounts cannot be accessed without a customer ID or account ID.';
|
||||
|
||||
throw new Exception\UnexpectedValueException($msg, null);
|
||||
}
|
||||
$parentExtn = \urlencode(Util\Util::utf8($parent));
|
||||
$extn = \urlencode(Util\Util::utf8($this['id']));
|
||||
$extn = \urlencode(Util\Util::utf8($this['id']));
|
||||
|
||||
return "{$base}/{$parentExtn}/{$path}/{$extn}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Bank accounts cannot be retrieved without a customer ID or ' .
|
||||
'an account ID. Retrieve a bank account using ' .
|
||||
|
|
@ -97,13 +101,13 @@ class BankAccount extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Bank accounts cannot be updated without a customer ID or an ' .
|
||||
'account ID. Update a bank account using ' .
|
||||
|
|
@ -115,7 +119,7 @@ class BankAccount extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -124,7 +128,7 @@ class BankAccount extends ApiResource
|
|||
*/
|
||||
public function verify($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/verify';
|
||||
$url = $this->instanceUrl() . '/verify';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
class BaseStripeClient implements StripeClientInterface, StripeStreamingClientInterface
|
||||
{
|
||||
/** @var string default base URL for Stripe's API */
|
||||
const DEFAULT_API_BASE = 'https://api.stripe.com';
|
||||
public const DEFAULT_API_BASE = 'https://api.stripe.com';
|
||||
|
||||
/** @var string default base URL for Stripe's OAuth API */
|
||||
const DEFAULT_CONNECT_BASE = 'https://connect.stripe.com';
|
||||
public const DEFAULT_CONNECT_BASE = 'https://connect.stripe.com';
|
||||
|
||||
/** @var string default base URL for Stripe's Files API */
|
||||
const DEFAULT_FILES_BASE = 'https://files.stripe.com';
|
||||
public const DEFAULT_FILES_BASE = 'https://files.stripe.com';
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
private $config;
|
||||
|
|
@ -45,7 +45,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
* {@link DEFAULT_FILES_BASE}.
|
||||
*
|
||||
* @param array<string, mixed>|string $config the API key as a string, or an array containing
|
||||
* the client configuration settings
|
||||
* the client configuration settings
|
||||
*/
|
||||
public function __construct($config = [])
|
||||
{
|
||||
|
|
@ -119,18 +119,18 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
/**
|
||||
* Sends a request to Stripe's API.
|
||||
*
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
*
|
||||
* @return \Stripe\StripeObject the object returned by Stripe's API
|
||||
*/
|
||||
public function request($method, $path, $params, $opts)
|
||||
{
|
||||
$opts = $this->defaultOpts->merge($opts, true);
|
||||
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
||||
$requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
||||
$opts = $this->defaultOpts->merge($opts, true);
|
||||
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
||||
$requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
||||
list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers);
|
||||
$opts->discardNonPersistentHeaders();
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
|
|
@ -143,28 +143,28 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
* Sends a request to Stripe's API, passing chunks of the streamed response
|
||||
* into a user-provided $readBodyChunkCallable callback.
|
||||
*
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param callable $readBodyChunkCallable a function that will be called
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
* with chunks of bytes from the body if the request is successful
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param callable $readBodyChunkCallable a function that will be called
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
* with chunks of bytes from the body if the request is successful
|
||||
*/
|
||||
public function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
|
||||
public function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) : void
|
||||
{
|
||||
$opts = $this->defaultOpts->merge($opts, true);
|
||||
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
||||
$requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
||||
$opts = $this->defaultOpts->merge($opts, true);
|
||||
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
||||
$requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
||||
list($response, $opts->apiKey) = $requestor->requestStream($method, $path, $readBodyChunkCallable, $params, $opts->headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a request to Stripe's API.
|
||||
*
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
*
|
||||
* @return \Stripe\Collection of ApiResources
|
||||
*/
|
||||
|
|
@ -173,7 +173,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
$obj = $this->request($method, $path, $params, $opts);
|
||||
if (!($obj instanceof \Stripe\Collection)) {
|
||||
$received_class = \get_class($obj);
|
||||
$msg = "Expected to receive `Stripe\\Collection` object from Stripe API. Instead received `{$received_class}`.";
|
||||
$msg = "Expected to receive `Stripe\\Collection` object from Stripe API. Instead received `{$received_class}`.";
|
||||
|
||||
throw new \Stripe\Exception\UnexpectedValueException($msg);
|
||||
}
|
||||
|
|
@ -185,10 +185,10 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
/**
|
||||
* Sends a request to Stripe's API.
|
||||
*
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
* @param string $method the HTTP method
|
||||
* @param string $path the path of the request
|
||||
* @param array $params the parameters of the request
|
||||
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
||||
*
|
||||
* @return \Stripe\SearchResult of ApiResources
|
||||
*/
|
||||
|
|
@ -197,7 +197,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
$obj = $this->request($method, $path, $params, $opts);
|
||||
if (!($obj instanceof \Stripe\SearchResult)) {
|
||||
$received_class = \get_class($obj);
|
||||
$msg = "Expected to receive `Stripe\\SearchResult` object from Stripe API. Instead received `{$received_class}`.";
|
||||
$msg = "Expected to receive `Stripe\\SearchResult` object from Stripe API. Instead received `{$received_class}`.";
|
||||
|
||||
throw new \Stripe\Exception\UnexpectedValueException($msg);
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
{
|
||||
$apiKey = $opts->apiKey ?: $this->getApiKey();
|
||||
|
||||
if (null === $apiKey) {
|
||||
if ($apiKey === null) {
|
||||
$msg = 'No API key provided. Set your API key when constructing the '
|
||||
. 'StripeClient instance, or provide it on a per-request basis '
|
||||
. 'using the `api_key` key in the $opts argument.';
|
||||
|
|
@ -236,13 +236,13 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
private function getDefaultConfig()
|
||||
{
|
||||
return [
|
||||
'api_key' => null,
|
||||
'client_id' => null,
|
||||
'api_key' => null,
|
||||
'client_id' => null,
|
||||
'stripe_account' => null,
|
||||
'stripe_version' => null,
|
||||
'api_base' => self::DEFAULT_API_BASE,
|
||||
'connect_base' => self::DEFAULT_CONNECT_BASE,
|
||||
'files_base' => self::DEFAULT_FILES_BASE,
|
||||
'api_base' => self::DEFAULT_API_BASE,
|
||||
'connect_base' => self::DEFAULT_CONNECT_BASE,
|
||||
'files_base' => self::DEFAULT_FILES_BASE,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -251,37 +251,37 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
|||
*
|
||||
* @throws \Stripe\Exception\InvalidArgumentException
|
||||
*/
|
||||
private function validateConfig($config)
|
||||
private function validateConfig($config) : void
|
||||
{
|
||||
// api_key
|
||||
if (null !== $config['api_key'] && !\is_string($config['api_key'])) {
|
||||
if ($config['api_key'] !== null && !\is_string($config['api_key'])) {
|
||||
throw new \Stripe\Exception\InvalidArgumentException('api_key must be null or a string');
|
||||
}
|
||||
|
||||
if (null !== $config['api_key'] && ('' === $config['api_key'])) {
|
||||
if ($config['api_key'] !== null && ($config['api_key'] === '')) {
|
||||
$msg = 'api_key cannot be the empty string';
|
||||
|
||||
throw new \Stripe\Exception\InvalidArgumentException($msg);
|
||||
}
|
||||
|
||||
if (null !== $config['api_key'] && (\preg_match('/\s/', $config['api_key']))) {
|
||||
if ($config['api_key'] !== null && (\preg_match('/\s/', $config['api_key']))) {
|
||||
$msg = 'api_key cannot contain whitespace';
|
||||
|
||||
throw new \Stripe\Exception\InvalidArgumentException($msg);
|
||||
}
|
||||
|
||||
// client_id
|
||||
if (null !== $config['client_id'] && !\is_string($config['client_id'])) {
|
||||
if ($config['client_id'] !== null && !\is_string($config['client_id'])) {
|
||||
throw new \Stripe\Exception\InvalidArgumentException('client_id must be null or a string');
|
||||
}
|
||||
|
||||
// stripe_account
|
||||
if (null !== $config['stripe_account'] && !\is_string($config['stripe_account'])) {
|
||||
if ($config['stripe_account'] !== null && !\is_string($config['stripe_account'])) {
|
||||
throw new \Stripe\Exception\InvalidArgumentException('stripe_account must be null or a string');
|
||||
}
|
||||
|
||||
// stripe_version
|
||||
if (null !== $config['stripe_version'] && !\is_string($config['stripe_version'])) {
|
||||
if ($config['stripe_version'] !== null && !\is_string($config['stripe_version'])) {
|
||||
throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be null or a string');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -8,23 +8,23 @@ namespace Stripe\BillingPortal;
|
|||
* A portal configuration describes the functionality and behavior of a portal
|
||||
* session.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the configuration is active and can be used to create portal sessions.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the configuration.
|
||||
* @property \Stripe\StripeObject $business_profile
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
|
||||
* @property \Stripe\StripeObject $features
|
||||
* @property bool $is_default Whether the configuration is the default. If <code>true</code>, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $login_page
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the configuration is active and can be used to create portal sessions.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the configuration.
|
||||
* @property \Stripe\StripeObject $business_profile
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
|
||||
* @property \Stripe\StripeObject $features
|
||||
* @property bool $is_default Whether the configuration is the default. If <code>true</code>, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $login_page
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
*/
|
||||
class Configuration extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing_portal.configuration';
|
||||
public const OBJECT_NAME = 'billing_portal.configuration';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -22,21 +22,21 @@ namespace Stripe\BillingPortal;
|
|||
* href="https://stripe.com/docs/billing/subscriptions/integrating-customer-portal">integration
|
||||
* guide</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string|\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $customer The ID of the customer for this session.
|
||||
* @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s <code>preferred_locales</code> or browser’s locale is used.
|
||||
* @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this <code>on_behalf_of</code> account appear in the portal. For more information, see the <a href="https://stripe.com/docs/connect/charges-transfers#on-behalf-of">docs</a>. Use the <a href="https://stripe.com/docs/api/accounts/object#account_object-settings-branding">Accounts API</a> to modify the <code>on_behalf_of</code> account's branding settings, which the portal displays.
|
||||
* @property null|string $return_url The URL to redirect customers to when they click on the portal's link to return to your website.
|
||||
* @property string $url The short-lived URL of the session that gives customers access to the customer portal.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $customer The ID of the customer for this session.
|
||||
* @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s <code>preferred_locales</code> or browser’s locale is used.
|
||||
* @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this <code>on_behalf_of</code> account appear in the portal. For more information, see the <a href="https://stripe.com/docs/connect/charges-transfers#on-behalf-of">docs</a>. Use the <a href="https://stripe.com/docs/api/accounts/object#account_object-settings-branding">Accounts API</a> to modify the <code>on_behalf_of</code> account's branding settings, which the portal displays.
|
||||
* @property null|string $return_url The URL to redirect customers to when they click on the portal's link to return to your website.
|
||||
* @property string $url The short-lived URL of the session that gives customers access to the customer portal.
|
||||
*/
|
||||
class Session extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing_portal.session';
|
||||
public const OBJECT_NAME = 'billing_portal.session';
|
||||
|
||||
use \Stripe\ApiOperations\Create;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -11,32 +11,35 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/account-capabilities">Account
|
||||
* capabilities</a>.
|
||||
*
|
||||
* @property string $id The identifier for the capability.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string|\Stripe\Account $account The account for which the capability enables functionality.
|
||||
* @property \Stripe\StripeObject $future_requirements
|
||||
* @property bool $requested Whether the capability has been requested.
|
||||
* @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property string $status The status of the capability. Can be <code>active</code>, <code>inactive</code>, <code>pending</code>, or <code>unrequested</code>.
|
||||
* @property string $id The identifier for the capability.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string|\Stripe\Account $account The account for which the capability enables functionality.
|
||||
* @property \Stripe\StripeObject $future_requirements
|
||||
* @property bool $requested Whether the capability has been requested.
|
||||
* @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property string $status The status of the capability. Can be <code>active</code>, <code>inactive</code>, <code>pending</code>, or <code>unrequested</code>.
|
||||
*/
|
||||
class Capability extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'capability';
|
||||
public const OBJECT_NAME = 'capability';
|
||||
|
||||
use ApiOperations\Update;
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_UNREQUESTED = 'unrequested';
|
||||
public const STATUS_ACTIVE = 'active';
|
||||
|
||||
public const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
public const STATUS_PENDING = 'pending';
|
||||
|
||||
public const STATUS_UNREQUESTED = 'unrequested';
|
||||
|
||||
/**
|
||||
* @return string the API URL for this Stripe account reversal
|
||||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
$id = $this['id'];
|
||||
$id = $this['id'];
|
||||
$account = $this['account'];
|
||||
if (!$id) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
|
|
@ -45,23 +48,23 @@ class Capability extends ApiResource
|
|||
null
|
||||
);
|
||||
}
|
||||
$id = Util\Util::utf8($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$account = Util\Util::utf8($account);
|
||||
|
||||
$base = Account::classUrl();
|
||||
$base = Account::classUrl();
|
||||
$accountExtn = \urlencode($account);
|
||||
$extn = \urlencode($id);
|
||||
$extn = \urlencode($id);
|
||||
|
||||
return "{$base}/{$accountExtn}/capabilities/{$extn}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Capabilities cannot be retrieved without an account ID. ' .
|
||||
'Retrieve a capability using `Account::retrieveCapability(' .
|
||||
|
|
@ -71,13 +74,13 @@ class Capability extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Capabilities cannot be updated without an account ID. ' .
|
||||
'Update a capability using `Account::updateCapability(' .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -12,38 +12,38 @@ namespace Stripe;
|
|||
* Related guide: <a href="https://stripe.com/docs/sources/cards">Card Payments
|
||||
* with Sources</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
|
||||
* @property null|string $address_city City/District/Suburb/Town/Village.
|
||||
* @property null|string $address_country Billing address country, if provided when creating card.
|
||||
* @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name).
|
||||
* @property null|string $address_line1_check If <code>address_line1</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>.
|
||||
* @property null|string $address_line2 Address line 2 (Apartment/Suite/Unit/Building).
|
||||
* @property null|string $address_state State/County/Province/Region.
|
||||
* @property null|string $address_zip ZIP or postal code.
|
||||
* @property null|string $address_zip_check If <code>address_zip</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>.
|
||||
* @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the <code>method</code> when creating a payout.
|
||||
* @property string $brand Card brand. Can be <code>American Express</code>, <code>Diners Club</code>, <code>Discover</code>, <code>JCB</code>, <code>MasterCard</code>, <code>UnionPay</code>, <code>Visa</code>, or <code>Unknown</code>.
|
||||
* @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
|
||||
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
|
||||
* @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
|
||||
* @property null|string $cvc_check If a CVC was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see <a href="https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge">Check if a card is valid without a charge</a>.
|
||||
* @property null|bool $default_for_currency Whether this card is the default external account for its currency.
|
||||
* @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number.
|
||||
* @property int $exp_month Two-digit number representing the card's expiration month.
|
||||
* @property int $exp_year Four-digit number representing the card's expiration year.
|
||||
* @property null|string $fingerprint <p>Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.</p><p><em>Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.</em></p>
|
||||
* @property string $funding Card funding type. Can be <code>credit</code>, <code>debit</code>, <code>prepaid</code>, or <code>unknown</code>.
|
||||
* @property string $last4 The last four digits of the card.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name Cardholder name.
|
||||
* @property null|string $status For external accounts, possible values are <code>new</code> and <code>errored</code>. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.
|
||||
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
|
||||
* @property null|string $address_city City/District/Suburb/Town/Village.
|
||||
* @property null|string $address_country Billing address country, if provided when creating card.
|
||||
* @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name).
|
||||
* @property null|string $address_line1_check If <code>address_line1</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>.
|
||||
* @property null|string $address_line2 Address line 2 (Apartment/Suite/Unit/Building).
|
||||
* @property null|string $address_state State/County/Province/Region.
|
||||
* @property null|string $address_zip ZIP or postal code.
|
||||
* @property null|string $address_zip_check If <code>address_zip</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>.
|
||||
* @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the <code>method</code> when creating a payout.
|
||||
* @property string $brand Card brand. Can be <code>American Express</code>, <code>Diners Club</code>, <code>Discover</code>, <code>JCB</code>, <code>MasterCard</code>, <code>UnionPay</code>, <code>Visa</code>, or <code>Unknown</code>.
|
||||
* @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
|
||||
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
|
||||
* @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
|
||||
* @property null|string $cvc_check If a CVC was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see <a href="https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge">Check if a card is valid without a charge</a>.
|
||||
* @property null|bool $default_for_currency Whether this card is the default external account for its currency.
|
||||
* @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number.
|
||||
* @property int $exp_month Two-digit number representing the card's expiration month.
|
||||
* @property int $exp_year Four-digit number representing the card's expiration year.
|
||||
* @property null|string $fingerprint <p>Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.</p><p><em>Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.</em></p>
|
||||
* @property string $funding Card funding type. Can be <code>credit</code>, <code>debit</code>, <code>prepaid</code>, or <code>unknown</code>.
|
||||
* @property string $last4 The last four digits of the card.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name Cardholder name.
|
||||
* @property null|string $status For external accounts, possible values are <code>new</code> and <code>errored</code>. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.
|
||||
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null.
|
||||
*/
|
||||
class Card extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'card';
|
||||
public const OBJECT_NAME = 'card';
|
||||
|
||||
use ApiOperations\Delete;
|
||||
use ApiOperations\Update;
|
||||
|
|
@ -53,62 +53,69 @@ class Card extends ApiResource
|
|||
*
|
||||
* @see https://stripe.com/docs/api/cards/object#card_object-cvc_check
|
||||
*/
|
||||
const CVC_CHECK_FAIL = 'fail';
|
||||
const CVC_CHECK_PASS = 'pass';
|
||||
const CVC_CHECK_UNAVAILABLE = 'unavailable';
|
||||
const CVC_CHECK_UNCHECKED = 'unchecked';
|
||||
public const CVC_CHECK_FAIL = 'fail';
|
||||
|
||||
public const CVC_CHECK_PASS = 'pass';
|
||||
|
||||
public const CVC_CHECK_UNAVAILABLE = 'unavailable';
|
||||
|
||||
public const CVC_CHECK_UNCHECKED = 'unchecked';
|
||||
|
||||
/**
|
||||
* Possible string representations of the funding of the card.
|
||||
*
|
||||
* @see https://stripe.com/docs/api/cards/object#card_object-funding
|
||||
*/
|
||||
const FUNDING_CREDIT = 'credit';
|
||||
const FUNDING_DEBIT = 'debit';
|
||||
const FUNDING_PREPAID = 'prepaid';
|
||||
const FUNDING_UNKNOWN = 'unknown';
|
||||
public const FUNDING_CREDIT = 'credit';
|
||||
|
||||
public const FUNDING_DEBIT = 'debit';
|
||||
|
||||
public const FUNDING_PREPAID = 'prepaid';
|
||||
|
||||
public const FUNDING_UNKNOWN = 'unknown';
|
||||
|
||||
/**
|
||||
* Possible string representations of the tokenization method when using Apple Pay or Google Pay.
|
||||
*
|
||||
* @see https://stripe.com/docs/api/cards/object#card_object-tokenization_method
|
||||
*/
|
||||
const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay';
|
||||
const TOKENIZATION_METHOD_GOOGLE_PAY = 'google_pay';
|
||||
public const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay';
|
||||
|
||||
public const TOKENIZATION_METHOD_GOOGLE_PAY = 'google_pay';
|
||||
|
||||
/**
|
||||
* @return string The instance URL for this resource. It needs to be special
|
||||
* cased because cards are nested resources that may belong to different
|
||||
* top-level resources.
|
||||
* cased because cards are nested resources that may belong to different
|
||||
* top-level resources.
|
||||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
if ($this['customer']) {
|
||||
$base = Customer::classUrl();
|
||||
$base = Customer::classUrl();
|
||||
$parent = $this['customer'];
|
||||
$path = 'sources';
|
||||
$path = 'sources';
|
||||
} elseif ($this['account']) {
|
||||
$base = Account::classUrl();
|
||||
$base = Account::classUrl();
|
||||
$parent = $this['account'];
|
||||
$path = 'external_accounts';
|
||||
$path = 'external_accounts';
|
||||
} else {
|
||||
$msg = 'Cards cannot be accessed without a customer ID, or account ID.';
|
||||
|
||||
throw new Exception\UnexpectedValueException($msg);
|
||||
}
|
||||
$parentExtn = \urlencode(Util\Util::utf8($parent));
|
||||
$extn = \urlencode(Util\Util::utf8($this['id']));
|
||||
$extn = \urlencode(Util\Util::utf8($this['id']));
|
||||
|
||||
return "{$base}/{$parentExtn}/{$path}/{$extn}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Cards cannot be retrieved without a customer ID or an ' .
|
||||
'account ID. Retrieve a card using ' .
|
||||
|
|
@ -119,13 +126,13 @@ class Card extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Cards cannot be updated without a customer ID or an ' .
|
||||
'account ID. Update a card using ' .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -9,15 +9,15 @@ namespace Stripe;
|
|||
* funds to their cash balance by sending a bank transfer. These funds can be used
|
||||
* for payment and can eventually be paid out to your bank account.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property string $customer The ID of the customer whose cash balance this object represents.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $settings
|
||||
* @property string $customer The ID of the customer whose cash balance this object represents.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $settings
|
||||
*/
|
||||
class CashBalance extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'cash_balance';
|
||||
public const OBJECT_NAME = 'cash_balance';
|
||||
|
||||
/**
|
||||
* @return string the API URL for this balance transaction
|
||||
|
|
@ -27,19 +27,19 @@ class CashBalance extends ApiResource
|
|||
$customer = $this['customer'];
|
||||
$customer = Util\Util::utf8($customer);
|
||||
|
||||
$base = Customer::classUrl();
|
||||
$base = Customer::classUrl();
|
||||
$customerExtn = \urlencode($customer);
|
||||
|
||||
return "{$base}/{$customerExtn}/cash_balance";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Customer Cash Balance cannot be retrieved without a ' .
|
||||
'customer ID. Retrieve a Customer Cash Balance using ' .
|
||||
|
|
@ -49,13 +49,13 @@ class CashBalance extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Customer Cash Balance cannot be updated without a ' .
|
||||
'customer ID. Retrieve a Customer Cash Balance using ' .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,61 +13,61 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/payments/accept-a-payment-charges">Accept a
|
||||
* payment with the Charges API</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $alternate_statement_descriptors
|
||||
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
||||
* @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
|
||||
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
|
||||
* @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
|
||||
* @property string $authorization_code Authorization code on the charge.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
|
||||
* @property \Stripe\StripeObject $billing_details
|
||||
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
|
||||
* @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if <code>transfer_data</code> was specified in the charge request.
|
||||
* @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed.
|
||||
* @property bool $disputed Whether the charge has been disputed.
|
||||
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
|
||||
* @property null|string $failure_code Error code explaining reason for charge failure if available (see <a href="https://stripe.com/docs/error-codes">the errors section</a> for a list of codes).
|
||||
* @property null|string $failure_message Message to user further explaining reason for charge failure if available.
|
||||
* @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists.
|
||||
* @property \Stripe\StripeObject $level3
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the <a href="https://stripe.com/docs/connect/charges-transfers">Connect documentation</a> for details.
|
||||
* @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See <a href="https://stripe.com/docs/declines">understanding declines</a> for details.
|
||||
* @property bool $paid <code>true</code> if the charge succeeded, or was successfully authorized for later capture.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists.
|
||||
* @property null|string $payment_method ID of the payment method used in this charge.
|
||||
* @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction.
|
||||
* @property \Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
|
||||
* @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
|
||||
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be <code>null</code> until a receipt has been sent.
|
||||
* @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
|
||||
* @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
|
||||
* @property null|\Stripe\Collection<\Stripe\Refund> $refunds A list of refunds that have been applied to the charge.
|
||||
* @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists.
|
||||
* @property null|\Stripe\StripeObject $shipping Shipping information for the charge.
|
||||
* @property null|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to <code>payment_method</code> or <code>payment_method_details</code> instead.
|
||||
* @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details.
|
||||
* @property null|string $statement_descriptor For card charges, use <code>statement_descriptor_suffix</code> instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
|
||||
* @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
|
||||
* @property string $status The status of the payment is either <code>succeeded</code>, <code>pending</code>, or <code>failed</code>.
|
||||
* @property string|\Stripe\Transfer $transfer ID of the transfer to the <code>destination</code> account (only applicable if the charge was created using the <code>destination</code> parameter).
|
||||
* @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details.
|
||||
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/charges-transfers#transfer-options">Connect documentation</a> for details.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $alternate_statement_descriptors
|
||||
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
||||
* @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
|
||||
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
|
||||
* @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details.
|
||||
* @property string $authorization_code Authorization code on the charge.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
|
||||
* @property \Stripe\StripeObject $billing_details
|
||||
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
|
||||
* @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if <code>transfer_data</code> was specified in the charge request.
|
||||
* @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed.
|
||||
* @property bool $disputed Whether the charge has been disputed.
|
||||
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
|
||||
* @property null|string $failure_code Error code explaining reason for charge failure if available (see <a href="https://stripe.com/docs/error-codes">the errors section</a> for a list of codes).
|
||||
* @property null|string $failure_message Message to user further explaining reason for charge failure if available.
|
||||
* @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists.
|
||||
* @property \Stripe\StripeObject $level3
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the <a href="https://stripe.com/docs/connect/charges-transfers">Connect documentation</a> for details.
|
||||
* @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See <a href="https://stripe.com/docs/declines">understanding declines</a> for details.
|
||||
* @property bool $paid <code>true</code> if the charge succeeded, or was successfully authorized for later capture.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists.
|
||||
* @property null|string $payment_method ID of the payment method used in this charge.
|
||||
* @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction.
|
||||
* @property \Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
|
||||
* @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
|
||||
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be <code>null</code> until a receipt has been sent.
|
||||
* @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
|
||||
* @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
|
||||
* @property null|\Stripe\Collection<\Stripe\Refund> $refunds A list of refunds that have been applied to the charge.
|
||||
* @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists.
|
||||
* @property null|\Stripe\StripeObject $shipping Shipping information for the charge.
|
||||
* @property null|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to <code>payment_method</code> or <code>payment_method_details</code> instead.
|
||||
* @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details.
|
||||
* @property null|string $statement_descriptor For card charges, use <code>statement_descriptor_suffix</code> instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
|
||||
* @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
|
||||
* @property string $status The status of the payment is either <code>succeeded</code>, <code>pending</code>, or <code>failed</code>.
|
||||
* @property string|\Stripe\Transfer $transfer ID of the transfer to the <code>destination</code> account (only applicable if the charge was created using the <code>destination</code> parameter).
|
||||
* @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details.
|
||||
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/charges-transfers#transfer-options">Connect documentation</a> for details.
|
||||
*/
|
||||
class Charge extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'charge';
|
||||
public const OBJECT_NAME = 'charge';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -75,9 +75,11 @@ class Charge extends ApiResource
|
|||
use ApiOperations\Search;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const STATUS_FAILED = 'failed';
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_SUCCEEDED = 'succeeded';
|
||||
public const STATUS_FAILED = 'failed';
|
||||
|
||||
public const STATUS_PENDING = 'pending';
|
||||
|
||||
public const STATUS_SUCCEEDED = 'succeeded';
|
||||
|
||||
/**
|
||||
* Possible string representations of decline codes.
|
||||
|
|
@ -85,55 +87,100 @@ class Charge extends ApiResource
|
|||
*
|
||||
* @see https://stripe.com/docs/declines/codes
|
||||
*/
|
||||
const DECLINED_AUTHENTICATION_REQUIRED = 'authentication_required';
|
||||
const DECLINED_APPROVE_WITH_ID = 'approve_with_id';
|
||||
const DECLINED_CALL_ISSUER = 'call_issuer';
|
||||
const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported';
|
||||
const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded';
|
||||
const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported';
|
||||
const DECLINED_DO_NOT_HONOR = 'do_not_honor';
|
||||
const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again';
|
||||
const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction';
|
||||
const DECLINED_EXPIRED_CARD = 'expired_card';
|
||||
const DECLINED_FRAUDULENT = 'fraudulent';
|
||||
const DECLINED_GENERIC_DECLINE = 'generic_decline';
|
||||
const DECLINED_INCORRECT_NUMBER = 'incorrect_number';
|
||||
const DECLINED_INCORRECT_CVC = 'incorrect_cvc';
|
||||
const DECLINED_INCORRECT_PIN = 'incorrect_pin';
|
||||
const DECLINED_INCORRECT_ZIP = 'incorrect_zip';
|
||||
const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
const DECLINED_INVALID_ACCOUNT = 'invalid_account';
|
||||
const DECLINED_INVALID_AMOUNT = 'invalid_amount';
|
||||
const DECLINED_INVALID_CVC = 'invalid_cvc';
|
||||
const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
|
||||
const DECLINED_INVALID_NUMBER = 'invalid_number';
|
||||
const DECLINED_INVALID_PIN = 'invalid_pin';
|
||||
const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available';
|
||||
const DECLINED_LOST_CARD = 'lost_card';
|
||||
const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist';
|
||||
const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available';
|
||||
const DECLINED_NO_ACTION_TAKEN = 'no_action_taken';
|
||||
const DECLINED_NOT_PERMITTED = 'not_permitted';
|
||||
const DECLINED_OFFLINE_PIN_REQUIRED = 'offline_pin_required';
|
||||
const DECLINED_ONLINE_OR_OFFLINE_PIN_REQUIRED = 'online_or_offline_pin_required';
|
||||
const DECLINED_PICKUP_CARD = 'pickup_card';
|
||||
const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded';
|
||||
const DECLINED_PROCESSING_ERROR = 'processing_error';
|
||||
const DECLINED_REENTER_TRANSACTION = 'reenter_transaction';
|
||||
const DECLINED_RESTRICTED_CARD = 'restricted_card';
|
||||
const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations';
|
||||
const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization';
|
||||
const DECLINED_SECURITY_VIOLATION = 'security_violation';
|
||||
const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed';
|
||||
const DECLINED_STOLEN_CARD = 'stolen_card';
|
||||
const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order';
|
||||
const DECLINED_TESTMODE_DECLINE = 'testmode_decline';
|
||||
const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed';
|
||||
const DECLINED_TRY_AGAIN_LATER = 'try_again_later';
|
||||
const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded';
|
||||
public const DECLINED_AUTHENTICATION_REQUIRED = 'authentication_required';
|
||||
|
||||
public const DECLINED_APPROVE_WITH_ID = 'approve_with_id';
|
||||
|
||||
public const DECLINED_CALL_ISSUER = 'call_issuer';
|
||||
|
||||
public const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported';
|
||||
|
||||
public const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded';
|
||||
|
||||
public const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported';
|
||||
|
||||
public const DECLINED_DO_NOT_HONOR = 'do_not_honor';
|
||||
|
||||
public const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again';
|
||||
|
||||
public const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction';
|
||||
|
||||
public const DECLINED_EXPIRED_CARD = 'expired_card';
|
||||
|
||||
public const DECLINED_FRAUDULENT = 'fraudulent';
|
||||
|
||||
public const DECLINED_GENERIC_DECLINE = 'generic_decline';
|
||||
|
||||
public const DECLINED_INCORRECT_NUMBER = 'incorrect_number';
|
||||
|
||||
public const DECLINED_INCORRECT_CVC = 'incorrect_cvc';
|
||||
|
||||
public const DECLINED_INCORRECT_PIN = 'incorrect_pin';
|
||||
|
||||
public const DECLINED_INCORRECT_ZIP = 'incorrect_zip';
|
||||
|
||||
public const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
|
||||
public const DECLINED_INVALID_ACCOUNT = 'invalid_account';
|
||||
|
||||
public const DECLINED_INVALID_AMOUNT = 'invalid_amount';
|
||||
|
||||
public const DECLINED_INVALID_CVC = 'invalid_cvc';
|
||||
|
||||
public const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
|
||||
|
||||
public const DECLINED_INVALID_NUMBER = 'invalid_number';
|
||||
|
||||
public const DECLINED_INVALID_PIN = 'invalid_pin';
|
||||
|
||||
public const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available';
|
||||
|
||||
public const DECLINED_LOST_CARD = 'lost_card';
|
||||
|
||||
public const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist';
|
||||
|
||||
public const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available';
|
||||
|
||||
public const DECLINED_NO_ACTION_TAKEN = 'no_action_taken';
|
||||
|
||||
public const DECLINED_NOT_PERMITTED = 'not_permitted';
|
||||
|
||||
public const DECLINED_OFFLINE_PIN_REQUIRED = 'offline_pin_required';
|
||||
|
||||
public const DECLINED_ONLINE_OR_OFFLINE_PIN_REQUIRED = 'online_or_offline_pin_required';
|
||||
|
||||
public const DECLINED_PICKUP_CARD = 'pickup_card';
|
||||
|
||||
public const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded';
|
||||
|
||||
public const DECLINED_PROCESSING_ERROR = 'processing_error';
|
||||
|
||||
public const DECLINED_REENTER_TRANSACTION = 'reenter_transaction';
|
||||
|
||||
public const DECLINED_RESTRICTED_CARD = 'restricted_card';
|
||||
|
||||
public const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations';
|
||||
|
||||
public const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization';
|
||||
|
||||
public const DECLINED_SECURITY_VIOLATION = 'security_violation';
|
||||
|
||||
public const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed';
|
||||
|
||||
public const DECLINED_STOLEN_CARD = 'stolen_card';
|
||||
|
||||
public const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order';
|
||||
|
||||
public const DECLINED_TESTMODE_DECLINE = 'testmode_decline';
|
||||
|
||||
public const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed';
|
||||
|
||||
public const DECLINED_TRY_AGAIN_LATER = 'try_again_later';
|
||||
|
||||
public const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -142,7 +189,7 @@ class Charge extends ApiResource
|
|||
*/
|
||||
public function capture($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/capture';
|
||||
$url = $this->instanceUrl() . '/capture';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -150,7 +197,7 @@ class Charge extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -23,90 +23,102 @@ namespace Stripe\Checkout;
|
|||
* Related guide: <a href="https://stripe.com/docs/checkout/quickstart">Checkout
|
||||
* Quickstart</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object. Used to pass to <code>redirectToCheckout</code> in Stripe.js.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
|
||||
* @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
|
||||
* @property null|int $amount_subtotal Total of all items before discounts or taxes are applied.
|
||||
* @property null|int $amount_total Total of all items after discounts and taxes are applied.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
|
||||
* @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
|
||||
* @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
|
||||
* @property null|\Stripe\StripeObject $consent Results of <code>consent_collection</code> for this session.
|
||||
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $custom_text
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in <code>payment</code> or <code>subscription</code> mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
|
||||
* @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
|
||||
* @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in <code>setup</code> mode.
|
||||
* @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the <code>customer</code> attribute.
|
||||
* @property int $expires_at The timestamp at which the Checkout Session will expire.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists.
|
||||
* @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session.
|
||||
* @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or <code>auto</code>, the browser's locale is used.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $mode The mode of the Checkout Session.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in <code>payment</code> mode.
|
||||
* @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session.
|
||||
* @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method.
|
||||
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
|
||||
* @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
|
||||
* @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. You can use this value to decide when to fulfill your customer's order.
|
||||
* @property \Stripe\StripeObject $phone_number_collection
|
||||
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
|
||||
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode.
|
||||
* @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
|
||||
* @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate.
|
||||
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
|
||||
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
|
||||
* @property null|string $status The status of the Checkout Session, one of <code>open</code>, <code>complete</code>, or <code>expired</code>.
|
||||
* @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. <code>submit_type</code> can only be specified on Checkout Sessions in <code>payment</code> mode, but not Checkout Sessions in <code>subscription</code> or <code>setup</code> mode.
|
||||
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in <code>subscription</code> mode.
|
||||
* @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
|
||||
* @property \Stripe\StripeObject $tax_id_collection
|
||||
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
|
||||
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom Domains</a>, the URL will use your subdomain. Otherwise, it’ll use <code>checkout.stripe.com.</code> This value is only present when the session is active.
|
||||
* @property string $id Unique identifier for the object. Used to pass to <code>redirectToCheckout</code> in Stripe.js.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
|
||||
* @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
|
||||
* @property null|int $amount_subtotal Total of all items before discounts or taxes are applied.
|
||||
* @property null|int $amount_total Total of all items after discounts and taxes are applied.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
|
||||
* @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
|
||||
* @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
|
||||
* @property null|\Stripe\StripeObject $consent Results of <code>consent_collection</code> for this session.
|
||||
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $custom_text
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in <code>payment</code> or <code>subscription</code> mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
|
||||
* @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
|
||||
* @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in <code>setup</code> mode.
|
||||
* @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the <code>customer</code> attribute.
|
||||
* @property int $expires_at The timestamp at which the Checkout Session will expire.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists.
|
||||
* @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session.
|
||||
* @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or <code>auto</code>, the browser's locale is used.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $mode The mode of the Checkout Session.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in <code>payment</code> mode.
|
||||
* @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session.
|
||||
* @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method.
|
||||
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
|
||||
* @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
|
||||
* @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. You can use this value to decide when to fulfill your customer's order.
|
||||
* @property \Stripe\StripeObject $phone_number_collection
|
||||
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
|
||||
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode.
|
||||
* @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
|
||||
* @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate.
|
||||
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
|
||||
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
|
||||
* @property null|string $status The status of the Checkout Session, one of <code>open</code>, <code>complete</code>, or <code>expired</code>.
|
||||
* @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. <code>submit_type</code> can only be specified on Checkout Sessions in <code>payment</code> mode, but not Checkout Sessions in <code>subscription</code> or <code>setup</code> mode.
|
||||
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in <code>subscription</code> mode.
|
||||
* @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
|
||||
* @property \Stripe\StripeObject $tax_id_collection
|
||||
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
|
||||
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom Domains</a>, the URL will use your subdomain. Otherwise, it’ll use <code>checkout.stripe.com.</code> This value is only present when the session is active.
|
||||
*/
|
||||
class Session extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'checkout.session';
|
||||
public const OBJECT_NAME = 'checkout.session';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
|
||||
const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
|
||||
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
|
||||
public const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
|
||||
|
||||
const CUSTOMER_CREATION_ALWAYS = 'always';
|
||||
const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
|
||||
public const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
|
||||
|
||||
const MODE_PAYMENT = 'payment';
|
||||
const MODE_SETUP = 'setup';
|
||||
const MODE_SUBSCRIPTION = 'subscription';
|
||||
public const CUSTOMER_CREATION_ALWAYS = 'always';
|
||||
|
||||
const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always';
|
||||
const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required';
|
||||
public const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
|
||||
|
||||
const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required';
|
||||
const PAYMENT_STATUS_PAID = 'paid';
|
||||
const PAYMENT_STATUS_UNPAID = 'unpaid';
|
||||
public const MODE_PAYMENT = 'payment';
|
||||
|
||||
const STATUS_COMPLETE = 'complete';
|
||||
const STATUS_EXPIRED = 'expired';
|
||||
const STATUS_OPEN = 'open';
|
||||
public const MODE_SETUP = 'setup';
|
||||
|
||||
const SUBMIT_TYPE_AUTO = 'auto';
|
||||
const SUBMIT_TYPE_BOOK = 'book';
|
||||
const SUBMIT_TYPE_DONATE = 'donate';
|
||||
const SUBMIT_TYPE_PAY = 'pay';
|
||||
public const MODE_SUBSCRIPTION = 'subscription';
|
||||
|
||||
public const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always';
|
||||
|
||||
public const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required';
|
||||
|
||||
public const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required';
|
||||
|
||||
public const PAYMENT_STATUS_PAID = 'paid';
|
||||
|
||||
public const PAYMENT_STATUS_UNPAID = 'unpaid';
|
||||
|
||||
public const STATUS_COMPLETE = 'complete';
|
||||
|
||||
public const STATUS_EXPIRED = 'expired';
|
||||
|
||||
public const STATUS_OPEN = 'open';
|
||||
|
||||
public const SUBMIT_TYPE_AUTO = 'auto';
|
||||
|
||||
public const SUBMIT_TYPE_BOOK = 'book';
|
||||
|
||||
public const SUBMIT_TYPE_DONATE = 'donate';
|
||||
|
||||
public const SUBMIT_TYPE_PAY = 'pay';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -115,7 +127,7 @@ class Session extends \Stripe\ApiResource
|
|||
*/
|
||||
public function expire($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/expire';
|
||||
$url = $this->instanceUrl() . '/expire';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -123,8 +135,8 @@ class Session extends \Stripe\ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -133,9 +145,9 @@ class Session extends \Stripe\ApiResource
|
|||
*/
|
||||
public static function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
$url = static::resourceUrl($id) . '/line_items';
|
||||
$url = static::resourceUrl($id) . '/line_items';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -8,14 +8,14 @@ namespace Stripe;
|
|||
* @template TStripeObject of StripeObject
|
||||
* @template-implements \IteratorAggregate<TStripeObject>
|
||||
*
|
||||
* @property string $object
|
||||
* @property string $url
|
||||
* @property bool $has_more
|
||||
* @property string $object
|
||||
* @property string $url
|
||||
* @property bool $has_more
|
||||
* @property TStripeObject[] $data
|
||||
*/
|
||||
class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
||||
{
|
||||
const OBJECT_NAME = 'list';
|
||||
public const OBJECT_NAME = 'list';
|
||||
|
||||
use ApiOperations\Request;
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
*
|
||||
* @param array $filters the filters
|
||||
*/
|
||||
public function setFilters($filters)
|
||||
public function setFilters($filters) : void
|
||||
{
|
||||
$this->filters = $filters;
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws Exception\ApiErrorException
|
||||
|
|
@ -81,10 +81,10 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
list($url, $params) = $this->extractPathAndUpdateParams($params);
|
||||
|
||||
list($response, $opts) = $this->_request('get', $url, $params, $opts);
|
||||
$obj = Util\Util::convertToStripeObject($response, $opts);
|
||||
if (!($obj instanceof \Stripe\Collection)) {
|
||||
$obj = Util\Util::convertToStripeObject($response, $opts);
|
||||
if (!($obj instanceof self)) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
|
||||
'Expected type ' . self::class . ', got "' . \get_class($obj) . '" instead.'
|
||||
);
|
||||
}
|
||||
$obj->setFilters($params);
|
||||
|
|
@ -93,7 +93,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws Exception\ApiErrorException
|
||||
|
|
@ -111,8 +111,8 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws Exception\ApiErrorException
|
||||
|
|
@ -124,8 +124,8 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
self::_validateParams($params);
|
||||
list($url, $params) = $this->extractPathAndUpdateParams($params);
|
||||
|
||||
$id = Util\Util::utf8($id);
|
||||
$extn = \urlencode($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$extn = \urlencode($id);
|
||||
list($response, $opts) = $this->_request(
|
||||
'get',
|
||||
"{$url}/{$extn}",
|
||||
|
|
@ -147,7 +147,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
|
||||
/**
|
||||
* @return \ArrayIterator an iterator that can be used to iterate
|
||||
* across objects in the current page
|
||||
* across objects in the current page
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
|
|
@ -157,7 +157,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
|
||||
/**
|
||||
* @return \ArrayIterator an iterator that can be used to iterate
|
||||
* backwards across objects in the current page
|
||||
* backwards across objects in the current page
|
||||
*/
|
||||
public function getReverseIterator()
|
||||
{
|
||||
|
|
@ -166,9 +166,9 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
|
||||
/**
|
||||
* @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.
|
||||
* iterate across all objects across all pages. As page boundaries are
|
||||
* encountered, the next page will be fetched automatically for
|
||||
* continued iteration.
|
||||
*/
|
||||
public function autoPagingIterator()
|
||||
{
|
||||
|
|
@ -206,7 +206,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
*/
|
||||
public static function emptyCollection($opts = null)
|
||||
{
|
||||
return Collection::constructFrom(['data' => []], $opts);
|
||||
return self::constructFrom(['data' => []], $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -225,7 +225,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
* This method will try to respect the limit of the current page. If none
|
||||
* was given, the default limit will be fetched again.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return Collection<TStripeObject>
|
||||
|
|
@ -253,7 +253,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
|
|||
* This method will try to respect the limit of the current page. If none
|
||||
* was given, the default limit will be fetched again.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return Collection<TStripeObject>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -12,18 +12,18 @@ namespace Stripe;
|
|||
* You can also view the information from this API call as <a
|
||||
* href="/docs/connect/required-verification-information">an online guide</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object. Represented as the ISO country code for this country.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $default_currency The default currency for this country. This applies to both payment methods and bank accounts.
|
||||
* @property string $id Unique identifier for the object. Represented as the ISO country code for this country.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $default_currency The default currency for this country. This applies to both payment methods and bank accounts.
|
||||
* @property \Stripe\StripeObject $supported_bank_account_currencies Currencies that can be accepted in the specific country (for transfers).
|
||||
* @property string[] $supported_payment_currencies Currencies that can be accepted in the specified country (for payments).
|
||||
* @property string[] $supported_payment_methods Payment methods available in the specified country. You may need to enable some payment methods (e.g., <a href="https://stripe.com/docs/ach">ACH</a>) on your account before they appear in this list. The <code>stripe</code> payment method refers to <a href="https://stripe.com/docs/connect/destination-charges">charging through your platform</a>.
|
||||
* @property string[] $supported_transfer_countries Countries that can accept transfers from the specified country.
|
||||
* @property string[] $supported_payment_currencies Currencies that can be accepted in the specified country (for payments).
|
||||
* @property string[] $supported_payment_methods Payment methods available in the specified country. You may need to enable some payment methods (e.g., <a href="https://stripe.com/docs/ach">ACH</a>) on your account before they appear in this list. The <code>stripe</code> payment method refers to <a href="https://stripe.com/docs/connect/destination-charges">charging through your platform</a>.
|
||||
* @property string[] $supported_transfer_countries Countries that can accept transfers from the specified country.
|
||||
* @property \Stripe\StripeObject $verification_fields
|
||||
*/
|
||||
class CountrySpec extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'country_spec';
|
||||
public const OBJECT_NAME = 'country_spec';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -15,27 +15,27 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/api#create_charge">charges</a> or <a
|
||||
* href="https://stripe.com/docs/api/payment_intents">payment intents</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|int $amount_off Amount (in the <code>currency</code> specified) that will be taken off the subtotal of any invoices for this customer.
|
||||
* @property \Stripe\StripeObject $applies_to
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency If <code>amount_off</code> has been set, the three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> of the amount to take off.
|
||||
* @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $duration One of <code>forever</code>, <code>once</code>, and <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
|
||||
* @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
|
||||
* @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
|
||||
* @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
|
||||
* @property int $times_redeemed Number of times this coupon has been applied to a customer.
|
||||
* @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|int $amount_off Amount (in the <code>currency</code> specified) that will be taken off the subtotal of any invoices for this customer.
|
||||
* @property \Stripe\StripeObject $applies_to
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency If <code>amount_off</code> has been set, the three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> of the amount to take off.
|
||||
* @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $duration One of <code>forever</code>, <code>once</code>, and <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
|
||||
* @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
|
||||
* @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
|
||||
* @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
|
||||
* @property int $times_redeemed Number of times this coupon has been applied to a customer.
|
||||
* @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer.
|
||||
*/
|
||||
class Coupon extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'coupon';
|
||||
public const OBJECT_NAME = 'coupon';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -11,37 +11,37 @@ namespace Stripe;
|
|||
* Related guide: <a
|
||||
* href="https://stripe.com/docs/billing/invoices/credit-notes">Credit Notes</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The integer amount in %s representing the total amount of the credit note, including tax.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer ID of the customer.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The integer amount in %s representing the total amount of the credit note, including tax.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer ID of the customer.
|
||||
* @property null|string|\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note.
|
||||
* @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited.
|
||||
* @property \Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items.
|
||||
* @property string|\Stripe\Invoice $invoice ID of the invoice.
|
||||
* @property \Stripe\Collection<\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $memo Customer-facing text that appears on the credit note PDF.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
|
||||
* @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
|
||||
* @property string $pdf The link to download the PDF of the credit note.
|
||||
* @property null|string $reason Reason for issuing this credit note, one of <code>duplicate</code>, <code>fraudulent</code>, <code>order_change</code>, or <code>product_unsatisfactory</code>
|
||||
* @property null|string|\Stripe\Refund $refund Refund related to this credit note.
|
||||
* @property string $status Status of this credit note, one of <code>issued</code> or <code>void</code>. Learn more about <a href="https://stripe.com/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>.
|
||||
* @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
|
||||
* @property null|int $subtotal_excluding_tax The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items.
|
||||
* @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount.
|
||||
* @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
|
||||
* @property string $type Type of this credit note, one of <code>pre_payment</code> or <code>post_payment</code>. A <code>pre_payment</code> credit note means it was issued when the invoice was open. A <code>post_payment</code> credit note means it was issued when the invoice was paid.
|
||||
* @property null|int $voided_at The time that the credit note was voided.
|
||||
* @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited.
|
||||
* @property \Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items.
|
||||
* @property string|\Stripe\Invoice $invoice ID of the invoice.
|
||||
* @property \Stripe\Collection<\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $memo Customer-facing text that appears on the credit note PDF.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
|
||||
* @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
|
||||
* @property string $pdf The link to download the PDF of the credit note.
|
||||
* @property null|string $reason Reason for issuing this credit note, one of <code>duplicate</code>, <code>fraudulent</code>, <code>order_change</code>, or <code>product_unsatisfactory</code>
|
||||
* @property null|string|\Stripe\Refund $refund Refund related to this credit note.
|
||||
* @property string $status Status of this credit note, one of <code>issued</code> or <code>void</code>. Learn more about <a href="https://stripe.com/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>.
|
||||
* @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
|
||||
* @property null|int $subtotal_excluding_tax The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items.
|
||||
* @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount.
|
||||
* @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
|
||||
* @property string $type Type of this credit note, one of <code>pre_payment</code> or <code>post_payment</code>. A <code>pre_payment</code> credit note means it was issued when the invoice was open. A <code>post_payment</code> credit note means it was issued when the invoice was paid.
|
||||
* @property null|int $voided_at The time that the credit note was voided.
|
||||
*/
|
||||
class CreditNote extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'credit_note';
|
||||
public const OBJECT_NAME = 'credit_note';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -49,19 +49,24 @@ class CreditNote extends ApiResource
|
|||
use ApiOperations\Retrieve;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const REASON_DUPLICATE = 'duplicate';
|
||||
const REASON_FRAUDULENT = 'fraudulent';
|
||||
const REASON_ORDER_CHANGE = 'order_change';
|
||||
const REASON_PRODUCT_UNSATISFACTORY = 'product_unsatisfactory';
|
||||
public const REASON_DUPLICATE = 'duplicate';
|
||||
|
||||
const STATUS_ISSUED = 'issued';
|
||||
const STATUS_VOID = 'void';
|
||||
public const REASON_FRAUDULENT = 'fraudulent';
|
||||
|
||||
const TYPE_POST_PAYMENT = 'post_payment';
|
||||
const TYPE_PRE_PAYMENT = 'pre_payment';
|
||||
public const REASON_ORDER_CHANGE = 'order_change';
|
||||
|
||||
public const REASON_PRODUCT_UNSATISFACTORY = 'product_unsatisfactory';
|
||||
|
||||
public const STATUS_ISSUED = 'issued';
|
||||
|
||||
public const STATUS_VOID = 'void';
|
||||
|
||||
public const TYPE_POST_PAYMENT = 'post_payment';
|
||||
|
||||
public const TYPE_PRE_PAYMENT = 'pre_payment';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -70,16 +75,16 @@ class CreditNote extends ApiResource
|
|||
*/
|
||||
public static function preview($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/preview';
|
||||
$url = static::classUrl() . '/preview';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -88,16 +93,16 @@ class CreditNote extends ApiResource
|
|||
*/
|
||||
public static function previewLines($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/preview/lines';
|
||||
$url = static::classUrl() . '/preview/lines';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -106,18 +111,18 @@ class CreditNote extends ApiResource
|
|||
*/
|
||||
public function voidCreditNote($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/void';
|
||||
$url = $this->instanceUrl() . '/void';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
const PATH_LINES = '/lines';
|
||||
public const PATH_LINES = '/lines';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the credit note on which to retrieve the credit note line items
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the credit note on which to retrieve the credit note line items
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
|
||||
* @property null|int $amount_excluding_tax The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
|
||||
* @property null|string $description Description of the item being credited.
|
||||
* @property int $discount_amount The integer amount in %s representing the discount being credited for this line item.
|
||||
* @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item
|
||||
* @property string $invoice_line_item ID of the invoice line item being credited
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|int $quantity The number of units of product being credited.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
|
||||
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
|
||||
* @property string $type The type of the credit note line item, one of <code>invoice_line_item</code> or <code>custom_line_item</code>. When the type is <code>invoice_line_item</code> there is an additional <code>invoice_line_item</code> property on the resource the value of which is the id of the credited line item on the invoice.
|
||||
* @property null|int $unit_amount The cost of each unit of product being credited.
|
||||
* @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places.
|
||||
* @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
|
||||
* @property null|int $amount_excluding_tax The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
|
||||
* @property null|string $description Description of the item being credited.
|
||||
* @property int $discount_amount The integer amount in %s representing the discount being credited for this line item.
|
||||
* @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item
|
||||
* @property string $invoice_line_item ID of the invoice line item being credited
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|int $quantity The number of units of product being credited.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
|
||||
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
|
||||
* @property string $type The type of the credit note line item, one of <code>invoice_line_item</code> or <code>custom_line_item</code>. When the type is <code>invoice_line_item</code> there is an additional <code>invoice_line_item</code> property on the resource the value of which is the id of the credited line item on the invoice.
|
||||
* @property null|int $unit_amount The cost of each unit of product being credited.
|
||||
* @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places.
|
||||
* @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
|
||||
*/
|
||||
class CreditNoteLineItem extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'credit_note_line_item';
|
||||
public const OBJECT_NAME = 'credit_note_line_item';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -12,38 +12,38 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/payments/save-during-payment">Save a card during
|
||||
* payment</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $address The customer's address.
|
||||
* @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
|
||||
* @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> the customer can be charged in for recurring billing purposes.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source <p>ID of the default payment source for the customer.</p><p>If you are using payment methods created via the PaymentMethods API, see the <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p>
|
||||
* @property null|bool $delinquent <p>When the customer's latest invoice is billed by charging automatically, <code>delinquent</code> is <code>true</code> if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, <code>delinquent</code> is <code>true</code> if the invoice isn't paid by its due date.</p><p>If an invoice is marked uncollectible by <a href="https://stripe.com/docs/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't get reset to <code>false</code>.</p>
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one.
|
||||
* @property null|string $email The customer's email address.
|
||||
* @property \Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
|
||||
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
|
||||
* @property \Stripe\StripeObject $invoice_settings
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name The customer's full name or business name.
|
||||
* @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
|
||||
* @property null|string $phone The customer's phone number.
|
||||
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
|
||||
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
|
||||
* @property \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
|
||||
* @property \Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
|
||||
* @property \Stripe\StripeObject $tax
|
||||
* @property null|string $tax_exempt Describes the customer's tax exemption status. One of <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the text <strong>"Reverse charge"</strong>.
|
||||
* @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $address The customer's address.
|
||||
* @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
|
||||
* @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> the customer can be charged in for recurring billing purposes.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source <p>ID of the default payment source for the customer.</p><p>If you are using payment methods created via the PaymentMethods API, see the <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p>
|
||||
* @property null|bool $delinquent <p>When the customer's latest invoice is billed by charging automatically, <code>delinquent</code> is <code>true</code> if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, <code>delinquent</code> is <code>true</code> if the invoice isn't paid by its due date.</p><p>If an invoice is marked uncollectible by <a href="https://stripe.com/docs/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't get reset to <code>false</code>.</p>
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one.
|
||||
* @property null|string $email The customer's email address.
|
||||
* @property \Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
|
||||
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
|
||||
* @property \Stripe\StripeObject $invoice_settings
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name The customer's full name or business name.
|
||||
* @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
|
||||
* @property null|string $phone The customer's phone number.
|
||||
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
|
||||
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
|
||||
* @property \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
|
||||
* @property \Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
|
||||
* @property \Stripe\StripeObject $tax
|
||||
* @property null|string $tax_exempt Describes the customer's tax exemption status. One of <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the text <strong>"Reverse charge"</strong>.
|
||||
* @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to.
|
||||
*/
|
||||
class Customer extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'customer';
|
||||
public const OBJECT_NAME = 'customer';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -53,14 +53,16 @@ class Customer extends ApiResource
|
|||
use ApiOperations\Search;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const TAX_EXEMPT_EXEMPT = 'exempt';
|
||||
const TAX_EXEMPT_NONE = 'none';
|
||||
const TAX_EXEMPT_REVERSE = 'reverse';
|
||||
public const TAX_EXEMPT_EXEMPT = 'exempt';
|
||||
|
||||
public const TAX_EXEMPT_NONE = 'none';
|
||||
|
||||
public const TAX_EXEMPT_REVERSE = 'reverse';
|
||||
|
||||
public static function getSavedNestedResources()
|
||||
{
|
||||
static $savedNestedResources = null;
|
||||
if (null === $savedNestedResources) {
|
||||
if ($savedNestedResources === null) {
|
||||
$savedNestedResources = new Util\Set([
|
||||
'source',
|
||||
]);
|
||||
|
|
@ -70,14 +72,14 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return \Stripe\Customer the updated customer
|
||||
*/
|
||||
public function deleteDiscount($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/discount';
|
||||
$url = $this->instanceUrl() . '/discount';
|
||||
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
|
||||
$this->refreshFrom(['discount' => null], $opts, true);
|
||||
|
||||
|
|
@ -85,8 +87,8 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -95,17 +97,17 @@ class Customer extends ApiResource
|
|||
*/
|
||||
public static function allPaymentMethods($id, $params = null, $opts = null)
|
||||
{
|
||||
$url = static::resourceUrl($id) . '/payment_methods';
|
||||
$url = static::resourceUrl($id) . '/payment_methods';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $payment_method
|
||||
* @param null|array $params
|
||||
* @param string $payment_method
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -114,16 +116,16 @@ class Customer extends ApiResource
|
|||
*/
|
||||
public function retrievePaymentMethod($payment_method, $params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/payment_methods/' . $payment_method;
|
||||
$url = $this->instanceUrl() . '/payment_methods/' . $payment_method;
|
||||
list($response, $opts) = $this->_request('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -137,13 +139,13 @@ class Customer extends ApiResource
|
|||
return self::_searchResource($url, $params, $opts);
|
||||
}
|
||||
|
||||
const PATH_CASH_BALANCE = '/cash_balance';
|
||||
public const PATH_CASH_BALANCE = '/cash_balance';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the cash balance belongs
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the cash balance belongs
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
* @param mixed $cashBalanceId
|
||||
* @param mixed $cashBalanceId
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
|
|
@ -155,10 +157,10 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the cash balance belongs
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the cash balance belongs
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
* @param mixed $cashBalanceId
|
||||
* @param mixed $cashBalanceId
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
|
|
@ -168,11 +170,12 @@ class Customer extends ApiResource
|
|||
{
|
||||
return self::_updateNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
|
||||
}
|
||||
const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';
|
||||
|
||||
public const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to retrieve the customer balance transactions
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to retrieve the customer balance transactions
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -185,8 +188,8 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to create the customer balance transaction
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to create the customer balance transaction
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -199,9 +202,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the customer balance transaction belongs
|
||||
* @param string $balanceTransactionId the ID of the customer balance transaction to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the customer balance transaction belongs
|
||||
* @param string $balanceTransactionId the ID of the customer balance transaction to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -214,9 +217,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the customer balance transaction belongs
|
||||
* @param string $balanceTransactionId the ID of the customer balance transaction to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the customer balance transaction belongs
|
||||
* @param string $balanceTransactionId the ID of the customer balance transaction to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -227,11 +230,12 @@ class Customer extends ApiResource
|
|||
{
|
||||
return self::_updateNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts);
|
||||
}
|
||||
const PATH_CASH_BALANCE_TRANSACTIONS = '/cash_balance_transactions';
|
||||
|
||||
public const PATH_CASH_BALANCE_TRANSACTIONS = '/cash_balance_transactions';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to retrieve the customer cash balance transactions
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to retrieve the customer cash balance transactions
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -244,9 +248,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the customer cash balance transaction belongs
|
||||
* @param string $cashBalanceTransactionId the ID of the customer cash balance transaction to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the customer cash balance transaction belongs
|
||||
* @param string $cashBalanceTransactionId the ID of the customer cash balance transaction to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -257,11 +261,12 @@ class Customer extends ApiResource
|
|||
{
|
||||
return self::_retrieveNestedResource($id, static::PATH_CASH_BALANCE_TRANSACTIONS, $cashBalanceTransactionId, $params, $opts);
|
||||
}
|
||||
const PATH_SOURCES = '/sources';
|
||||
|
||||
public const PATH_SOURCES = '/sources';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to retrieve the payment sources
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to retrieve the payment sources
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -274,8 +279,8 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to create the payment source
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to create the payment source
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -288,9 +293,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to delete
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to delete
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -303,9 +308,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -318,9 +323,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to update
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the payment source belongs
|
||||
* @param string $sourceId the ID of the payment source to update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -331,11 +336,12 @@ class Customer extends ApiResource
|
|||
{
|
||||
return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
|
||||
}
|
||||
const PATH_TAX_IDS = '/tax_ids';
|
||||
|
||||
public const PATH_TAX_IDS = '/tax_ids';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to retrieve the tax ids
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to retrieve the tax ids
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -348,8 +354,8 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer on which to create the tax id
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer on which to create the tax id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -362,9 +368,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the tax id belongs
|
||||
* @param string $taxIdId the ID of the tax id to delete
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the tax id belongs
|
||||
* @param string $taxIdId the ID of the tax id to delete
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -377,9 +383,9 @@ class Customer extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the customer to which the tax id belongs
|
||||
* @param string $taxIdId the ID of the tax id to retrieve
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the customer to which the tax id belongs
|
||||
* @param string $taxIdId the ID of the tax id to retrieve
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -17,41 +17,48 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/billing/customer/balance">Customer Balance</a> to
|
||||
* learn more.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's <code>balance</code>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string|\Stripe\CreditNote $credit_note The ID of the credit note (if any) related to the transaction.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer the transaction belongs to.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property int $ending_balance The customer's <code>balance</code> after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
|
||||
* @property null|string|\Stripe\Invoice $invoice The ID of the invoice (if any) related to the transaction.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $type Transaction type: <code>adjustment</code>, <code>applied_to_invoice</code>, <code>credit_note</code>, <code>initial</code>, <code>invoice_overpaid</code>, <code>invoice_too_large</code>, <code>invoice_too_small</code>, <code>unspent_receiver_credit</code>, or <code>unapplied_from_invoice</code>. See the <a href="https://stripe.com/docs/billing/customer/balance#types">Customer Balance page</a> to learn more about transaction types.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's <code>balance</code>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string|\Stripe\CreditNote $credit_note The ID of the credit note (if any) related to the transaction.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer the transaction belongs to.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property int $ending_balance The customer's <code>balance</code> after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
|
||||
* @property null|string|\Stripe\Invoice $invoice The ID of the invoice (if any) related to the transaction.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $type Transaction type: <code>adjustment</code>, <code>applied_to_invoice</code>, <code>credit_note</code>, <code>initial</code>, <code>invoice_overpaid</code>, <code>invoice_too_large</code>, <code>invoice_too_small</code>, <code>unspent_receiver_credit</code>, or <code>unapplied_from_invoice</code>. See the <a href="https://stripe.com/docs/billing/customer/balance#types">Customer Balance page</a> to learn more about transaction types.
|
||||
*/
|
||||
class CustomerBalanceTransaction extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'customer_balance_transaction';
|
||||
public const OBJECT_NAME = 'customer_balance_transaction';
|
||||
|
||||
const TYPE_ADJUSTMENT = 'adjustment';
|
||||
const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice';
|
||||
const TYPE_CREDIT_NOTE = 'credit_note';
|
||||
const TYPE_INITIAL = 'initial';
|
||||
const TYPE_INVOICE_OVERPAID = 'invoice_overpaid';
|
||||
const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large';
|
||||
const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small';
|
||||
const TYPE_UNSPENT_RECEIVER_CREDIT = 'unspent_receiver_credit';
|
||||
public const TYPE_ADJUSTMENT = 'adjustment';
|
||||
|
||||
const TYPE_ADJUSTEMENT = 'adjustment';
|
||||
public const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice';
|
||||
|
||||
public const TYPE_CREDIT_NOTE = 'credit_note';
|
||||
|
||||
public const TYPE_INITIAL = 'initial';
|
||||
|
||||
public const TYPE_INVOICE_OVERPAID = 'invoice_overpaid';
|
||||
|
||||
public const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large';
|
||||
|
||||
public const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small';
|
||||
|
||||
public const TYPE_UNSPENT_RECEIVER_CREDIT = 'unspent_receiver_credit';
|
||||
|
||||
public const TYPE_ADJUSTEMENT = 'adjustment';
|
||||
|
||||
/**
|
||||
* @return string the API URL for this balance transaction
|
||||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
$id = $this['id'];
|
||||
$id = $this['id'];
|
||||
$customer = $this['customer'];
|
||||
if (!$id) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
|
|
@ -59,23 +66,23 @@ class CustomerBalanceTransaction extends ApiResource
|
|||
null
|
||||
);
|
||||
}
|
||||
$id = Util\Util::utf8($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$customer = Util\Util::utf8($customer);
|
||||
|
||||
$base = Customer::classUrl();
|
||||
$base = Customer::classUrl();
|
||||
$customerExtn = \urlencode($customer);
|
||||
$extn = \urlencode($id);
|
||||
$extn = \urlencode($id);
|
||||
|
||||
return "{$base}/{$customerExtn}/balance_transactions/{$extn}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Customer Balance Transactions cannot be retrieved without a ' .
|
||||
'customer ID. Retrieve a Customer Balance Transaction using ' .
|
||||
|
|
@ -86,13 +93,13 @@ class CustomerBalanceTransaction extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Customer Balance Transactions cannot be updated without a ' .
|
||||
'customer ID. Update a Customer Balance Transaction using ' .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -11,31 +11,36 @@ namespace Stripe;
|
|||
* of this balance. This includes funding by the customer, allocation to payments,
|
||||
* and refunds to the customer.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $applied_to_payment
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The customer whose available cash balance changed as a result of this transaction.
|
||||
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property \Stripe\StripeObject $funded
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $net_amount The amount by which the cash balance changed, represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
|
||||
* @property \Stripe\StripeObject $refunded_from_payment
|
||||
* @property string $type The type of the cash balance transaction. One of <code>applied_to_payment</code>, <code>unapplied_from_payment</code>, <code>refunded_from_payment</code>, <code>funded</code>, <code>return_initiated</code>, or <code>return_canceled</code>. New types may be added in future. See <a href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
|
||||
* @property \Stripe\StripeObject $unapplied_from_payment
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $applied_to_payment
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The customer whose available cash balance changed as a result of this transaction.
|
||||
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property \Stripe\StripeObject $funded
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $net_amount The amount by which the cash balance changed, represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
|
||||
* @property \Stripe\StripeObject $refunded_from_payment
|
||||
* @property string $type The type of the cash balance transaction. One of <code>applied_to_payment</code>, <code>unapplied_from_payment</code>, <code>refunded_from_payment</code>, <code>funded</code>, <code>return_initiated</code>, or <code>return_canceled</code>. New types may be added in future. See <a href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
|
||||
* @property \Stripe\StripeObject $unapplied_from_payment
|
||||
*/
|
||||
class CustomerCashBalanceTransaction extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'customer_cash_balance_transaction';
|
||||
public const OBJECT_NAME = 'customer_cash_balance_transaction';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
||||
const TYPE_APPLIED_TO_PAYMENT = 'applied_to_payment';
|
||||
const TYPE_FUNDED = 'funded';
|
||||
const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment';
|
||||
const TYPE_RETURN_CANCELED = 'return_canceled';
|
||||
const TYPE_RETURN_INITIATED = 'return_initiated';
|
||||
const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment';
|
||||
public const TYPE_APPLIED_TO_PAYMENT = 'applied_to_payment';
|
||||
|
||||
public const TYPE_FUNDED = 'funded';
|
||||
|
||||
public const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment';
|
||||
|
||||
public const TYPE_RETURN_CANCELED = 'return_canceled';
|
||||
|
||||
public const TYPE_RETURN_INITIATED = 'return_initiated';
|
||||
|
||||
public const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* Class Discount.
|
||||
*
|
||||
* @property null|string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
|
||||
* @property \Stripe\Coupon $coupon Hash describing the coupon applied to create this discount.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer associated with this discount.
|
||||
* @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
|
||||
* @property string $id The ID of the discount object.
|
||||
* @property null|string $invoice The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice.
|
||||
* @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
|
||||
* @property string $object String representing the object’s type. Objects of the same type share the same value.
|
||||
* @property null|string $promotion_code The promotion code applied to create this discount.
|
||||
* @property int $start Date that the coupon was applied.
|
||||
* @property null|string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
||||
* @property null|string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
|
||||
* @property \Stripe\Coupon $coupon Hash describing the coupon applied to create this discount.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer associated with this discount.
|
||||
* @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
|
||||
* @property string $id The ID of the discount object.
|
||||
* @property null|string $invoice The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice.
|
||||
* @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
|
||||
* @property string $object String representing the object’s type. Objects of the same type share the same value.
|
||||
* @property null|string $promotion_code The promotion code applied to create this discount.
|
||||
* @property int $start Date that the coupon was applied.
|
||||
* @property null|string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
||||
*/
|
||||
class Discount extends StripeObject
|
||||
{
|
||||
const OBJECT_NAME = 'discount';
|
||||
public const OBJECT_NAME = 'discount';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,57 +14,77 @@ namespace Stripe;
|
|||
* Related guide: <a href="https://stripe.com/docs/disputes">Disputes and
|
||||
* Fraud</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
|
||||
* @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
|
||||
* @property string|\Stripe\Charge $charge ID of the charge that was disputed.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $evidence
|
||||
* @property \Stripe\StripeObject $evidence_details
|
||||
* @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $network_reason_code Network-dependent reason code for the dispute.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed.
|
||||
* @property string $reason Reason given by cardholder for dispute. Possible values are <code>bank_cannot_process</code>, <code>check_returned</code>, <code>credit_not_processed</code>, <code>customer_initiated</code>, <code>debit_not_authorized</code>, <code>duplicate</code>, <code>fraudulent</code>, <code>general</code>, <code>incorrect_account_details</code>, <code>insufficient_funds</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Read more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>.
|
||||
* @property string $status Current status of dispute. Possible values are <code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>charge_refunded</code>, <code>won</code>, or <code>lost</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
|
||||
* @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
|
||||
* @property string|\Stripe\Charge $charge ID of the charge that was disputed.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $evidence
|
||||
* @property \Stripe\StripeObject $evidence_details
|
||||
* @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $network_reason_code Network-dependent reason code for the dispute.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed.
|
||||
* @property string $reason Reason given by cardholder for dispute. Possible values are <code>bank_cannot_process</code>, <code>check_returned</code>, <code>credit_not_processed</code>, <code>customer_initiated</code>, <code>debit_not_authorized</code>, <code>duplicate</code>, <code>fraudulent</code>, <code>general</code>, <code>incorrect_account_details</code>, <code>insufficient_funds</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Read more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>.
|
||||
* @property string $status Current status of dispute. Possible values are <code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>charge_refunded</code>, <code>won</code>, or <code>lost</code>.
|
||||
*/
|
||||
class Dispute extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'dispute';
|
||||
public const OBJECT_NAME = 'dispute';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process';
|
||||
const REASON_CHECK_RETURNED = 'check_returned';
|
||||
const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed';
|
||||
const REASON_CUSTOMER_INITIATED = 'customer_initiated';
|
||||
const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
const REASON_DUPLICATE = 'duplicate';
|
||||
const REASON_FRAUDULENT = 'fraudulent';
|
||||
const REASON_GENERAL = 'general';
|
||||
const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details';
|
||||
const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received';
|
||||
const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable';
|
||||
const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
|
||||
const REASON_UNRECOGNIZED = 'unrecognized';
|
||||
public const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process';
|
||||
|
||||
const STATUS_CHARGE_REFUNDED = 'charge_refunded';
|
||||
const STATUS_LOST = 'lost';
|
||||
const STATUS_NEEDS_RESPONSE = 'needs_response';
|
||||
const STATUS_UNDER_REVIEW = 'under_review';
|
||||
const STATUS_WARNING_CLOSED = 'warning_closed';
|
||||
const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
|
||||
const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review';
|
||||
const STATUS_WON = 'won';
|
||||
public const REASON_CHECK_RETURNED = 'check_returned';
|
||||
|
||||
public const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed';
|
||||
|
||||
public const REASON_CUSTOMER_INITIATED = 'customer_initiated';
|
||||
|
||||
public const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
|
||||
public const REASON_DUPLICATE = 'duplicate';
|
||||
|
||||
public const REASON_FRAUDULENT = 'fraudulent';
|
||||
|
||||
public const REASON_GENERAL = 'general';
|
||||
|
||||
public const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details';
|
||||
|
||||
public const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
|
||||
public const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received';
|
||||
|
||||
public const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable';
|
||||
|
||||
public const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
|
||||
|
||||
public const REASON_UNRECOGNIZED = 'unrecognized';
|
||||
|
||||
public const STATUS_CHARGE_REFUNDED = 'charge_refunded';
|
||||
|
||||
public const STATUS_LOST = 'lost';
|
||||
|
||||
public const STATUS_NEEDS_RESPONSE = 'needs_response';
|
||||
|
||||
public const STATUS_UNDER_REVIEW = 'under_review';
|
||||
|
||||
public const STATUS_WARNING_CLOSED = 'warning_closed';
|
||||
|
||||
public const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
|
||||
|
||||
public const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review';
|
||||
|
||||
public const STATUS_WON = 'won';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -73,7 +93,7 @@ class Dispute extends ApiResource
|
|||
*/
|
||||
public function close($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/close';
|
||||
$url = $this->instanceUrl() . '/close';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
|
||||
*/
|
||||
class EphemeralKey extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'ephemeral_key';
|
||||
public const OBJECT_NAME = 'ephemeral_key';
|
||||
|
||||
use ApiOperations\Create {
|
||||
create as protected _create;
|
||||
|
|
@ -23,11 +23,11 @@ class EphemeralKey extends ApiResource
|
|||
use ApiOperations\Delete;
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\InvalidArgumentException if stripe_version is missing
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\EphemeralKey the created key
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,39 +1,39 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* Class ErrorObject.
|
||||
*
|
||||
* @property string $charge For card errors, the ID of the failed charge.
|
||||
* @property string $code For some errors that could be handled
|
||||
* programmatically, a short string indicating the error code reported.
|
||||
* @property string $decline_code For card errors resulting from a card issuer
|
||||
* decline, a short string indicating the card issuer's reason for the
|
||||
* decline if they provide one.
|
||||
* @property string $doc_url A URL to more information about the error code
|
||||
* reported.
|
||||
* @property string $message A human-readable message providing more details
|
||||
* about the error. For card errors, these messages can be shown to your
|
||||
* users.
|
||||
* @property string $param If the error is parameter-specific, the parameter
|
||||
* related to the error. For example, you can use this to display a message
|
||||
* near the correct form field.
|
||||
* @property PaymentIntent $payment_intent The PaymentIntent object for errors
|
||||
* returned on a request involving a PaymentIntent.
|
||||
* @property PaymentMethod $payment_method The PaymentMethod object for errors
|
||||
* returned on a request involving a PaymentMethod.
|
||||
* @property string $payment_method_type If the error is specific to the type
|
||||
* of payment method, the payment method type that had a problem. This
|
||||
* field is only populated for invoice-related errors.
|
||||
* @property string $request_log_url A URL to the request log entry in your
|
||||
* dashboard.
|
||||
* @property SetupIntent $setup_intent The SetupIntent object for errors
|
||||
* returned on a request involving a SetupIntent.
|
||||
* @property StripeObject $source The source object for errors returned on a
|
||||
* request involving a source.
|
||||
* @property string $type The type of error returned. One of `api_error`,
|
||||
* `card_error`, `idempotency_error`, or `invalid_request_error`.
|
||||
* @property string $charge For card errors, the ID of the failed charge.
|
||||
* @property string $code For some errors that could be handled
|
||||
* programmatically, a short string indicating the error code reported.
|
||||
* @property string $decline_code For card errors resulting from a card issuer
|
||||
* decline, a short string indicating the card issuer's reason for the
|
||||
* decline if they provide one.
|
||||
* @property string $doc_url A URL to more information about the error code
|
||||
* reported.
|
||||
* @property string $message A human-readable message providing more details
|
||||
* about the error. For card errors, these messages can be shown to your
|
||||
* users.
|
||||
* @property string $param If the error is parameter-specific, the parameter
|
||||
* related to the error. For example, you can use this to display a message
|
||||
* near the correct form field.
|
||||
* @property PaymentIntent $payment_intent The PaymentIntent object for errors
|
||||
* returned on a request involving a PaymentIntent.
|
||||
* @property PaymentMethod $payment_method The PaymentMethod object for errors
|
||||
* returned on a request involving a PaymentMethod.
|
||||
* @property string $payment_method_type If the error is specific to the type
|
||||
* of payment method, the payment method type that had a problem. This
|
||||
* field is only populated for invoice-related errors.
|
||||
* @property string $request_log_url A URL to the request log entry in your
|
||||
* dashboard.
|
||||
* @property SetupIntent $setup_intent The SetupIntent object for errors
|
||||
* returned on a request involving a SetupIntent.
|
||||
* @property StripeObject $source The source object for errors returned on a
|
||||
* request involving a source.
|
||||
* @property string $type The type of error returned. One of `api_error`,
|
||||
* `card_error`, `idempotency_error`, or `invalid_request_error`.
|
||||
*/
|
||||
class ErrorObject extends StripeObject
|
||||
{
|
||||
|
|
@ -42,166 +42,300 @@ class ErrorObject extends StripeObject
|
|||
*
|
||||
* @see https://stripe.com/docs/error-codes
|
||||
*/
|
||||
const CODE_ACCOUNT_COUNTRY_INVALID_ADDRESS = 'account_country_invalid_address';
|
||||
const CODE_ACCOUNT_ERROR_COUNTRY_CHANGE_REQUIRES_ADDITIONAL_STEPS = 'account_error_country_change_requires_additional_steps';
|
||||
const CODE_ACCOUNT_INFORMATION_MISMATCH = 'account_information_mismatch';
|
||||
const CODE_ACCOUNT_INVALID = 'account_invalid';
|
||||
const CODE_ACCOUNT_NUMBER_INVALID = 'account_number_invalid';
|
||||
const CODE_ACSS_DEBIT_SESSION_INCOMPLETE = 'acss_debit_session_incomplete';
|
||||
const CODE_ALIPAY_UPGRADE_REQUIRED = 'alipay_upgrade_required';
|
||||
const CODE_AMOUNT_TOO_LARGE = 'amount_too_large';
|
||||
const CODE_AMOUNT_TOO_SMALL = 'amount_too_small';
|
||||
const CODE_API_KEY_EXPIRED = 'api_key_expired';
|
||||
const CODE_AUTHENTICATION_REQUIRED = 'authentication_required';
|
||||
const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient';
|
||||
const CODE_BANK_ACCOUNT_BAD_ROUTING_NUMBERS = 'bank_account_bad_routing_numbers';
|
||||
const CODE_BANK_ACCOUNT_DECLINED = 'bank_account_declined';
|
||||
const CODE_BANK_ACCOUNT_EXISTS = 'bank_account_exists';
|
||||
const CODE_BANK_ACCOUNT_UNUSABLE = 'bank_account_unusable';
|
||||
const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified';
|
||||
const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed';
|
||||
const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate';
|
||||
const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required';
|
||||
const CODE_CARD_DECLINE_RATE_LIMIT_EXCEEDED = 'card_decline_rate_limit_exceeded';
|
||||
const CODE_CARD_DECLINED = 'card_declined';
|
||||
const CODE_CARDHOLDER_PHONE_NUMBER_REQUIRED = 'cardholder_phone_number_required';
|
||||
const CODE_CHARGE_ALREADY_CAPTURED = 'charge_already_captured';
|
||||
const CODE_CHARGE_ALREADY_REFUNDED = 'charge_already_refunded';
|
||||
const CODE_CHARGE_DISPUTED = 'charge_disputed';
|
||||
const CODE_CHARGE_EXCEEDS_SOURCE_LIMIT = 'charge_exceeds_source_limit';
|
||||
const CODE_CHARGE_EXPIRED_FOR_CAPTURE = 'charge_expired_for_capture';
|
||||
const CODE_CHARGE_INVALID_PARAMETER = 'charge_invalid_parameter';
|
||||
const CODE_CLEARING_CODE_UNSUPPORTED = 'clearing_code_unsupported';
|
||||
const CODE_COUNTRY_CODE_INVALID = 'country_code_invalid';
|
||||
const CODE_COUNTRY_UNSUPPORTED = 'country_unsupported';
|
||||
const CODE_COUPON_EXPIRED = 'coupon_expired';
|
||||
const CODE_CUSTOMER_MAX_PAYMENT_METHODS = 'customer_max_payment_methods';
|
||||
const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions';
|
||||
const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
const CODE_EMAIL_INVALID = 'email_invalid';
|
||||
const CODE_EXPIRED_CARD = 'expired_card';
|
||||
const CODE_IDEMPOTENCY_KEY_IN_USE = 'idempotency_key_in_use';
|
||||
const CODE_INCORRECT_ADDRESS = 'incorrect_address';
|
||||
const CODE_INCORRECT_CVC = 'incorrect_cvc';
|
||||
const CODE_INCORRECT_NUMBER = 'incorrect_number';
|
||||
const CODE_INCORRECT_ZIP = 'incorrect_zip';
|
||||
const CODE_INSTANT_PAYOUTS_LIMIT_EXCEEDED = 'instant_payouts_limit_exceeded';
|
||||
const CODE_INSTANT_PAYOUTS_UNSUPPORTED = 'instant_payouts_unsupported';
|
||||
const CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
const CODE_INTENT_INVALID_STATE = 'intent_invalid_state';
|
||||
const CODE_INTENT_VERIFICATION_METHOD_MISSING = 'intent_verification_method_missing';
|
||||
const CODE_INVALID_CARD_TYPE = 'invalid_card_type';
|
||||
const CODE_INVALID_CHARACTERS = 'invalid_characters';
|
||||
const CODE_INVALID_CHARGE_AMOUNT = 'invalid_charge_amount';
|
||||
const CODE_INVALID_CVC = 'invalid_cvc';
|
||||
const CODE_INVALID_EXPIRY_MONTH = 'invalid_expiry_month';
|
||||
const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
|
||||
const CODE_INVALID_NUMBER = 'invalid_number';
|
||||
const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage';
|
||||
const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items';
|
||||
const CODE_INVOICE_NO_PAYMENT_METHOD_TYPES = 'invoice_no_payment_method_types';
|
||||
const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items';
|
||||
const CODE_INVOICE_NOT_EDITABLE = 'invoice_not_editable';
|
||||
const CODE_INVOICE_ON_BEHALF_OF_NOT_EDITABLE = 'invoice_on_behalf_of_not_editable';
|
||||
const CODE_INVOICE_PAYMENT_INTENT_REQUIRES_ACTION = 'invoice_payment_intent_requires_action';
|
||||
const CODE_INVOICE_UPCOMING_NONE = 'invoice_upcoming_none';
|
||||
const CODE_LIVEMODE_MISMATCH = 'livemode_mismatch';
|
||||
const CODE_LOCK_TIMEOUT = 'lock_timeout';
|
||||
const CODE_MISSING = 'missing';
|
||||
const CODE_NO_ACCOUNT = 'no_account';
|
||||
const CODE_NOT_ALLOWED_ON_STANDARD_ACCOUNT = 'not_allowed_on_standard_account';
|
||||
const CODE_OUT_OF_INVENTORY = 'out_of_inventory';
|
||||
const CODE_PARAMETER_INVALID_EMPTY = 'parameter_invalid_empty';
|
||||
const CODE_PARAMETER_INVALID_INTEGER = 'parameter_invalid_integer';
|
||||
const CODE_PARAMETER_INVALID_STRING_BLANK = 'parameter_invalid_string_blank';
|
||||
const CODE_PARAMETER_INVALID_STRING_EMPTY = 'parameter_invalid_string_empty';
|
||||
const CODE_PARAMETER_MISSING = 'parameter_missing';
|
||||
const CODE_PARAMETER_UNKNOWN = 'parameter_unknown';
|
||||
const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive';
|
||||
const CODE_PAYMENT_INTENT_ACTION_REQUIRED = 'payment_intent_action_required';
|
||||
const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure';
|
||||
const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method';
|
||||
const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter';
|
||||
const CODE_PAYMENT_INTENT_KONBINI_REJECTED_CONFIRMATION_NUMBER = 'payment_intent_konbini_rejected_confirmation_number';
|
||||
const CODE_PAYMENT_INTENT_MANDATE_INVALID = 'payment_intent_mandate_invalid';
|
||||
const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_EXPIRED = 'payment_intent_payment_attempt_expired';
|
||||
const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_FAILED = 'payment_intent_payment_attempt_failed';
|
||||
const CODE_PAYMENT_INTENT_UNEXPECTED_STATE = 'payment_intent_unexpected_state';
|
||||
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_ALREADY_VERIFIED = 'payment_method_bank_account_already_verified';
|
||||
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked';
|
||||
const CODE_PAYMENT_METHOD_BILLING_DETAILS_ADDRESS_MISSING = 'payment_method_billing_details_address_missing';
|
||||
const CODE_PAYMENT_METHOD_CURRENCY_MISMATCH = 'payment_method_currency_mismatch';
|
||||
const CODE_PAYMENT_METHOD_INVALID_PARAMETER = 'payment_method_invalid_parameter';
|
||||
const CODE_PAYMENT_METHOD_INVALID_PARAMETER_TESTMODE = 'payment_method_invalid_parameter_testmode';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_FAILED = 'payment_method_microdeposit_failed';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_INVALID = 'payment_method_microdeposit_verification_amounts_invalid';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_MISMATCH = 'payment_method_microdeposit_verification_amounts_mismatch';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_ATTEMPTS_EXCEEDED = 'payment_method_microdeposit_verification_attempts_exceeded';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_DESCRIPTOR_CODE_MISMATCH = 'payment_method_microdeposit_verification_descriptor_code_mismatch';
|
||||
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_TIMEOUT = 'payment_method_microdeposit_verification_timeout';
|
||||
const CODE_PAYMENT_METHOD_PROVIDER_DECLINE = 'payment_method_provider_decline';
|
||||
const CODE_PAYMENT_METHOD_PROVIDER_TIMEOUT = 'payment_method_provider_timeout';
|
||||
const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated';
|
||||
const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state';
|
||||
const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type';
|
||||
const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed';
|
||||
const CODE_PLATFORM_ACCOUNT_REQUIRED = 'platform_account_required';
|
||||
const CODE_PLATFORM_API_KEY_EXPIRED = 'platform_api_key_expired';
|
||||
const CODE_POSTAL_CODE_INVALID = 'postal_code_invalid';
|
||||
const CODE_PROCESSING_ERROR = 'processing_error';
|
||||
const CODE_PRODUCT_INACTIVE = 'product_inactive';
|
||||
const CODE_RATE_LIMIT = 'rate_limit';
|
||||
const CODE_REFER_TO_CUSTOMER = 'refer_to_customer';
|
||||
const CODE_REFUND_DISPUTED_PAYMENT = 'refund_disputed_payment';
|
||||
const CODE_RESOURCE_ALREADY_EXISTS = 'resource_already_exists';
|
||||
const CODE_RESOURCE_MISSING = 'resource_missing';
|
||||
const CODE_RETURN_INTENT_ALREADY_PROCESSED = 'return_intent_already_processed';
|
||||
const CODE_ROUTING_NUMBER_INVALID = 'routing_number_invalid';
|
||||
const CODE_SECRET_KEY_REQUIRED = 'secret_key_required';
|
||||
const CODE_SEPA_UNSUPPORTED_ACCOUNT = 'sepa_unsupported_account';
|
||||
const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed';
|
||||
const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure';
|
||||
const CODE_SETUP_INTENT_INVALID_PARAMETER = 'setup_intent_invalid_parameter';
|
||||
const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired';
|
||||
const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state';
|
||||
const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed';
|
||||
const CODE_SKU_INACTIVE = 'sku_inactive';
|
||||
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
|
||||
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
|
||||
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
|
||||
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
|
||||
const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only';
|
||||
const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported';
|
||||
const CODE_TOKEN_ALREADY_USED = 'token_already_used';
|
||||
const CODE_TOKEN_IN_USE = 'token_in_use';
|
||||
const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch';
|
||||
const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed';
|
||||
const CODE_URL_INVALID = 'url_invalid';
|
||||
public const CODE_ACCOUNT_COUNTRY_INVALID_ADDRESS = 'account_country_invalid_address';
|
||||
|
||||
public const CODE_ACCOUNT_ERROR_COUNTRY_CHANGE_REQUIRES_ADDITIONAL_STEPS = 'account_error_country_change_requires_additional_steps';
|
||||
|
||||
public const CODE_ACCOUNT_INFORMATION_MISMATCH = 'account_information_mismatch';
|
||||
|
||||
public const CODE_ACCOUNT_INVALID = 'account_invalid';
|
||||
|
||||
public const CODE_ACCOUNT_NUMBER_INVALID = 'account_number_invalid';
|
||||
|
||||
public const CODE_ACSS_DEBIT_SESSION_INCOMPLETE = 'acss_debit_session_incomplete';
|
||||
|
||||
public const CODE_ALIPAY_UPGRADE_REQUIRED = 'alipay_upgrade_required';
|
||||
|
||||
public const CODE_AMOUNT_TOO_LARGE = 'amount_too_large';
|
||||
|
||||
public const CODE_AMOUNT_TOO_SMALL = 'amount_too_small';
|
||||
|
||||
public const CODE_API_KEY_EXPIRED = 'api_key_expired';
|
||||
|
||||
public const CODE_AUTHENTICATION_REQUIRED = 'authentication_required';
|
||||
|
||||
public const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_BAD_ROUTING_NUMBERS = 'bank_account_bad_routing_numbers';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_DECLINED = 'bank_account_declined';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_EXISTS = 'bank_account_exists';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_UNUSABLE = 'bank_account_unusable';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified';
|
||||
|
||||
public const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed';
|
||||
|
||||
public const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate';
|
||||
|
||||
public const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required';
|
||||
|
||||
public const CODE_CARD_DECLINE_RATE_LIMIT_EXCEEDED = 'card_decline_rate_limit_exceeded';
|
||||
|
||||
public const CODE_CARD_DECLINED = 'card_declined';
|
||||
|
||||
public const CODE_CARDHOLDER_PHONE_NUMBER_REQUIRED = 'cardholder_phone_number_required';
|
||||
|
||||
public const CODE_CHARGE_ALREADY_CAPTURED = 'charge_already_captured';
|
||||
|
||||
public const CODE_CHARGE_ALREADY_REFUNDED = 'charge_already_refunded';
|
||||
|
||||
public const CODE_CHARGE_DISPUTED = 'charge_disputed';
|
||||
|
||||
public const CODE_CHARGE_EXCEEDS_SOURCE_LIMIT = 'charge_exceeds_source_limit';
|
||||
|
||||
public const CODE_CHARGE_EXPIRED_FOR_CAPTURE = 'charge_expired_for_capture';
|
||||
|
||||
public const CODE_CHARGE_INVALID_PARAMETER = 'charge_invalid_parameter';
|
||||
|
||||
public const CODE_CLEARING_CODE_UNSUPPORTED = 'clearing_code_unsupported';
|
||||
|
||||
public const CODE_COUNTRY_CODE_INVALID = 'country_code_invalid';
|
||||
|
||||
public const CODE_COUNTRY_UNSUPPORTED = 'country_unsupported';
|
||||
|
||||
public const CODE_COUPON_EXPIRED = 'coupon_expired';
|
||||
|
||||
public const CODE_CUSTOMER_MAX_PAYMENT_METHODS = 'customer_max_payment_methods';
|
||||
|
||||
public const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions';
|
||||
|
||||
public const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
|
||||
public const CODE_EMAIL_INVALID = 'email_invalid';
|
||||
|
||||
public const CODE_EXPIRED_CARD = 'expired_card';
|
||||
|
||||
public const CODE_IDEMPOTENCY_KEY_IN_USE = 'idempotency_key_in_use';
|
||||
|
||||
public const CODE_INCORRECT_ADDRESS = 'incorrect_address';
|
||||
|
||||
public const CODE_INCORRECT_CVC = 'incorrect_cvc';
|
||||
|
||||
public const CODE_INCORRECT_NUMBER = 'incorrect_number';
|
||||
|
||||
public const CODE_INCORRECT_ZIP = 'incorrect_zip';
|
||||
|
||||
public const CODE_INSTANT_PAYOUTS_LIMIT_EXCEEDED = 'instant_payouts_limit_exceeded';
|
||||
|
||||
public const CODE_INSTANT_PAYOUTS_UNSUPPORTED = 'instant_payouts_unsupported';
|
||||
|
||||
public const CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
|
||||
public const CODE_INTENT_INVALID_STATE = 'intent_invalid_state';
|
||||
|
||||
public const CODE_INTENT_VERIFICATION_METHOD_MISSING = 'intent_verification_method_missing';
|
||||
|
||||
public const CODE_INVALID_CARD_TYPE = 'invalid_card_type';
|
||||
|
||||
public const CODE_INVALID_CHARACTERS = 'invalid_characters';
|
||||
|
||||
public const CODE_INVALID_CHARGE_AMOUNT = 'invalid_charge_amount';
|
||||
|
||||
public const CODE_INVALID_CVC = 'invalid_cvc';
|
||||
|
||||
public const CODE_INVALID_EXPIRY_MONTH = 'invalid_expiry_month';
|
||||
|
||||
public const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
|
||||
|
||||
public const CODE_INVALID_NUMBER = 'invalid_number';
|
||||
|
||||
public const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage';
|
||||
|
||||
public const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items';
|
||||
|
||||
public const CODE_INVOICE_NO_PAYMENT_METHOD_TYPES = 'invoice_no_payment_method_types';
|
||||
|
||||
public const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items';
|
||||
|
||||
public const CODE_INVOICE_NOT_EDITABLE = 'invoice_not_editable';
|
||||
|
||||
public const CODE_INVOICE_ON_BEHALF_OF_NOT_EDITABLE = 'invoice_on_behalf_of_not_editable';
|
||||
|
||||
public const CODE_INVOICE_PAYMENT_INTENT_REQUIRES_ACTION = 'invoice_payment_intent_requires_action';
|
||||
|
||||
public const CODE_INVOICE_UPCOMING_NONE = 'invoice_upcoming_none';
|
||||
|
||||
public const CODE_LIVEMODE_MISMATCH = 'livemode_mismatch';
|
||||
|
||||
public const CODE_LOCK_TIMEOUT = 'lock_timeout';
|
||||
|
||||
public const CODE_MISSING = 'missing';
|
||||
|
||||
public const CODE_NO_ACCOUNT = 'no_account';
|
||||
|
||||
public const CODE_NOT_ALLOWED_ON_STANDARD_ACCOUNT = 'not_allowed_on_standard_account';
|
||||
|
||||
public const CODE_OUT_OF_INVENTORY = 'out_of_inventory';
|
||||
|
||||
public const CODE_PARAMETER_INVALID_EMPTY = 'parameter_invalid_empty';
|
||||
|
||||
public const CODE_PARAMETER_INVALID_INTEGER = 'parameter_invalid_integer';
|
||||
|
||||
public const CODE_PARAMETER_INVALID_STRING_BLANK = 'parameter_invalid_string_blank';
|
||||
|
||||
public const CODE_PARAMETER_INVALID_STRING_EMPTY = 'parameter_invalid_string_empty';
|
||||
|
||||
public const CODE_PARAMETER_MISSING = 'parameter_missing';
|
||||
|
||||
public const CODE_PARAMETER_UNKNOWN = 'parameter_unknown';
|
||||
|
||||
public const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_ACTION_REQUIRED = 'payment_intent_action_required';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_KONBINI_REJECTED_CONFIRMATION_NUMBER = 'payment_intent_konbini_rejected_confirmation_number';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_MANDATE_INVALID = 'payment_intent_mandate_invalid';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_EXPIRED = 'payment_intent_payment_attempt_expired';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_FAILED = 'payment_intent_payment_attempt_failed';
|
||||
|
||||
public const CODE_PAYMENT_INTENT_UNEXPECTED_STATE = 'payment_intent_unexpected_state';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_BANK_ACCOUNT_ALREADY_VERIFIED = 'payment_method_bank_account_already_verified';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_BILLING_DETAILS_ADDRESS_MISSING = 'payment_method_billing_details_address_missing';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_CURRENCY_MISMATCH = 'payment_method_currency_mismatch';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_INVALID_PARAMETER = 'payment_method_invalid_parameter';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_INVALID_PARAMETER_TESTMODE = 'payment_method_invalid_parameter_testmode';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_FAILED = 'payment_method_microdeposit_failed';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_INVALID = 'payment_method_microdeposit_verification_amounts_invalid';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_MISMATCH = 'payment_method_microdeposit_verification_amounts_mismatch';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_ATTEMPTS_EXCEEDED = 'payment_method_microdeposit_verification_attempts_exceeded';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_DESCRIPTOR_CODE_MISMATCH = 'payment_method_microdeposit_verification_descriptor_code_mismatch';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_TIMEOUT = 'payment_method_microdeposit_verification_timeout';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_PROVIDER_DECLINE = 'payment_method_provider_decline';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_PROVIDER_TIMEOUT = 'payment_method_provider_timeout';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state';
|
||||
|
||||
public const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type';
|
||||
|
||||
public const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed';
|
||||
|
||||
public const CODE_PLATFORM_ACCOUNT_REQUIRED = 'platform_account_required';
|
||||
|
||||
public const CODE_PLATFORM_API_KEY_EXPIRED = 'platform_api_key_expired';
|
||||
|
||||
public const CODE_POSTAL_CODE_INVALID = 'postal_code_invalid';
|
||||
|
||||
public const CODE_PROCESSING_ERROR = 'processing_error';
|
||||
|
||||
public const CODE_PRODUCT_INACTIVE = 'product_inactive';
|
||||
|
||||
public const CODE_RATE_LIMIT = 'rate_limit';
|
||||
|
||||
public const CODE_REFER_TO_CUSTOMER = 'refer_to_customer';
|
||||
|
||||
public const CODE_REFUND_DISPUTED_PAYMENT = 'refund_disputed_payment';
|
||||
|
||||
public const CODE_RESOURCE_ALREADY_EXISTS = 'resource_already_exists';
|
||||
|
||||
public const CODE_RESOURCE_MISSING = 'resource_missing';
|
||||
|
||||
public const CODE_RETURN_INTENT_ALREADY_PROCESSED = 'return_intent_already_processed';
|
||||
|
||||
public const CODE_ROUTING_NUMBER_INVALID = 'routing_number_invalid';
|
||||
|
||||
public const CODE_SECRET_KEY_REQUIRED = 'secret_key_required';
|
||||
|
||||
public const CODE_SEPA_UNSUPPORTED_ACCOUNT = 'sepa_unsupported_account';
|
||||
|
||||
public const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed';
|
||||
|
||||
public const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure';
|
||||
|
||||
public const CODE_SETUP_INTENT_INVALID_PARAMETER = 'setup_intent_invalid_parameter';
|
||||
|
||||
public const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired';
|
||||
|
||||
public const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state';
|
||||
|
||||
public const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed';
|
||||
|
||||
public const CODE_SKU_INACTIVE = 'sku_inactive';
|
||||
|
||||
public const CODE_STATE_UNSUPPORTED = 'state_unsupported';
|
||||
|
||||
public const CODE_TAX_ID_INVALID = 'tax_id_invalid';
|
||||
|
||||
public const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
|
||||
|
||||
public const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
|
||||
|
||||
public const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only';
|
||||
|
||||
public const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported';
|
||||
|
||||
public const CODE_TOKEN_ALREADY_USED = 'token_already_used';
|
||||
|
||||
public const CODE_TOKEN_IN_USE = 'token_in_use';
|
||||
|
||||
public const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch';
|
||||
|
||||
public const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed';
|
||||
|
||||
public const CODE_URL_INVALID = 'url_invalid';
|
||||
|
||||
/**
|
||||
* Refreshes this object using the provided values.
|
||||
*
|
||||
* @param array $values
|
||||
* @param array $values
|
||||
* @param null|array|string|Util\RequestOptions $opts
|
||||
* @param bool $partial defaults to false
|
||||
* @param bool $partial defaults to false
|
||||
*/
|
||||
public function refreshFrom($values, $opts, $partial = false)
|
||||
public function refreshFrom($values, $opts, $partial = false) : void
|
||||
{
|
||||
// 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([
|
||||
'charge' => null,
|
||||
'code' => null,
|
||||
'decline_code' => null,
|
||||
'doc_url' => null,
|
||||
'message' => null,
|
||||
'param' => null,
|
||||
'charge' => null,
|
||||
'code' => null,
|
||||
'decline_code' => null,
|
||||
'doc_url' => null,
|
||||
'message' => null,
|
||||
'param' => null,
|
||||
'payment_intent' => null,
|
||||
'payment_method' => null,
|
||||
'setup_intent' => null,
|
||||
'source' => null,
|
||||
'type' => null,
|
||||
'setup_intent' => null,
|
||||
'source' => null,
|
||||
'type' => null,
|
||||
], $values);
|
||||
parent::refreshFrom($values, $opts, $partial);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -42,239 +42,455 @@ namespace Stripe;
|
|||
* This class includes constants for the possible string representations of
|
||||
* event types. See https://stripe.com/docs/api#event_types for more details.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $account The connected account that originated the event.
|
||||
* @property null|string $api_version The Stripe API version used to render <code>data</code>. <em>Note: This property is populated only for events on or after October 31, 2014</em>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $data
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
|
||||
* @property null|\Stripe\StripeObject $request Information on the API request that instigated the event.
|
||||
* @property string $type Description of the event (e.g., <code>invoice.created</code> or <code>charge.refunded</code>).
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $account The connected account that originated the event.
|
||||
* @property null|string $api_version The Stripe API version used to render <code>data</code>. <em>Note: This property is populated only for events on or after October 31, 2014</em>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $data
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
|
||||
* @property null|\Stripe\StripeObject $request Information on the API request that instigated the event.
|
||||
* @property string $type Description of the event (e.g., <code>invoice.created</code> or <code>charge.refunded</code>).
|
||||
*/
|
||||
class Event extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'event';
|
||||
public const OBJECT_NAME = 'event';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
||||
const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
|
||||
const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
|
||||
const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
|
||||
const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
|
||||
const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
|
||||
const ACCOUNT_UPDATED = 'account.updated';
|
||||
const APPLICATION_FEE_CREATED = 'application_fee.created';
|
||||
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
||||
const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
||||
const BALANCE_AVAILABLE = 'balance.available';
|
||||
const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
|
||||
const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
|
||||
const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
|
||||
const CAPABILITY_UPDATED = 'capability.updated';
|
||||
const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
|
||||
const CHARGE_CAPTURED = 'charge.captured';
|
||||
const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
|
||||
const CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
|
||||
const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
|
||||
const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
|
||||
const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
|
||||
const CHARGE_EXPIRED = 'charge.expired';
|
||||
const CHARGE_FAILED = 'charge.failed';
|
||||
const CHARGE_PENDING = 'charge.pending';
|
||||
const CHARGE_REFUND_UPDATED = 'charge.refund.updated';
|
||||
const CHARGE_REFUNDED = 'charge.refunded';
|
||||
const CHARGE_SUCCEEDED = 'charge.succeeded';
|
||||
const CHARGE_UPDATED = 'charge.updated';
|
||||
const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
|
||||
const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
|
||||
const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
|
||||
const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
|
||||
const COUPON_CREATED = 'coupon.created';
|
||||
const COUPON_DELETED = 'coupon.deleted';
|
||||
const COUPON_UPDATED = 'coupon.updated';
|
||||
const CREDIT_NOTE_CREATED = 'credit_note.created';
|
||||
const CREDIT_NOTE_UPDATED = 'credit_note.updated';
|
||||
const CREDIT_NOTE_VOIDED = 'credit_note.voided';
|
||||
const CUSTOMER_CREATED = 'customer.created';
|
||||
const CUSTOMER_DELETED = 'customer.deleted';
|
||||
const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
|
||||
const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
|
||||
const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
|
||||
const CUSTOMER_SOURCE_CREATED = 'customer.source.created';
|
||||
const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
|
||||
const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
|
||||
const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
|
||||
const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
|
||||
const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
|
||||
const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
|
||||
const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
|
||||
const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
|
||||
const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
|
||||
const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
|
||||
const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
|
||||
const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
|
||||
const CUSTOMER_UPDATED = 'customer.updated';
|
||||
const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created';
|
||||
const FILE_CREATED = 'file.created';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
|
||||
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
|
||||
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
|
||||
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
|
||||
const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
|
||||
const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
|
||||
const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
|
||||
const INVOICE_CREATED = 'invoice.created';
|
||||
const INVOICE_DELETED = 'invoice.deleted';
|
||||
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
|
||||
const INVOICE_FINALIZED = 'invoice.finalized';
|
||||
const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
|
||||
const INVOICE_PAID = 'invoice.paid';
|
||||
const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
||||
const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
||||
const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
||||
const INVOICE_SENT = 'invoice.sent';
|
||||
const INVOICE_UPCOMING = 'invoice.upcoming';
|
||||
const INVOICE_UPDATED = 'invoice.updated';
|
||||
const INVOICE_VOIDED = 'invoice.voided';
|
||||
const INVOICEITEM_CREATED = 'invoiceitem.created';
|
||||
const INVOICEITEM_DELETED = 'invoiceitem.deleted';
|
||||
const INVOICEITEM_UPDATED = 'invoiceitem.updated';
|
||||
const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
|
||||
const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
|
||||
const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
|
||||
const ISSUING_CARD_CREATED = 'issuing_card.created';
|
||||
const ISSUING_CARD_UPDATED = 'issuing_card.updated';
|
||||
const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
|
||||
const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
|
||||
const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
|
||||
const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
|
||||
const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
|
||||
const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
|
||||
const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
|
||||
const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
|
||||
const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
|
||||
const MANDATE_UPDATED = 'mandate.updated';
|
||||
const ORDER_CREATED = 'order.created';
|
||||
const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
|
||||
const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
|
||||
const PAYMENT_INTENT_CREATED = 'payment_intent.created';
|
||||
const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
|
||||
const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
|
||||
const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
|
||||
const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
|
||||
const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
|
||||
const PAYMENT_LINK_CREATED = 'payment_link.created';
|
||||
const PAYMENT_LINK_UPDATED = 'payment_link.updated';
|
||||
const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
|
||||
const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
|
||||
const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
|
||||
const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
|
||||
const PAYOUT_CANCELED = 'payout.canceled';
|
||||
const PAYOUT_CREATED = 'payout.created';
|
||||
const PAYOUT_FAILED = 'payout.failed';
|
||||
const PAYOUT_PAID = 'payout.paid';
|
||||
const PAYOUT_UPDATED = 'payout.updated';
|
||||
const PERSON_CREATED = 'person.created';
|
||||
const PERSON_DELETED = 'person.deleted';
|
||||
const PERSON_UPDATED = 'person.updated';
|
||||
const PLAN_CREATED = 'plan.created';
|
||||
const PLAN_DELETED = 'plan.deleted';
|
||||
const PLAN_UPDATED = 'plan.updated';
|
||||
const PRICE_CREATED = 'price.created';
|
||||
const PRICE_DELETED = 'price.deleted';
|
||||
const PRICE_UPDATED = 'price.updated';
|
||||
const PRODUCT_CREATED = 'product.created';
|
||||
const PRODUCT_DELETED = 'product.deleted';
|
||||
const PRODUCT_UPDATED = 'product.updated';
|
||||
const PROMOTION_CODE_CREATED = 'promotion_code.created';
|
||||
const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
|
||||
const QUOTE_ACCEPTED = 'quote.accepted';
|
||||
const QUOTE_CANCELED = 'quote.canceled';
|
||||
const QUOTE_CREATED = 'quote.created';
|
||||
const QUOTE_FINALIZED = 'quote.finalized';
|
||||
const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
|
||||
const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
|
||||
const RECIPIENT_CREATED = 'recipient.created';
|
||||
const RECIPIENT_DELETED = 'recipient.deleted';
|
||||
const RECIPIENT_UPDATED = 'recipient.updated';
|
||||
const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
|
||||
const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
|
||||
const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
|
||||
const REVIEW_CLOSED = 'review.closed';
|
||||
const REVIEW_OPENED = 'review.opened';
|
||||
const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
|
||||
const SETUP_INTENT_CREATED = 'setup_intent.created';
|
||||
const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
|
||||
const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
|
||||
const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
|
||||
const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
|
||||
const SKU_CREATED = 'sku.created';
|
||||
const SKU_DELETED = 'sku.deleted';
|
||||
const SKU_UPDATED = 'sku.updated';
|
||||
const SOURCE_CANCELED = 'source.canceled';
|
||||
const SOURCE_CHARGEABLE = 'source.chargeable';
|
||||
const SOURCE_FAILED = 'source.failed';
|
||||
const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
|
||||
const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
|
||||
const SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
|
||||
const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
|
||||
const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
|
||||
const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
|
||||
const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
|
||||
const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
|
||||
const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
|
||||
const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
|
||||
const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
|
||||
const TAX_RATE_CREATED = 'tax_rate.created';
|
||||
const TAX_RATE_UPDATED = 'tax_rate.updated';
|
||||
const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
|
||||
const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
|
||||
const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
|
||||
const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
|
||||
const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
|
||||
const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
|
||||
const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
|
||||
const TOPUP_CANCELED = 'topup.canceled';
|
||||
const TOPUP_CREATED = 'topup.created';
|
||||
const TOPUP_FAILED = 'topup.failed';
|
||||
const TOPUP_REVERSED = 'topup.reversed';
|
||||
const TOPUP_SUCCEEDED = 'topup.succeeded';
|
||||
const TRANSFER_CREATED = 'transfer.created';
|
||||
const TRANSFER_REVERSED = 'transfer.reversed';
|
||||
const TRANSFER_UPDATED = 'transfer.updated';
|
||||
const TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
|
||||
const TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
|
||||
const TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
|
||||
const TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
|
||||
const TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
|
||||
const TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
|
||||
const TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
|
||||
const TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
|
||||
const TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
|
||||
const TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
|
||||
const TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
|
||||
const TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
|
||||
const TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
|
||||
const TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
|
||||
const TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
|
||||
const TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
|
||||
const TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
|
||||
const TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
|
||||
const TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
|
||||
const TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
|
||||
const TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
|
||||
const TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
|
||||
const TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
|
||||
const TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
|
||||
const TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
|
||||
const TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
|
||||
const TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
|
||||
const TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
|
||||
public const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
|
||||
|
||||
public const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
|
||||
|
||||
public const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
|
||||
|
||||
public const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
|
||||
|
||||
public const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
|
||||
|
||||
public const ACCOUNT_UPDATED = 'account.updated';
|
||||
|
||||
public const APPLICATION_FEE_CREATED = 'application_fee.created';
|
||||
|
||||
public const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
||||
|
||||
public const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
||||
|
||||
public const BALANCE_AVAILABLE = 'balance.available';
|
||||
|
||||
public const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
|
||||
|
||||
public const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
|
||||
|
||||
public const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
|
||||
|
||||
public const CAPABILITY_UPDATED = 'capability.updated';
|
||||
|
||||
public const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
|
||||
|
||||
public const CHARGE_CAPTURED = 'charge.captured';
|
||||
|
||||
public const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
|
||||
|
||||
public const CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
|
||||
|
||||
public const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
|
||||
|
||||
public const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
|
||||
|
||||
public const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
|
||||
|
||||
public const CHARGE_EXPIRED = 'charge.expired';
|
||||
|
||||
public const CHARGE_FAILED = 'charge.failed';
|
||||
|
||||
public const CHARGE_PENDING = 'charge.pending';
|
||||
|
||||
public const CHARGE_REFUND_UPDATED = 'charge.refund.updated';
|
||||
|
||||
public const CHARGE_REFUNDED = 'charge.refunded';
|
||||
|
||||
public const CHARGE_SUCCEEDED = 'charge.succeeded';
|
||||
|
||||
public const CHARGE_UPDATED = 'charge.updated';
|
||||
|
||||
public const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
|
||||
|
||||
public const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
|
||||
|
||||
public const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
|
||||
|
||||
public const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
|
||||
|
||||
public const COUPON_CREATED = 'coupon.created';
|
||||
|
||||
public const COUPON_DELETED = 'coupon.deleted';
|
||||
|
||||
public const COUPON_UPDATED = 'coupon.updated';
|
||||
|
||||
public const CREDIT_NOTE_CREATED = 'credit_note.created';
|
||||
|
||||
public const CREDIT_NOTE_UPDATED = 'credit_note.updated';
|
||||
|
||||
public const CREDIT_NOTE_VOIDED = 'credit_note.voided';
|
||||
|
||||
public const CUSTOMER_CREATED = 'customer.created';
|
||||
|
||||
public const CUSTOMER_DELETED = 'customer.deleted';
|
||||
|
||||
public const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
|
||||
|
||||
public const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
|
||||
|
||||
public const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
|
||||
|
||||
public const CUSTOMER_SOURCE_CREATED = 'customer.source.created';
|
||||
|
||||
public const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
|
||||
|
||||
public const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
|
||||
|
||||
public const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
|
||||
|
||||
public const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
|
||||
|
||||
public const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
|
||||
|
||||
public const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
|
||||
|
||||
public const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
|
||||
|
||||
public const CUSTOMER_UPDATED = 'customer.updated';
|
||||
|
||||
public const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created';
|
||||
|
||||
public const FILE_CREATED = 'file.created';
|
||||
|
||||
public const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
|
||||
|
||||
public const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
|
||||
|
||||
public const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
|
||||
|
||||
public const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
|
||||
|
||||
public const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
|
||||
|
||||
public const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
|
||||
|
||||
public const INVOICE_CREATED = 'invoice.created';
|
||||
|
||||
public const INVOICE_DELETED = 'invoice.deleted';
|
||||
|
||||
public const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
|
||||
|
||||
public const INVOICE_FINALIZED = 'invoice.finalized';
|
||||
|
||||
public const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
|
||||
|
||||
public const INVOICE_PAID = 'invoice.paid';
|
||||
|
||||
public const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
||||
|
||||
public const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
||||
|
||||
public const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
||||
|
||||
public const INVOICE_SENT = 'invoice.sent';
|
||||
|
||||
public const INVOICE_UPCOMING = 'invoice.upcoming';
|
||||
|
||||
public const INVOICE_UPDATED = 'invoice.updated';
|
||||
|
||||
public const INVOICE_VOIDED = 'invoice.voided';
|
||||
|
||||
public const INVOICEITEM_CREATED = 'invoiceitem.created';
|
||||
|
||||
public const INVOICEITEM_DELETED = 'invoiceitem.deleted';
|
||||
|
||||
public const INVOICEITEM_UPDATED = 'invoiceitem.updated';
|
||||
|
||||
public const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
|
||||
|
||||
public const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
|
||||
|
||||
public const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
|
||||
|
||||
public const ISSUING_CARD_CREATED = 'issuing_card.created';
|
||||
|
||||
public const ISSUING_CARD_UPDATED = 'issuing_card.updated';
|
||||
|
||||
public const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
|
||||
|
||||
public const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
|
||||
|
||||
public const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
|
||||
|
||||
public const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
|
||||
|
||||
public const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
|
||||
|
||||
public const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
|
||||
|
||||
public const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
|
||||
|
||||
public const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
|
||||
|
||||
public const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
|
||||
|
||||
public const MANDATE_UPDATED = 'mandate.updated';
|
||||
|
||||
public const ORDER_CREATED = 'order.created';
|
||||
|
||||
public const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
|
||||
|
||||
public const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
|
||||
|
||||
public const PAYMENT_INTENT_CREATED = 'payment_intent.created';
|
||||
|
||||
public const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
|
||||
|
||||
public const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
|
||||
|
||||
public const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
|
||||
|
||||
public const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
|
||||
|
||||
public const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
|
||||
|
||||
public const PAYMENT_LINK_CREATED = 'payment_link.created';
|
||||
|
||||
public const PAYMENT_LINK_UPDATED = 'payment_link.updated';
|
||||
|
||||
public const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
|
||||
|
||||
public const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
|
||||
|
||||
public const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
|
||||
|
||||
public const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
|
||||
|
||||
public const PAYOUT_CANCELED = 'payout.canceled';
|
||||
|
||||
public const PAYOUT_CREATED = 'payout.created';
|
||||
|
||||
public const PAYOUT_FAILED = 'payout.failed';
|
||||
|
||||
public const PAYOUT_PAID = 'payout.paid';
|
||||
|
||||
public const PAYOUT_UPDATED = 'payout.updated';
|
||||
|
||||
public const PERSON_CREATED = 'person.created';
|
||||
|
||||
public const PERSON_DELETED = 'person.deleted';
|
||||
|
||||
public const PERSON_UPDATED = 'person.updated';
|
||||
|
||||
public const PLAN_CREATED = 'plan.created';
|
||||
|
||||
public const PLAN_DELETED = 'plan.deleted';
|
||||
|
||||
public const PLAN_UPDATED = 'plan.updated';
|
||||
|
||||
public const PRICE_CREATED = 'price.created';
|
||||
|
||||
public const PRICE_DELETED = 'price.deleted';
|
||||
|
||||
public const PRICE_UPDATED = 'price.updated';
|
||||
|
||||
public const PRODUCT_CREATED = 'product.created';
|
||||
|
||||
public const PRODUCT_DELETED = 'product.deleted';
|
||||
|
||||
public const PRODUCT_UPDATED = 'product.updated';
|
||||
|
||||
public const PROMOTION_CODE_CREATED = 'promotion_code.created';
|
||||
|
||||
public const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
|
||||
|
||||
public const QUOTE_ACCEPTED = 'quote.accepted';
|
||||
|
||||
public const QUOTE_CANCELED = 'quote.canceled';
|
||||
|
||||
public const QUOTE_CREATED = 'quote.created';
|
||||
|
||||
public const QUOTE_FINALIZED = 'quote.finalized';
|
||||
|
||||
public const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
|
||||
|
||||
public const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
|
||||
|
||||
public const RECIPIENT_CREATED = 'recipient.created';
|
||||
|
||||
public const RECIPIENT_DELETED = 'recipient.deleted';
|
||||
|
||||
public const RECIPIENT_UPDATED = 'recipient.updated';
|
||||
|
||||
public const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
|
||||
|
||||
public const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
|
||||
|
||||
public const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
|
||||
|
||||
public const REVIEW_CLOSED = 'review.closed';
|
||||
|
||||
public const REVIEW_OPENED = 'review.opened';
|
||||
|
||||
public const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
|
||||
|
||||
public const SETUP_INTENT_CREATED = 'setup_intent.created';
|
||||
|
||||
public const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
|
||||
|
||||
public const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
|
||||
|
||||
public const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
|
||||
|
||||
public const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
|
||||
|
||||
public const SKU_CREATED = 'sku.created';
|
||||
|
||||
public const SKU_DELETED = 'sku.deleted';
|
||||
|
||||
public const SKU_UPDATED = 'sku.updated';
|
||||
|
||||
public const SOURCE_CANCELED = 'source.canceled';
|
||||
|
||||
public const SOURCE_CHARGEABLE = 'source.chargeable';
|
||||
|
||||
public const SOURCE_FAILED = 'source.failed';
|
||||
|
||||
public const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
|
||||
|
||||
public const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
|
||||
|
||||
public const SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
|
||||
|
||||
public const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
|
||||
|
||||
public const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
|
||||
|
||||
public const TAX_RATE_CREATED = 'tax_rate.created';
|
||||
|
||||
public const TAX_RATE_UPDATED = 'tax_rate.updated';
|
||||
|
||||
public const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
|
||||
|
||||
public const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
|
||||
|
||||
public const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
|
||||
|
||||
public const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
|
||||
|
||||
public const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
|
||||
|
||||
public const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
|
||||
|
||||
public const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
|
||||
|
||||
public const TOPUP_CANCELED = 'topup.canceled';
|
||||
|
||||
public const TOPUP_CREATED = 'topup.created';
|
||||
|
||||
public const TOPUP_FAILED = 'topup.failed';
|
||||
|
||||
public const TOPUP_REVERSED = 'topup.reversed';
|
||||
|
||||
public const TOPUP_SUCCEEDED = 'topup.succeeded';
|
||||
|
||||
public const TRANSFER_CREATED = 'transfer.created';
|
||||
|
||||
public const TRANSFER_REVERSED = 'transfer.reversed';
|
||||
|
||||
public const TRANSFER_UPDATED = 'transfer.updated';
|
||||
|
||||
public const TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
|
||||
|
||||
public const TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
|
||||
|
||||
public const TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
|
||||
|
||||
public const TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
|
||||
|
||||
public const TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
|
||||
|
||||
public const TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
|
||||
|
||||
public const TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
|
||||
|
||||
public const TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
|
||||
|
||||
public const TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
|
||||
|
||||
public const TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
|
||||
|
||||
public const TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
|
||||
|
||||
public const TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
|
||||
|
||||
public const TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
|
||||
|
||||
public const TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
|
||||
|
||||
public const TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
|
||||
|
||||
public const TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
|
||||
|
||||
public const TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
|
||||
|
||||
public const TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
@ -8,22 +8,28 @@ namespace Stripe\Exception;
|
|||
abstract class ApiErrorException extends \Exception implements ExceptionInterface
|
||||
{
|
||||
protected $error;
|
||||
|
||||
protected $httpBody;
|
||||
|
||||
protected $httpHeaders;
|
||||
|
||||
protected $httpStatus;
|
||||
|
||||
protected $jsonBody;
|
||||
|
||||
protected $requestId;
|
||||
|
||||
protected $stripeCode;
|
||||
|
||||
/**
|
||||
* Creates a new API error exception.
|
||||
*
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
|
|
@ -67,7 +73,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|\Stripe\ErrorObject $error
|
||||
*/
|
||||
public function setError($error)
|
||||
public function setError($error) : void
|
||||
{
|
||||
$this->error = $error;
|
||||
}
|
||||
|
|
@ -87,7 +93,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|string $httpBody
|
||||
*/
|
||||
public function setHttpBody($httpBody)
|
||||
public function setHttpBody($httpBody) : void
|
||||
{
|
||||
$this->httpBody = $httpBody;
|
||||
}
|
||||
|
|
@ -107,7 +113,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders
|
||||
*/
|
||||
public function setHttpHeaders($httpHeaders)
|
||||
public function setHttpHeaders($httpHeaders) : void
|
||||
{
|
||||
$this->httpHeaders = $httpHeaders;
|
||||
}
|
||||
|
|
@ -127,7 +133,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|int $httpStatus
|
||||
*/
|
||||
public function setHttpStatus($httpStatus)
|
||||
public function setHttpStatus($httpStatus) : void
|
||||
{
|
||||
$this->httpStatus = $httpStatus;
|
||||
}
|
||||
|
|
@ -147,7 +153,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|array<string, mixed> $jsonBody
|
||||
*/
|
||||
public function setJsonBody($jsonBody)
|
||||
public function setJsonBody($jsonBody) : void
|
||||
{
|
||||
$this->jsonBody = $jsonBody;
|
||||
}
|
||||
|
|
@ -167,7 +173,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|string $requestId
|
||||
*/
|
||||
public function setRequestId($requestId)
|
||||
public function setRequestId($requestId) : void
|
||||
{
|
||||
$this->requestId = $requestId;
|
||||
}
|
||||
|
|
@ -190,7 +196,7 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*
|
||||
* @param null|string $stripeCode
|
||||
*/
|
||||
public function setStripeCode($stripeCode)
|
||||
public function setStripeCode($stripeCode) : void
|
||||
{
|
||||
$this->stripeCode = $stripeCode;
|
||||
}
|
||||
|
|
@ -202,15 +208,15 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
|
|||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) ";
|
||||
$idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) ";
|
||||
$statusStr = ($this->getHttpStatus() === null) ? '' : "(Status {$this->getHttpStatus()}) ";
|
||||
$idStr = ($this->getRequestId() === null) ? '' : "(Request {$this->getRequestId()}) ";
|
||||
|
||||
return "{$statusStr}{$idStr}{$this->getMessage()}";
|
||||
}
|
||||
|
||||
protected function constructErrorObject()
|
||||
{
|
||||
if (null === $this->jsonBody || !\array_key_exists('error', $this->jsonBody)) {
|
||||
if ($this->jsonBody === null || !\array_key_exists('error', $this->jsonBody)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
@ -9,19 +9,20 @@ namespace Stripe\Exception;
|
|||
class CardException extends ApiErrorException
|
||||
{
|
||||
protected $declineCode;
|
||||
|
||||
protected $stripeParam;
|
||||
|
||||
/**
|
||||
* Creates a new CardException exception.
|
||||
*
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
* @param null|string $declineCode the decline code
|
||||
* @param null|string $stripeParam the parameter related to the error
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
* @param null|string $declineCode the decline code
|
||||
* @param null|string $stripeParam the parameter related to the error
|
||||
*
|
||||
* @return CardException
|
||||
*/
|
||||
|
|
@ -57,7 +58,7 @@ class CardException extends ApiErrorException
|
|||
*
|
||||
* @param null|string $declineCode
|
||||
*/
|
||||
public function setDeclineCode($declineCode)
|
||||
public function setDeclineCode($declineCode) : void
|
||||
{
|
||||
$this->declineCode = $declineCode;
|
||||
}
|
||||
|
|
@ -77,7 +78,7 @@ class CardException extends ApiErrorException
|
|||
*
|
||||
* @param null|string $stripeParam
|
||||
*/
|
||||
public function setStripeParam($stripeParam)
|
||||
public function setStripeParam($stripeParam) : void
|
||||
{
|
||||
$this->stripeParam = $stripeParam;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
@ -13,13 +13,13 @@ class InvalidRequestException extends ApiErrorException
|
|||
/**
|
||||
* Creates a new InvalidRequestException exception.
|
||||
*
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param string $message the exception message
|
||||
* @param null|int $httpStatus the HTTP status code
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|array $jsonBody the JSON deserialized body
|
||||
* @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
* @param null|string $stripeParam the parameter related to the error
|
||||
* @param null|string $stripeCode the Stripe error code
|
||||
* @param null|string $stripeParam the parameter related to the error
|
||||
*
|
||||
* @return InvalidRequestException
|
||||
*/
|
||||
|
|
@ -53,7 +53,7 @@ class InvalidRequestException extends ApiErrorException
|
|||
*
|
||||
* @param null|string $stripeParam
|
||||
*/
|
||||
public function setStripeParam($stripeParam)
|
||||
public function setStripeParam($stripeParam) : void
|
||||
{
|
||||
$this->stripeParam = $stripeParam;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ abstract class OAuthErrorException extends \Stripe\Exception\ApiErrorException
|
|||
{
|
||||
protected function constructErrorObject()
|
||||
{
|
||||
if (null === $this->jsonBody) {
|
||||
if ($this->jsonBody === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception\OAuth;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
@ -9,13 +9,14 @@ namespace Stripe\Exception;
|
|||
class SignatureVerificationException extends \Exception implements ExceptionInterface
|
||||
{
|
||||
protected $httpBody;
|
||||
|
||||
protected $sigHeader;
|
||||
|
||||
/**
|
||||
* Creates a new SignatureVerificationException exception.
|
||||
*
|
||||
* @param string $message the exception message
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param string $message the exception message
|
||||
* @param null|string $httpBody the HTTP body as a string
|
||||
* @param null|string $sigHeader the `Stripe-Signature` HTTP header
|
||||
*
|
||||
* @return SignatureVerificationException
|
||||
|
|
@ -47,7 +48,7 @@ class SignatureVerificationException extends \Exception implements ExceptionInte
|
|||
*
|
||||
* @param null|string $httpBody
|
||||
*/
|
||||
public function setHttpBody($httpBody)
|
||||
public function setHttpBody($httpBody) : void
|
||||
{
|
||||
$this->httpBody = $httpBody;
|
||||
}
|
||||
|
|
@ -67,7 +68,7 @@ class SignatureVerificationException extends \Exception implements ExceptionInte
|
|||
*
|
||||
* @param null|string $sigHeader
|
||||
*/
|
||||
public function setSigHeader($sigHeader)
|
||||
public function setSigHeader($sigHeader) : void
|
||||
{
|
||||
$this->sigHeader = $sigHeader;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -17,13 +17,13 @@ namespace Stripe;
|
|||
* Please refer to our <a href="https://stripe.com/docs/exchange-rates">Exchange
|
||||
* Rates API</a> guide for more details.
|
||||
*
|
||||
* @property string $id Unique identifier for the object. Represented as the three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> in lowercase.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
|
||||
* @property string $id Unique identifier for the object. Represented as the three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> in lowercase.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
|
||||
*/
|
||||
class ExchangeRate extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'exchange_rate';
|
||||
public const OBJECT_NAME = 'exchange_rate';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -15,53 +15,67 @@ namespace Stripe;
|
|||
* Related guide: <a href="https://stripe.com/docs/file-upload">File Upload
|
||||
* Guide</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds.
|
||||
* @property null|string $filename A filename for the file, suitable for saving to a filesystem.
|
||||
* @property null|\Stripe\Collection<\Stripe\FileLink> $links A list of <a href="https://stripe.com/docs/api#file_links">file links</a> that point at this file.
|
||||
* @property string $purpose The <a href="https://stripe.com/docs/file-upload#uploading-a-file">purpose</a> of the uploaded file.
|
||||
* @property int $size The size in bytes of the file object.
|
||||
* @property null|string $title A user friendly title for the document.
|
||||
* @property null|string $type The type of the file returned (e.g., <code>csv</code>, <code>pdf</code>, <code>jpg</code>, or <code>png</code>).
|
||||
* @property null|string $url The URL from which the file can be downloaded using your live secret API key.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds.
|
||||
* @property null|string $filename A filename for the file, suitable for saving to a filesystem.
|
||||
* @property null|\Stripe\Collection<\Stripe\FileLink> $links A list of <a href="https://stripe.com/docs/api#file_links">file links</a> that point at this file.
|
||||
* @property string $purpose The <a href="https://stripe.com/docs/file-upload#uploading-a-file">purpose</a> of the uploaded file.
|
||||
* @property int $size The size in bytes of the file object.
|
||||
* @property null|string $title A user friendly title for the document.
|
||||
* @property null|string $type The type of the file returned (e.g., <code>csv</code>, <code>pdf</code>, <code>jpg</code>, or <code>png</code>).
|
||||
* @property null|string $url The URL from which the file can be downloaded using your live secret API key.
|
||||
*/
|
||||
class File extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'file';
|
||||
public const OBJECT_NAME = 'file';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Retrieve;
|
||||
|
||||
const PURPOSE_ACCOUNT_REQUIREMENT = 'account_requirement';
|
||||
const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification';
|
||||
const PURPOSE_BUSINESS_ICON = 'business_icon';
|
||||
const PURPOSE_BUSINESS_LOGO = 'business_logo';
|
||||
const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature';
|
||||
const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence';
|
||||
const PURPOSE_DOCUMENT_PROVIDER_IDENTITY_DOCUMENT = 'document_provider_identity_document';
|
||||
const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run';
|
||||
const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
|
||||
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
|
||||
const PURPOSE_PCI_DOCUMENT = 'pci_document';
|
||||
const PURPOSE_SELFIE = 'selfie';
|
||||
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
|
||||
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
|
||||
const PURPOSE_TERMINAL_READER_SPLASHSCREEN = 'terminal_reader_splashscreen';
|
||||
public const PURPOSE_ACCOUNT_REQUIREMENT = 'account_requirement';
|
||||
|
||||
public const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification';
|
||||
|
||||
public const PURPOSE_BUSINESS_ICON = 'business_icon';
|
||||
|
||||
public const PURPOSE_BUSINESS_LOGO = 'business_logo';
|
||||
|
||||
public const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature';
|
||||
|
||||
public const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence';
|
||||
|
||||
public const PURPOSE_DOCUMENT_PROVIDER_IDENTITY_DOCUMENT = 'document_provider_identity_document';
|
||||
|
||||
public const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run';
|
||||
|
||||
public const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
|
||||
|
||||
public const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
|
||||
|
||||
public const PURPOSE_PCI_DOCUMENT = 'pci_document';
|
||||
|
||||
public const PURPOSE_SELFIE = 'selfie';
|
||||
|
||||
public const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
|
||||
|
||||
public const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
|
||||
|
||||
public const PURPOSE_TERMINAL_READER_SPLASHSCREEN = 'terminal_reader_splashscreen';
|
||||
|
||||
// This resource can have two different object names. In latter API
|
||||
// versions, only `file` is used, but since stripe-php may be used with
|
||||
// any API version, we need to support deserializing the older
|
||||
// `file_upload` object into the same class.
|
||||
const OBJECT_NAME_ALT = 'file_upload';
|
||||
public const OBJECT_NAME_ALT = 'file_upload';
|
||||
|
||||
use ApiOperations\Create {
|
||||
create as protected _create;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -71,7 +85,7 @@ class File extends ApiResource
|
|||
public static function create($params = null, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
if (null === $opts->apiBase) {
|
||||
if ($opts->apiBase === null) {
|
||||
$opts->apiBase = Stripe::$apiUploadBase;
|
||||
}
|
||||
// Manually flatten params, otherwise curl's multipart encoder will
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -9,19 +9,19 @@ namespace Stripe;
|
|||
* can create a <code>FileLink</code>. <code>FileLink</code>s contain a URL that
|
||||
* can be used to retrieve the contents of the file without authentication.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property bool $expired Whether this link is already expired.
|
||||
* @property null|int $expires_at Time at which the link expires.
|
||||
* @property string|\Stripe\File $file The file object this link points to.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $url The publicly accessible URL to download the file.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property bool $expired Whether this link is already expired.
|
||||
* @property null|int $expires_at Time at which the link expires.
|
||||
* @property string|\Stripe\File $file The file object this link points to.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $url The publicly accessible URL to download the file.
|
||||
*/
|
||||
class FileLink extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'file_link';
|
||||
public const OBJECT_NAME = 'file_link';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -8,49 +8,59 @@ namespace Stripe\FinancialConnections;
|
|||
* A Financial Connections Account represents an account that exists outside of
|
||||
* Stripe, to which you have been granted some degree of access.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $account_holder The account holder that this account belongs to.
|
||||
* @property null|\Stripe\StripeObject $balance The most recent information about the account's balance.
|
||||
* @property null|\Stripe\StripeObject $balance_refresh The state of the most recent attempt to refresh the account balance.
|
||||
* @property string $category The type of the account. Account category is further divided in <code>subcategory</code>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
||||
* @property string $institution_name The name of the institution that holds this account.
|
||||
* @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string|\Stripe\FinancialConnections\AccountOwnership $ownership The most recent information about the account's owners.
|
||||
* @property null|\Stripe\StripeObject $ownership_refresh The state of the most recent attempt to refresh the account owners.
|
||||
* @property null|string[] $permissions The list of permissions granted by this account.
|
||||
* @property string $status The status of the link to the account.
|
||||
* @property string $subcategory <p>If <code>category</code> is <code>cash</code>, one of:</p><p>- <code>checking</code> - <code>savings</code> - <code>other</code></p><p>If <code>category</code> is <code>credit</code>, one of:</p><p>- <code>mortgage</code> - <code>line_of_credit</code> - <code>credit_card</code> - <code>other</code></p><p>If <code>category</code> is <code>investment</code> or <code>other</code>, this will be <code>other</code>.</p>
|
||||
* @property string[] $supported_payment_method_types The <a href="https://stripe.com/docs/api/payment_methods/object#payment_method_object-type">PaymentMethod type</a>(s) that can be created from this account.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $account_holder The account holder that this account belongs to.
|
||||
* @property null|\Stripe\StripeObject $balance The most recent information about the account's balance.
|
||||
* @property null|\Stripe\StripeObject $balance_refresh The state of the most recent attempt to refresh the account balance.
|
||||
* @property string $category The type of the account. Account category is further divided in <code>subcategory</code>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
||||
* @property string $institution_name The name of the institution that holds this account.
|
||||
* @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string|\Stripe\FinancialConnections\AccountOwnership $ownership The most recent information about the account's owners.
|
||||
* @property null|\Stripe\StripeObject $ownership_refresh The state of the most recent attempt to refresh the account owners.
|
||||
* @property null|string[] $permissions The list of permissions granted by this account.
|
||||
* @property string $status The status of the link to the account.
|
||||
* @property string $subcategory <p>If <code>category</code> is <code>cash</code>, one of:</p><p>- <code>checking</code> - <code>savings</code> - <code>other</code></p><p>If <code>category</code> is <code>credit</code>, one of:</p><p>- <code>mortgage</code> - <code>line_of_credit</code> - <code>credit_card</code> - <code>other</code></p><p>If <code>category</code> is <code>investment</code> or <code>other</code>, this will be <code>other</code>.</p>
|
||||
* @property string[] $supported_payment_method_types The <a href="https://stripe.com/docs/api/payment_methods/object#payment_method_object-type">PaymentMethod type</a>(s) that can be created from this account.
|
||||
*/
|
||||
class Account extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'financial_connections.account';
|
||||
public const OBJECT_NAME = 'financial_connections.account';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
|
||||
const CATEGORY_CASH = 'cash';
|
||||
const CATEGORY_CREDIT = 'credit';
|
||||
const CATEGORY_INVESTMENT = 'investment';
|
||||
const CATEGORY_OTHER = 'other';
|
||||
public const CATEGORY_CASH = 'cash';
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_DISCONNECTED = 'disconnected';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
public const CATEGORY_CREDIT = 'credit';
|
||||
|
||||
const SUBCATEGORY_CHECKING = 'checking';
|
||||
const SUBCATEGORY_CREDIT_CARD = 'credit_card';
|
||||
const SUBCATEGORY_LINE_OF_CREDIT = 'line_of_credit';
|
||||
const SUBCATEGORY_MORTGAGE = 'mortgage';
|
||||
const SUBCATEGORY_OTHER = 'other';
|
||||
const SUBCATEGORY_SAVINGS = 'savings';
|
||||
public const CATEGORY_INVESTMENT = 'investment';
|
||||
|
||||
public const CATEGORY_OTHER = 'other';
|
||||
|
||||
public const STATUS_ACTIVE = 'active';
|
||||
|
||||
public const STATUS_DISCONNECTED = 'disconnected';
|
||||
|
||||
public const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
public const SUBCATEGORY_CHECKING = 'checking';
|
||||
|
||||
public const SUBCATEGORY_CREDIT_CARD = 'credit_card';
|
||||
|
||||
public const SUBCATEGORY_LINE_OF_CREDIT = 'line_of_credit';
|
||||
|
||||
public const SUBCATEGORY_MORTGAGE = 'mortgage';
|
||||
|
||||
public const SUBCATEGORY_OTHER = 'other';
|
||||
|
||||
public const SUBCATEGORY_SAVINGS = 'savings';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -59,7 +69,7 @@ class Account extends \Stripe\ApiResource
|
|||
*/
|
||||
public function disconnect($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/disconnect';
|
||||
$url = $this->instanceUrl() . '/disconnect';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -67,8 +77,8 @@ class Account extends \Stripe\ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -77,16 +87,16 @@ class Account extends \Stripe\ApiResource
|
|||
*/
|
||||
public static function allOwners($id, $params = null, $opts = null)
|
||||
{
|
||||
$url = static::resourceUrl($id) . '/owners';
|
||||
$url = static::resourceUrl($id) . '/owners';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -95,7 +105,7 @@ class Account extends \Stripe\ApiResource
|
|||
*/
|
||||
public function refreshAccount($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/refresh';
|
||||
$url = $this->instanceUrl() . '/refresh';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\FinancialConnections;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $email The email address of the owner.
|
||||
* @property string $name The full name of the owner.
|
||||
* @property string $ownership The ownership object that this owner belongs to.
|
||||
* @property null|string $phone The raw phone number of the owner.
|
||||
* @property null|string $raw_address The raw physical address of the owner.
|
||||
* @property null|int $refreshed_at The timestamp of the refresh that updated this owner.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $email The email address of the owner.
|
||||
* @property string $name The full name of the owner.
|
||||
* @property string $ownership The ownership object that this owner belongs to.
|
||||
* @property null|string $phone The raw phone number of the owner.
|
||||
* @property null|string $raw_address The raw physical address of the owner.
|
||||
* @property null|int $refreshed_at The timestamp of the refresh that updated this owner.
|
||||
*/
|
||||
class AccountOwner extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'financial_connections.account_owner';
|
||||
public const OBJECT_NAME = 'financial_connections.account_owner';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -7,12 +7,12 @@ namespace Stripe\FinancialConnections;
|
|||
/**
|
||||
* Describes a snapshot of the owners of an account at a particular point in time.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> $owners A paginated list of owners for this account.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> $owners A paginated list of owners for this account.
|
||||
*/
|
||||
class AccountOwnership extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'financial_connections.account_ownership';
|
||||
public const OBJECT_NAME = 'financial_connections.account_ownership';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -8,19 +8,19 @@ namespace Stripe\FinancialConnections;
|
|||
* A Financial Connections Session is the secure way to programmatically launch the
|
||||
* client-side Stripe.js modal that lets your users link their accounts.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $account_holder The account holder for whom accounts are collected in this session.
|
||||
* @property \Stripe\Collection<\Stripe\FinancialConnections\Account> $accounts The accounts that were collected as part of this Session.
|
||||
* @property string $client_secret A value that will be passed to the client to launch the authentication flow.
|
||||
* @property \Stripe\StripeObject $filters
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string[] $permissions Permissions requested for accounts collected during this session.
|
||||
* @property string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|\Stripe\StripeObject $account_holder The account holder for whom accounts are collected in this session.
|
||||
* @property \Stripe\Collection<\Stripe\FinancialConnections\Account> $accounts The accounts that were collected as part of this Session.
|
||||
* @property string $client_secret A value that will be passed to the client to launch the authentication flow.
|
||||
* @property \Stripe\StripeObject $filters
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string[] $permissions Permissions requested for accounts collected during this session.
|
||||
* @property string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
||||
*/
|
||||
class Session extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'financial_connections.session';
|
||||
public const OBJECT_NAME = 'financial_connections.session';
|
||||
|
||||
use \Stripe\ApiOperations\Create;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,15 +14,15 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/payments/customer-balance/funding-instructions">Customer
|
||||
* Balance - Funding Instructions</a> to learn more.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $bank_transfer
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $funding_type The <code>funding_type</code> of the returned instructions
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $funding_type The <code>funding_type</code> of the returned instructions
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
*/
|
||||
class FundingInstructions extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'funding_instructions';
|
||||
public const OBJECT_NAME = 'funding_instructions';
|
||||
|
||||
const FUNDING_TYPE_BANK_TRANSFER = 'bank_transfer';
|
||||
public const FUNDING_TYPE_BANK_TRANSFER = 'bank_transfer';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\HttpClient;
|
||||
|
||||
interface ClientInterface
|
||||
{
|
||||
/**
|
||||
* @param string $method The HTTP method being used
|
||||
* @param string $absUrl The URL being requested, including domain and protocol
|
||||
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
|
||||
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
|
||||
* @param bool $hasFile Whether or not $params references a file (via an @ prefix or
|
||||
* CURLFile)
|
||||
* @param string $method The HTTP method being used
|
||||
* @param string $absUrl The URL being requested, including domain and protocol
|
||||
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
|
||||
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
|
||||
* @param bool $hasFile Whether or not $params references a file (via an @ prefix or
|
||||
* CURLFile)
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiConnectionException
|
||||
* @throws \Stripe\Exception\UnexpectedValueException
|
||||
*
|
||||
* @return array an array whose first element is raw request body, second
|
||||
* element is HTTP status code and third array of HTTP headers
|
||||
* element is HTTP status code and third array of HTTP headers
|
||||
*/
|
||||
public function request($method, $absUrl, $headers, $params, $hasFile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\HttpClient;
|
||||
|
||||
|
|
@ -63,12 +63,12 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* Note that request() will silently ignore a non-callable, non-array $defaultOptions, and will
|
||||
* throw an exception if $defaultOptions returns a non-array value.
|
||||
*
|
||||
* @param null|array|callable $defaultOptions
|
||||
* @param null|array|callable $defaultOptions
|
||||
* @param null|\Stripe\Util\RandomGenerator $randomGenerator
|
||||
*/
|
||||
public function __construct($defaultOptions = null, $randomGenerator = null)
|
||||
{
|
||||
$this->defaultOptions = $defaultOptions;
|
||||
$this->defaultOptions = $defaultOptions;
|
||||
$this->randomGenerator = $randomGenerator ?: new Util\RandomGenerator();
|
||||
$this->initUserAgentInfo();
|
||||
|
||||
|
|
@ -80,12 +80,12 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
$this->closeCurlHandle();
|
||||
}
|
||||
|
||||
public function initUserAgentInfo()
|
||||
public function initUserAgentInfo() : void
|
||||
{
|
||||
$curlVersion = \curl_version();
|
||||
$curlVersion = \curl_version();
|
||||
$this->userAgentInfo = [
|
||||
'httplib' => 'curl ' . $curlVersion['version'],
|
||||
'ssllib' => $curlVersion['ssl_version'],
|
||||
'ssllib' => $curlVersion['ssl_version'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/**
|
||||
* @param bool $enable
|
||||
*/
|
||||
public function setEnablePersistentConnections($enable)
|
||||
public function setEnablePersistentConnections($enable) : void
|
||||
{
|
||||
$this->enablePersistentConnections = $enable;
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/**
|
||||
* @param bool $enable
|
||||
*/
|
||||
public function setEnableHttp2($enable)
|
||||
public function setEnableHttp2($enable) : void
|
||||
{
|
||||
$this->enableHttp2 = $enable;
|
||||
}
|
||||
|
|
@ -154,17 +154,19 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
*
|
||||
* @param null|callable $requestStatusCallback
|
||||
*/
|
||||
public function setRequestStatusCallback($requestStatusCallback)
|
||||
public function setRequestStatusCallback($requestStatusCallback) : void
|
||||
{
|
||||
$this->requestStatusCallback = $requestStatusCallback;
|
||||
}
|
||||
|
||||
// USER DEFINED TIMEOUTS
|
||||
|
||||
const DEFAULT_TIMEOUT = 80;
|
||||
const DEFAULT_CONNECT_TIMEOUT = 30;
|
||||
public const DEFAULT_TIMEOUT = 80;
|
||||
|
||||
public const DEFAULT_CONNECT_TIMEOUT = 30;
|
||||
|
||||
private $timeout = self::DEFAULT_TIMEOUT;
|
||||
|
||||
private $connectTimeout = self::DEFAULT_CONNECT_TIMEOUT;
|
||||
|
||||
public function setTimeout($seconds)
|
||||
|
|
@ -209,7 +211,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
|
||||
$params = Util\Util::objectsToIds($params);
|
||||
|
||||
if ('get' === $method) {
|
||||
if ($method === 'get') {
|
||||
if ($hasFile) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
'Issuing a GET request with a file parameter'
|
||||
|
|
@ -218,16 +220,16 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
$opts[\CURLOPT_HTTPGET] = 1;
|
||||
if (\count($params) > 0) {
|
||||
$encoded = Util\Util::encodeParameters($params);
|
||||
$absUrl = "{$absUrl}?{$encoded}";
|
||||
$absUrl = "{$absUrl}?{$encoded}";
|
||||
}
|
||||
} elseif ('post' === $method) {
|
||||
$opts[\CURLOPT_POST] = 1;
|
||||
} elseif ($method === 'post') {
|
||||
$opts[\CURLOPT_POST] = 1;
|
||||
$opts[\CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params);
|
||||
} elseif ('delete' === $method) {
|
||||
} elseif ($method === 'delete') {
|
||||
$opts[\CURLOPT_CUSTOMREQUEST] = 'DELETE';
|
||||
if (\count($params) > 0) {
|
||||
$encoded = Util\Util::encodeParameters($params);
|
||||
$absUrl = "{$absUrl}?{$encoded}";
|
||||
$absUrl = "{$absUrl}?{$encoded}";
|
||||
}
|
||||
} else {
|
||||
throw new Exception\UnexpectedValueException("Unrecognized method {$method}");
|
||||
|
|
@ -235,7 +237,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
|
||||
// It is only safe to retry network failures on POST requests if we
|
||||
// add an Idempotency-Key header
|
||||
if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) {
|
||||
if (($method === 'post') && (Stripe::$maxNetworkRetries > 0)) {
|
||||
if (!$this->hasHeader($headers, 'Idempotency-Key')) {
|
||||
$headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid();
|
||||
}
|
||||
|
|
@ -255,13 +257,13 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
// sending an empty `Expect:` header.
|
||||
$headers[] = 'Expect: ';
|
||||
|
||||
$absUrl = Util\Util::utf8($absUrl);
|
||||
$opts[\CURLOPT_URL] = $absUrl;
|
||||
$absUrl = Util\Util::utf8($absUrl);
|
||||
$opts[\CURLOPT_URL] = $absUrl;
|
||||
$opts[\CURLOPT_RETURNTRANSFER] = true;
|
||||
$opts[\CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout;
|
||||
$opts[\CURLOPT_TIMEOUT] = $this->timeout;
|
||||
$opts[\CURLOPT_HTTPHEADER] = $headers;
|
||||
$opts[\CURLOPT_CAINFO] = Stripe::getCABundlePath();
|
||||
$opts[\CURLOPT_TIMEOUT] = $this->timeout;
|
||||
$opts[\CURLOPT_HTTPHEADER] = $headers;
|
||||
$opts[\CURLOPT_CAINFO] = Stripe::getCABundlePath();
|
||||
if (!Stripe::getVerifySslCerts()) {
|
||||
$opts[\CURLOPT_SSL_VERIFYPEER] = false;
|
||||
}
|
||||
|
|
@ -296,7 +298,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
{
|
||||
list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile);
|
||||
|
||||
$opts[\CURLOPT_RETURNTRANSFER] = false;
|
||||
$opts[\CURLOPT_RETURNTRANSFER] = false;
|
||||
list($rbody, $rcode, $rheaders) = $this->executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk);
|
||||
|
||||
return [$rbody, $rcode, $rheaders];
|
||||
|
|
@ -315,21 +317,21 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* headers it receives, return a "writeCallback" that describes what to do
|
||||
* with the incoming HTTP response body.
|
||||
*
|
||||
* @param array $opts
|
||||
* @param array $opts
|
||||
* @param callable $determineWriteCallback
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function useHeadersToDetermineWriteCallback($opts, $determineWriteCallback)
|
||||
{
|
||||
$rheaders = new Util\CaseInsensitiveArray();
|
||||
$rheaders = new Util\CaseInsensitiveArray();
|
||||
$headerCallback = function ($curl, $header_line) use (&$rheaders) {
|
||||
return self::parseLineIntoHeaderArray($header_line, $rheaders);
|
||||
};
|
||||
|
||||
$writeCallback = null;
|
||||
$writeCallback = null;
|
||||
$writeCallbackWrapper = function ($curl, $data) use (&$writeCallback, &$rheaders, &$determineWriteCallback) {
|
||||
if (null === $writeCallback) {
|
||||
if ($writeCallback === null) {
|
||||
$writeCallback = \call_user_func_array($determineWriteCallback, [$rheaders]);
|
||||
}
|
||||
|
||||
|
|
@ -341,10 +343,10 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
|
||||
private static function parseLineIntoHeaderArray($line, &$headers)
|
||||
{
|
||||
if (false === \strpos($line, ':')) {
|
||||
if (\strpos($line, ':') === false) {
|
||||
return \strlen($line);
|
||||
}
|
||||
list($key, $value) = \explode(':', \trim($line), 2);
|
||||
list($key, $value) = \explode(':', \trim($line), 2);
|
||||
$headers[\trim($key)] = \trim($value);
|
||||
|
||||
return \strlen($line);
|
||||
|
|
@ -358,8 +360,8 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* 2. Does not retry if a network error occurs while streaming the
|
||||
* body of a successful response.
|
||||
*
|
||||
* @param array $opts cURL options
|
||||
* @param string $absUrl
|
||||
* @param array $opts cURL options
|
||||
* @param string $absUrl
|
||||
* @param callable $readBodyChunk
|
||||
*
|
||||
* @return array
|
||||
|
|
@ -384,7 +386,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/** @var null|array */
|
||||
$lastRHeaders = null;
|
||||
|
||||
$errno = null;
|
||||
$errno = null;
|
||||
$message = null;
|
||||
|
||||
$determineWriteCallback = function ($rheaders) use (
|
||||
|
|
@ -397,7 +399,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
&$errno
|
||||
) {
|
||||
$lastRHeaders = $rheaders;
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
|
||||
$rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE);
|
||||
|
||||
|
|
@ -436,16 +438,16 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
|
||||
while (true) {
|
||||
list($headerCallback, $writeCallback) = $this->useHeadersToDetermineWriteCallback($opts, $determineWriteCallback);
|
||||
$opts[\CURLOPT_HEADERFUNCTION] = $headerCallback;
|
||||
$opts[\CURLOPT_WRITEFUNCTION] = $writeCallback;
|
||||
$opts[\CURLOPT_HEADERFUNCTION] = $headerCallback;
|
||||
$opts[\CURLOPT_WRITEFUNCTION] = $writeCallback;
|
||||
|
||||
$shouldRetry = false;
|
||||
$rbody = null;
|
||||
$rbody = null;
|
||||
$this->resetCurlHandle();
|
||||
\curl_setopt_array($this->curlHandle, $opts);
|
||||
$result = \curl_exec($this->curlHandle);
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
if (0 !== $errno) {
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
if ($errno !== 0) {
|
||||
$message = \curl_error($this->curlHandle);
|
||||
}
|
||||
if (!$this->getEnablePersistentConnections()) {
|
||||
|
|
@ -468,7 +470,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
}
|
||||
}
|
||||
|
||||
if (0 !== $errno) {
|
||||
if ($errno !== 0) {
|
||||
$this->handleCurlError($absUrl, $errno, $message, $numRetries);
|
||||
}
|
||||
|
||||
|
|
@ -476,7 +478,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array $opts cURL options
|
||||
* @param array $opts cURL options
|
||||
* @param string $absUrl
|
||||
*/
|
||||
public function executeRequestWithRetries($opts, $absUrl)
|
||||
|
|
@ -484,12 +486,12 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
$numRetries = 0;
|
||||
|
||||
while (true) {
|
||||
$rcode = 0;
|
||||
$errno = 0;
|
||||
$rcode = 0;
|
||||
$errno = 0;
|
||||
$message = null;
|
||||
|
||||
// Create a callback to capture HTTP headers for the response
|
||||
$rheaders = new Util\CaseInsensitiveArray();
|
||||
$rheaders = new Util\CaseInsensitiveArray();
|
||||
$headerCallback = function ($curl, $header_line) use (&$rheaders) {
|
||||
return CurlClient::parseLineIntoHeaderArray($header_line, $rheaders);
|
||||
};
|
||||
|
|
@ -499,8 +501,8 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
\curl_setopt_array($this->curlHandle, $opts);
|
||||
$rbody = \curl_exec($this->curlHandle);
|
||||
|
||||
if (false === $rbody) {
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
if ($rbody === false) {
|
||||
$errno = \curl_errno($this->curlHandle);
|
||||
$message = \curl_error($this->curlHandle);
|
||||
} else {
|
||||
$rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE);
|
||||
|
|
@ -527,7 +529,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
}
|
||||
}
|
||||
|
||||
if (false === $rbody) {
|
||||
if ($rbody === false) {
|
||||
$this->handleCurlError($absUrl, $errno, $message, $numRetries);
|
||||
}
|
||||
|
||||
|
|
@ -536,13 +538,13 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
|
||||
/**
|
||||
* @param string $url
|
||||
* @param int $errno
|
||||
* @param int $errno
|
||||
* @param string $message
|
||||
* @param int $numRetries
|
||||
* @param int $numRetries
|
||||
*
|
||||
* @throws Exception\ApiConnectionException
|
||||
*/
|
||||
private function handleCurlError($url, $errno, $message, $numRetries)
|
||||
private function handleCurlError($url, $errno, $message, $numRetries) : void
|
||||
{
|
||||
switch ($errno) {
|
||||
case \CURLE_COULDNT_CONNECT:
|
||||
|
|
@ -554,7 +556,6 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
. 'https://twitter.com/stripestatus, or';
|
||||
|
||||
break;
|
||||
|
||||
case \CURLE_SSL_CACERT:
|
||||
case \CURLE_SSL_PEER_CERTIFICATE:
|
||||
$msg = "Could not verify Stripe's SSL certificate. Please make sure "
|
||||
|
|
@ -563,7 +564,6 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
. 'If this problem persists,';
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$msg = 'Unexpected error communicating with Stripe. '
|
||||
. 'If this problem persists,';
|
||||
|
|
@ -584,10 +584,10 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* socket errors that may represent an intermittent problem and some special
|
||||
* HTTP statuses.
|
||||
*
|
||||
* @param int $errno
|
||||
* @param int $rcode
|
||||
* @param int $errno
|
||||
* @param int $rcode
|
||||
* @param array|\Stripe\Util\CaseInsensitiveArray $rheaders
|
||||
* @param int $numRetries
|
||||
* @param int $numRetries
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -598,30 +598,30 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
}
|
||||
|
||||
// Retry on timeout-related problems (either on open or read).
|
||||
if (\CURLE_OPERATION_TIMEOUTED === $errno) {
|
||||
if ($errno === \CURLE_OPERATION_TIMEOUTED) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Destination refused the connection, the connection was reset, or a
|
||||
// variety of other connection failures. This could occur from a single
|
||||
// saturated server, so retry in case it's intermittent.
|
||||
if (\CURLE_COULDNT_CONNECT === $errno) {
|
||||
if ($errno === \CURLE_COULDNT_CONNECT) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// The API may ask us not to retry (eg; if doing so would be a no-op)
|
||||
// or advise us to retry (eg; in cases of lock timeouts); we defer to that.
|
||||
if (isset($rheaders['stripe-should-retry'])) {
|
||||
if ('false' === $rheaders['stripe-should-retry']) {
|
||||
if ($rheaders['stripe-should-retry'] === 'false') {
|
||||
return false;
|
||||
}
|
||||
if ('true' === $rheaders['stripe-should-retry']) {
|
||||
if ($rheaders['stripe-should-retry'] === 'true') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 409 Conflict
|
||||
if (409 === $rcode) {
|
||||
if ($rcode === 409) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -640,7 +640,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/**
|
||||
* Provides the number of seconds to wait before retrying a request.
|
||||
*
|
||||
* @param int $numRetries
|
||||
* @param int $numRetries
|
||||
* @param array|\Stripe\Util\CaseInsensitiveArray $rheaders
|
||||
*
|
||||
* @return int
|
||||
|
|
@ -674,7 +674,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/**
|
||||
* Initializes the curl handle. If already initialized, the handle is closed first.
|
||||
*/
|
||||
private function initCurlHandle()
|
||||
private function initCurlHandle() : void
|
||||
{
|
||||
$this->closeCurlHandle();
|
||||
$this->curlHandle = \curl_init();
|
||||
|
|
@ -683,9 +683,9 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
/**
|
||||
* Closes the curl handle if initialized. Do nothing if already closed.
|
||||
*/
|
||||
private function closeCurlHandle()
|
||||
private function closeCurlHandle() : void
|
||||
{
|
||||
if (null !== $this->curlHandle) {
|
||||
if ($this->curlHandle !== null) {
|
||||
\curl_close($this->curlHandle);
|
||||
$this->curlHandle = null;
|
||||
}
|
||||
|
|
@ -695,9 +695,9 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* Resets the curl handle. If the handle is not already initialized, or if persistent
|
||||
* connections are disabled, the handle is reinitialized instead.
|
||||
*/
|
||||
private function resetCurlHandle()
|
||||
private function resetCurlHandle() : void
|
||||
{
|
||||
if (null !== $this->curlHandle && $this->getEnablePersistentConnections()) {
|
||||
if ($this->curlHandle !== null && $this->getEnablePersistentConnections()) {
|
||||
\curl_reset($this->curlHandle);
|
||||
} else {
|
||||
$this->initCurlHandle();
|
||||
|
|
@ -722,14 +722,14 @@ class CurlClient implements ClientInterface, StreamingClientInterface
|
|||
* Checks if a list of headers contains a specific header name.
|
||||
*
|
||||
* @param string[] $headers
|
||||
* @param string $name
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hasHeader($headers, $name)
|
||||
{
|
||||
foreach ($headers as $header) {
|
||||
if (0 === \strncasecmp($header, "{$name}: ", \strlen($name) + 2)) {
|
||||
if (\strncasecmp($header, "{$name}: ", \strlen($name) + 2) === 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\HttpClient;
|
||||
|
||||
interface StreamingClientInterface
|
||||
{
|
||||
/**
|
||||
* @param string $method The HTTP method being used
|
||||
* @param string $absUrl The URL being requested, including domain and protocol
|
||||
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
|
||||
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
|
||||
* @param bool $hasFile Whether or not $params references a file (via an @ prefix or
|
||||
* CURLFile)
|
||||
* @param string $method The HTTP method being used
|
||||
* @param string $absUrl The URL being requested, including domain and protocol
|
||||
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
|
||||
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
|
||||
* @param bool $hasFile Whether or not $params references a file (via an @ prefix or
|
||||
* CURLFile)
|
||||
* @param callable $readBodyChunkCallable a function that will be called with chunks of bytes from the body if the request is successful
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiConnectionException
|
||||
* @throws \Stripe\Exception\UnexpectedValueException
|
||||
*
|
||||
* @return array an array whose first element is raw request body, second
|
||||
* element is HTTP status code and third array of HTTP headers
|
||||
* element is HTTP status code and third array of HTTP headers
|
||||
*/
|
||||
public function requestStream($method, $absUrl, $headers, $params, $hasFile, $readBodyChunkCallable);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -22,24 +22,25 @@ namespace Stripe\Identity;
|
|||
* href="https://stripe.com/docs/identity/verification-sessions#results">Accessing
|
||||
* verification results</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $document Result from a document check
|
||||
* @property \Stripe\StripeObject $id_number Result from an id_number check
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $document Result from a document check
|
||||
* @property \Stripe\StripeObject $id_number Result from an id_number check
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $options
|
||||
* @property \Stripe\StripeObject $selfie Result from a selfie check
|
||||
* @property string $type Type of report.
|
||||
* @property null|string $verification_session ID of the VerificationSession that created this report.
|
||||
* @property \Stripe\StripeObject $selfie Result from a selfie check
|
||||
* @property string $type Type of report.
|
||||
* @property null|string $verification_session ID of the VerificationSession that created this report.
|
||||
*/
|
||||
class VerificationReport extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'identity.verification_report';
|
||||
public const OBJECT_NAME = 'identity.verification_report';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
|
||||
const TYPE_DOCUMENT = 'document';
|
||||
const TYPE_ID_NUMBER = 'id_number';
|
||||
public const TYPE_DOCUMENT = 'document';
|
||||
|
||||
public const TYPE_ID_NUMBER = 'id_number';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -20,40 +20,44 @@ namespace Stripe\Identity;
|
|||
* href="https://stripe.com/docs/identity/verification-sessions">The Verification
|
||||
* Sessions API</a>
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $client_secret The short-lived client secret used by Stripe.js to <a href="https://stripe.com/docs/js/identity/modal">show a verification modal</a> inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on <a href="https://stripe.com/docs/identity/verification-sessions#client-secret">passing the client secret to the frontend</a> to learn more.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $client_secret The short-lived client secret used by Stripe.js to <a href="https://stripe.com/docs/js/identity/modal">show a verification modal</a> inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on <a href="https://stripe.com/docs/identity/verification-sessions#client-secret">passing the client secret to the frontend</a> to learn more.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
|
||||
* @property null|string|\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. <a href="https://stripe.com/docs/identity/verification-sessions#results">Learn more about accessing detailed verification results.</a>
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $options
|
||||
* @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
|
||||
* @property string $status Status of this VerificationSession. <a href="https://stripe.com/docs/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
|
||||
* @property string $type The type of <a href="https://stripe.com/docs/identity/verification-checks">verification check</a> to be performed.
|
||||
* @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
|
||||
* @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $options
|
||||
* @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
|
||||
* @property string $status Status of this VerificationSession. <a href="https://stripe.com/docs/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
|
||||
* @property string $type The type of <a href="https://stripe.com/docs/identity/verification-checks">verification check</a> to be performed.
|
||||
* @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
|
||||
* @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
|
||||
*/
|
||||
class VerificationSession extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'identity.verification_session';
|
||||
public const OBJECT_NAME = 'identity.verification_session';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
use \Stripe\ApiOperations\Update;
|
||||
|
||||
const STATUS_CANCELED = 'canceled';
|
||||
const STATUS_PROCESSING = 'processing';
|
||||
const STATUS_REQUIRES_INPUT = 'requires_input';
|
||||
const STATUS_VERIFIED = 'verified';
|
||||
public const STATUS_CANCELED = 'canceled';
|
||||
|
||||
const TYPE_DOCUMENT = 'document';
|
||||
const TYPE_ID_NUMBER = 'id_number';
|
||||
public const STATUS_PROCESSING = 'processing';
|
||||
|
||||
public const STATUS_REQUIRES_INPUT = 'requires_input';
|
||||
|
||||
public const STATUS_VERIFIED = 'verified';
|
||||
|
||||
public const TYPE_DOCUMENT = 'document';
|
||||
|
||||
public const TYPE_ID_NUMBER = 'id_number';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -62,7 +66,7 @@ class VerificationSession extends \Stripe\ApiResource
|
|||
*/
|
||||
public function cancel($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -70,7 +74,7 @@ class VerificationSession extends \Stripe\ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -79,7 +83,7 @@ class VerificationSession extends \Stripe\ApiResource
|
|||
*/
|
||||
public function redact($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/redact';
|
||||
$url = $this->instanceUrl() . '/redact';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -41,86 +41,86 @@ namespace Stripe;
|
|||
* Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send
|
||||
* Invoices to Customers</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See <a href="https://stripe.com/docs/api/invoices/upcoming">Retrieve an upcoming invoice</a> for more details.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
|
||||
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
|
||||
* @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
||||
* @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the <code>amount_due</code> may be 0. If there is a positive <code>starting_balance</code> for the invoice (the customer owes money), the <code>amount_due</code> will also take that into account. The charge that gets generated for the invoice will be for the amount specified in <code>amount_due</code>.
|
||||
* @property int $amount_paid The amount, in %s, that was paid.
|
||||
* @property int $amount_remaining The difference between amount_due and amount_paid, in %s.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the invoice.
|
||||
* @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
|
||||
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
|
||||
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users.
|
||||
* @property bool $auto_advance Controls whether Stripe will perform <a href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">automatic collection</a> of the invoice. When <code>false</code>, the invoice's state will not automatically advance without an explicit action.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property null|string $billing_reason Indicates the reason why the invoice was created. <code>subscription_cycle</code> indicates an invoice created by a subscription advancing into a new period. <code>subscription_create</code> indicates an invoice created due to creating a subscription. <code>subscription_update</code> indicates an invoice created due to updating a subscription. <code>subscription</code> is set for all old invoices to indicate either a change to a subscription or a period advancement. <code>manual</code> is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The <code>upcoming</code> value is reserved for simulated invoices per the upcoming invoice endpoint. <code>subscription_threshold</code> indicates an invoice created due to a billing threshold being reached.
|
||||
* @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any.
|
||||
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer who will be billed.
|
||||
* @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal <code>customer.address</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal <code>customer.email</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal <code>customer.name</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_phone The customer's phone number. Until the invoice is finalized, this field will equal <code>customer.phone</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|\Stripe\StripeObject $customer_shipping The customer's shipping information. Until the invoice is finalized, this field will equal <code>customer.shipping</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_tax_exempt The customer's tax exempt status. Until the invoice is finalized, this field will equal <code>customer.tax_exempt</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|\Stripe\StripeObject[] $customer_tax_ids The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as <code>customer.tax_ids</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
||||
* @property \Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
|
||||
* @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property null|int $due_date The date on which payment for this invoice is due. This value will be <code>null</code> for invoices where <code>collection_method=charge_automatically</code>.
|
||||
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|string $footer Footer displayed on the invoice.
|
||||
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the <a href="https://stripe.com/docs/invoicing/invoice-revisions">revision documentation</a> for more details.
|
||||
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
|
||||
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
|
||||
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. <code>lines</code> is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be <code>null</code> for invoices where <code>collection_method=send_invoice</code>.
|
||||
* @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a> documentation for details.
|
||||
* @property bool $paid Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
|
||||
* @property bool $paid_out_of_band Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
|
||||
* @property \Stripe\StripeObject $payment_settings
|
||||
* @property int $period_end End of the usage period during which invoice items were added to this invoice.
|
||||
* @property int $period_start Start of the usage period during which invoice items were added to this invoice.
|
||||
* @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice.
|
||||
* @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice.
|
||||
* @property null|string|\Stripe\Quote $quote The quote this invoice was generated from.
|
||||
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice.
|
||||
* @property null|\Stripe\StripeObject $rendering_options Options for invoice PDF rendering.
|
||||
* @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
|
||||
* @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement.
|
||||
* @property null|string $status The status of the invoice, one of <code>draft</code>, <code>open</code>, <code>paid</code>, <code>uncollectible</code>, or <code>void</code>. <a href="https://stripe.com/docs/billing/invoices/workflow#workflow-overview">Learn more</a>
|
||||
* @property \Stripe\StripeObject $status_transitions
|
||||
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any.
|
||||
* @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
||||
* @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
|
||||
* @property null|int $subtotal_excluding_tax The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
|
||||
* @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to.
|
||||
* @property \Stripe\StripeObject $threshold_reason
|
||||
* @property int $total Total after discounts and taxes.
|
||||
* @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items.
|
||||
* @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
|
||||
* @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items.
|
||||
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
|
||||
* @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
|
||||
* @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See <a href="https://stripe.com/docs/api/invoices/upcoming">Retrieve an upcoming invoice</a> for more details.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
|
||||
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
|
||||
* @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
||||
* @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the <code>amount_due</code> may be 0. If there is a positive <code>starting_balance</code> for the invoice (the customer owes money), the <code>amount_due</code> will also take that into account. The charge that gets generated for the invoice will be for the amount specified in <code>amount_due</code>.
|
||||
* @property int $amount_paid The amount, in %s, that was paid.
|
||||
* @property int $amount_remaining The difference between amount_due and amount_paid, in %s.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the invoice.
|
||||
* @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
|
||||
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
|
||||
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users.
|
||||
* @property bool $auto_advance Controls whether Stripe will perform <a href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">automatic collection</a> of the invoice. When <code>false</code>, the invoice's state will not automatically advance without an explicit action.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property null|string $billing_reason Indicates the reason why the invoice was created. <code>subscription_cycle</code> indicates an invoice created by a subscription advancing into a new period. <code>subscription_create</code> indicates an invoice created due to creating a subscription. <code>subscription_update</code> indicates an invoice created due to updating a subscription. <code>subscription</code> is set for all old invoices to indicate either a change to a subscription or a period advancement. <code>manual</code> is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The <code>upcoming</code> value is reserved for simulated invoices per the upcoming invoice endpoint. <code>subscription_threshold</code> indicates an invoice created due to a billing threshold being reached.
|
||||
* @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any.
|
||||
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the customer who will be billed.
|
||||
* @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal <code>customer.address</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal <code>customer.email</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal <code>customer.name</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_phone The customer's phone number. Until the invoice is finalized, this field will equal <code>customer.phone</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|\Stripe\StripeObject $customer_shipping The customer's shipping information. Until the invoice is finalized, this field will equal <code>customer.shipping</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string $customer_tax_exempt The customer's tax exempt status. Until the invoice is finalized, this field will equal <code>customer.tax_exempt</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|\Stripe\StripeObject[] $customer_tax_ids The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as <code>customer.tax_ids</code>. Once the invoice is finalized, this field will no longer be updated.
|
||||
* @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
||||
* @property \Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
|
||||
* @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property null|int $due_date The date on which payment for this invoice is due. This value will be <code>null</code> for invoices where <code>collection_method=charge_automatically</code>.
|
||||
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|string $footer Footer displayed on the invoice.
|
||||
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the <a href="https://stripe.com/docs/invoicing/invoice-revisions">revision documentation</a> for more details.
|
||||
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
|
||||
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
|
||||
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
|
||||
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. <code>lines</code> is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be <code>null</code> for invoices where <code>collection_method=send_invoice</code>.
|
||||
* @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a> documentation for details.
|
||||
* @property bool $paid Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
|
||||
* @property bool $paid_out_of_band Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
|
||||
* @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
|
||||
* @property \Stripe\StripeObject $payment_settings
|
||||
* @property int $period_end End of the usage period during which invoice items were added to this invoice.
|
||||
* @property int $period_start Start of the usage period during which invoice items were added to this invoice.
|
||||
* @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice.
|
||||
* @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice.
|
||||
* @property null|string|\Stripe\Quote $quote The quote this invoice was generated from.
|
||||
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice.
|
||||
* @property null|\Stripe\StripeObject $rendering_options Options for invoice PDF rendering.
|
||||
* @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
|
||||
* @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement.
|
||||
* @property null|string $status The status of the invoice, one of <code>draft</code>, <code>open</code>, <code>paid</code>, <code>uncollectible</code>, or <code>void</code>. <a href="https://stripe.com/docs/billing/invoices/workflow#workflow-overview">Learn more</a>
|
||||
* @property \Stripe\StripeObject $status_transitions
|
||||
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any.
|
||||
* @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
||||
* @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
|
||||
* @property null|int $subtotal_excluding_tax The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
|
||||
* @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to.
|
||||
* @property \Stripe\StripeObject $threshold_reason
|
||||
* @property int $total Total after discounts and taxes.
|
||||
* @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items.
|
||||
* @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
|
||||
* @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items.
|
||||
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
|
||||
* @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
|
||||
*/
|
||||
class Invoice extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'invoice';
|
||||
public const OBJECT_NAME = 'invoice';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -130,31 +130,46 @@ class Invoice extends ApiResource
|
|||
use ApiOperations\Search;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
|
||||
const BILLING_SEND_INVOICE = 'send_invoice';
|
||||
public const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
|
||||
|
||||
const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice';
|
||||
const BILLING_REASON_MANUAL = 'manual';
|
||||
const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept';
|
||||
const BILLING_REASON_SUBSCRIPTION = 'subscription';
|
||||
const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create';
|
||||
const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle';
|
||||
const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold';
|
||||
const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update';
|
||||
const BILLING_REASON_UPCOMING = 'upcoming';
|
||||
public const BILLING_SEND_INVOICE = 'send_invoice';
|
||||
|
||||
const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
|
||||
const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
|
||||
public const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice';
|
||||
|
||||
const STATUS_DELETED = 'deleted';
|
||||
const STATUS_DRAFT = 'draft';
|
||||
const STATUS_OPEN = 'open';
|
||||
const STATUS_PAID = 'paid';
|
||||
const STATUS_UNCOLLECTIBLE = 'uncollectible';
|
||||
const STATUS_VOID = 'void';
|
||||
public const BILLING_REASON_MANUAL = 'manual';
|
||||
|
||||
public const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept';
|
||||
|
||||
public const BILLING_REASON_SUBSCRIPTION = 'subscription';
|
||||
|
||||
public const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create';
|
||||
|
||||
public const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle';
|
||||
|
||||
public const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold';
|
||||
|
||||
public const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update';
|
||||
|
||||
public const BILLING_REASON_UPCOMING = 'upcoming';
|
||||
|
||||
public const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
|
||||
|
||||
public const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
|
||||
|
||||
public const STATUS_DELETED = 'deleted';
|
||||
|
||||
public const STATUS_DRAFT = 'draft';
|
||||
|
||||
public const STATUS_OPEN = 'open';
|
||||
|
||||
public const STATUS_PAID = 'paid';
|
||||
|
||||
public const STATUS_UNCOLLECTIBLE = 'uncollectible';
|
||||
|
||||
public const STATUS_VOID = 'void';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -163,7 +178,7 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public function finalizeInvoice($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/finalize';
|
||||
$url = $this->instanceUrl() . '/finalize';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -171,7 +186,7 @@ class Invoice extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -180,7 +195,7 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public function markUncollectible($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/mark_uncollectible';
|
||||
$url = $this->instanceUrl() . '/mark_uncollectible';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -188,7 +203,7 @@ class Invoice extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -197,7 +212,7 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public function pay($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/pay';
|
||||
$url = $this->instanceUrl() . '/pay';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -205,7 +220,7 @@ class Invoice extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -214,7 +229,7 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public function sendInvoice($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/send';
|
||||
$url = $this->instanceUrl() . '/send';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -222,7 +237,7 @@ class Invoice extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -231,16 +246,16 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public static function upcoming($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/upcoming';
|
||||
$url = static::classUrl() . '/upcoming';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -249,16 +264,16 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public static function upcomingLines($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl() . '/upcoming/lines';
|
||||
$url = static::classUrl() . '/upcoming/lines';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -267,7 +282,7 @@ class Invoice extends ApiResource
|
|||
*/
|
||||
public function voidInvoice($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/void';
|
||||
$url = $this->instanceUrl() . '/void';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -275,7 +290,7 @@ class Invoice extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -289,11 +304,11 @@ class Invoice extends ApiResource
|
|||
return self::_searchResource($url, $params, $opts);
|
||||
}
|
||||
|
||||
const PATH_LINES = '/lines';
|
||||
public const PATH_LINES = '/lines';
|
||||
|
||||
/**
|
||||
* @param string $id the ID of the invoice on which to retrieve the line items
|
||||
* @param null|array $params
|
||||
* @param string $id the ID of the invoice on which to retrieve the line items
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,33 +14,33 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription
|
||||
* Invoices</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount (in the <code>currency</code> specified) of the invoice item. This should always be equal to <code>unit_amount * quantity</code>.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
|
||||
* @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $period
|
||||
* @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
|
||||
* @property null|\Stripe\Price $price The price of the invoice item.
|
||||
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
|
||||
* @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
|
||||
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
|
||||
* @property string $subscription_item The subscription item that this invoice item has been created for, if any.
|
||||
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the <code>default_tax_rates</code> on the invoice do not apply to this invoice item.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
|
||||
* @property null|int $unit_amount Unit amount (in the <code>currency</code> specified) of the invoice item.
|
||||
* @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount (in the <code>currency</code> specified) of the invoice item. This should always be equal to <code>unit_amount * quantity</code>.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
|
||||
* @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $period
|
||||
* @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
|
||||
* @property null|\Stripe\Price $price The price of the invoice item.
|
||||
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
|
||||
* @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
|
||||
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
|
||||
* @property string $subscription_item The subscription item that this invoice item has been created for, if any.
|
||||
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the <code>default_tax_rates</code> on the invoice do not apply to this invoice item.
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
|
||||
* @property null|int $unit_amount Unit amount (in the <code>currency</code> specified) of the invoice item.
|
||||
* @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places.
|
||||
*/
|
||||
class InvoiceItem extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'invoiceitem';
|
||||
public const OBJECT_NAME = 'invoiceitem';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,36 +1,36 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The amount, in %s.
|
||||
* @property null|int $amount_excluding_tax The integer amount in %s representing the amount for this line item, excluding all tax and discounts.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
|
||||
* @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property string $invoice_item The ID of the <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> associated with this line item if any.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with <code>type=subscription</code> this will reflect the metadata of the subscription that caused the line item to be created.
|
||||
* @property \Stripe\StripeObject $period
|
||||
* @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration.
|
||||
* @property null|\Stripe\Price $price The price of the line item.
|
||||
* @property bool $proration Whether this is a proration.
|
||||
* @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
|
||||
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
|
||||
* @property null|string $subscription The subscription that the invoice item pertains to, if any.
|
||||
* @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
|
||||
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
|
||||
* @property string $type A string identifying the type of the source of this line item, either an <code>invoiceitem</code> or a <code>subscription</code>.
|
||||
* @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The amount, in %s.
|
||||
* @property null|int $amount_excluding_tax The integer amount in %s representing the amount for this line item, excluding all tax and discounts.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
|
||||
* @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
|
||||
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property string $invoice_item The ID of the <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> associated with this line item if any.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with <code>type=subscription</code> this will reflect the metadata of the subscription that caused the line item to be created.
|
||||
* @property \Stripe\StripeObject $period
|
||||
* @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration.
|
||||
* @property null|\Stripe\Price $price The price of the line item.
|
||||
* @property bool $proration Whether this is a proration.
|
||||
* @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
|
||||
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
|
||||
* @property null|string $subscription The subscription that the invoice item pertains to, if any.
|
||||
* @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
|
||||
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
|
||||
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
|
||||
* @property string $type A string identifying the type of the source of this line item, either an <code>invoiceitem</code> or a <code>subscription</code>.
|
||||
* @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
|
||||
*/
|
||||
class InvoiceLineItem extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'line_item';
|
||||
public const OBJECT_NAME = 'line_item';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,41 +14,41 @@ namespace Stripe\Issuing;
|
|||
* href="https://stripe.com/docs/issuing/purchases/authorizations">Issued Card
|
||||
* Authorizations</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property bool $approved Whether the authorization has been approved.
|
||||
* @property string $authorization_method How the card details were provided.
|
||||
* @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
|
||||
* @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
|
||||
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $merchant_data
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|\Stripe\StripeObject $network_data Details about the authorization, such as identifiers, set by the card network.
|
||||
* @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook.
|
||||
* @property \Stripe\StripeObject[] $request_history History of every time a <code>pending_request</code> authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
|
||||
* @property string $status The current status of the authorization in its lifecycle.
|
||||
* @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this authorization if it was created on a <a href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount</a>.
|
||||
* @property \Stripe\StripeObject $verification_data
|
||||
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>. Will populate as <code>null</code> when no digital wallet was utilized.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property bool $approved Whether the authorization has been approved.
|
||||
* @property string $authorization_method How the card details were provided.
|
||||
* @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
|
||||
* @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
|
||||
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $merchant_data
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|\Stripe\StripeObject $network_data Details about the authorization, such as identifiers, set by the card network.
|
||||
* @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook.
|
||||
* @property \Stripe\StripeObject[] $request_history History of every time a <code>pending_request</code> authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
|
||||
* @property string $status The current status of the authorization in its lifecycle.
|
||||
* @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this authorization if it was created on a <a href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount</a>.
|
||||
* @property \Stripe\StripeObject $verification_data
|
||||
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>. Will populate as <code>null</code> when no digital wallet was utilized.
|
||||
*/
|
||||
class Authorization extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.authorization';
|
||||
public const OBJECT_NAME = 'issuing.authorization';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
use \Stripe\ApiOperations\Update;
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -57,7 +57,7 @@ class Authorization extends \Stripe\ApiResource
|
|||
*/
|
||||
public function approve($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/approve';
|
||||
$url = $this->instanceUrl() . '/approve';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class Authorization extends \Stripe\ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -74,7 +74,7 @@ class Authorization extends \Stripe\ApiResource
|
|||
*/
|
||||
public function decline($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/decline';
|
||||
$url = $this->instanceUrl() . '/decline';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -8,33 +8,33 @@ namespace Stripe\Issuing;
|
|||
* You can <a href="https://stripe.com/docs/issuing/cards">create physical or
|
||||
* virtual cards</a> that are issued to cardholders.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $brand The brand of the card.
|
||||
* @property null|string $cancellation_reason The reason why the card was canceled.
|
||||
* @property \Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a Cardholder</a></p>
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Supported currencies are <code>usd</code> in the US, <code>eur</code> in the EU, and <code>gbp</code> in the UK.
|
||||
* @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">"Retrieve a card" endpoint</a>, not via "List all cards" or any other endpoint.
|
||||
* @property int $exp_month The expiration month of the card.
|
||||
* @property int $exp_year The expiration year of the card.
|
||||
* @property null|string $financial_account The financial account this card is attached to.
|
||||
* @property string $last4 The last 4 digits of the card number.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">"Retrieve a card" endpoint</a>, not via "List all cards" or any other endpoint.
|
||||
* @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
|
||||
* @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
|
||||
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
|
||||
* @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
|
||||
* @property \Stripe\StripeObject $spending_controls
|
||||
* @property string $status Whether authorizations can be approved on this card.
|
||||
* @property string $type The type of the card.
|
||||
* @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $brand The brand of the card.
|
||||
* @property null|string $cancellation_reason The reason why the card was canceled.
|
||||
* @property \Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a Cardholder</a></p>
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Supported currencies are <code>usd</code> in the US, <code>eur</code> in the EU, and <code>gbp</code> in the UK.
|
||||
* @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">"Retrieve a card" endpoint</a>, not via "List all cards" or any other endpoint.
|
||||
* @property int $exp_month The expiration month of the card.
|
||||
* @property int $exp_year The expiration year of the card.
|
||||
* @property null|string $financial_account The financial account this card is attached to.
|
||||
* @property string $last4 The last 4 digits of the card number.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">"Retrieve a card" endpoint</a>, not via "List all cards" or any other endpoint.
|
||||
* @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
|
||||
* @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
|
||||
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
|
||||
* @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
|
||||
* @property \Stripe\StripeObject $spending_controls
|
||||
* @property string $status Whether authorizations can be approved on this card.
|
||||
* @property string $type The type of the card.
|
||||
* @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
|
||||
*/
|
||||
class Card extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.card';
|
||||
public const OBJECT_NAME = 'issuing.card';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe\Issuing;
|
||||
|
||||
|
|
@ -7,13 +7,13 @@ namespace Stripe\Issuing;
|
|||
*
|
||||
* @property string $id
|
||||
* @property string $object
|
||||
* @property Card $card
|
||||
* @property Card $card
|
||||
* @property string $cvc
|
||||
* @property int $exp_month
|
||||
* @property int $exp_year
|
||||
* @property int $exp_month
|
||||
* @property int $exp_year
|
||||
* @property string $number
|
||||
*/
|
||||
class CardDetails extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.card_details';
|
||||
public const OBJECT_NAME = 'issuing.card_details';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -12,25 +12,25 @@ namespace Stripe\Issuing;
|
|||
* href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a
|
||||
* Cardholder</a>
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $billing
|
||||
* @property null|\Stripe\StripeObject $company Additional information about a <code>company</code> cardholder.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $email The cardholder's email address.
|
||||
* @property null|\Stripe\StripeObject $individual Additional information about an <code>individual</code> cardholder.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $name The cardholder's name. This will be printed on cards issued to them.
|
||||
* @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the <a href="https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied">3D Secure documentation</a> for more details.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $billing
|
||||
* @property null|\Stripe\StripeObject $company Additional information about a <code>company</code> cardholder.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $email The cardholder's email address.
|
||||
* @property null|\Stripe\StripeObject $individual Additional information about an <code>individual</code> cardholder.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $name The cardholder's name. This will be printed on cards issued to them.
|
||||
* @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the <a href="https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied">3D Secure documentation</a> for more details.
|
||||
* @property \Stripe\StripeObject $requirements
|
||||
* @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our <a href="https://stripe.com/docs/issuing/controls/spending-controls">documentation</a> for more details.
|
||||
* @property string $status Specifies whether to permit authorizations on this cardholder's cards.
|
||||
* @property string $type One of <code>individual</code> or <code>company</code>.
|
||||
* @property string $status Specifies whether to permit authorizations on this cardholder's cards.
|
||||
* @property string $type One of <code>individual</code> or <code>company</code>.
|
||||
*/
|
||||
class Cardholder extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.cardholder';
|
||||
public const OBJECT_NAME = 'issuing.cardholder';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -13,22 +13,22 @@ namespace Stripe\Issuing;
|
|||
* href="https://stripe.com/docs/issuing/purchases/disputes">Disputing
|
||||
* Transactions</a>
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Disputed amount in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. Usually the amount of the <code>transaction</code>, but can differ (usually because of currency fluctuation).
|
||||
* @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency The currency the <code>transaction</code> was made in.
|
||||
* @property \Stripe\StripeObject $evidence
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $status Current status of the dispute.
|
||||
* @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Disputed amount in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. Usually the amount of the <code>transaction</code>, but can differ (usually because of currency fluctuation).
|
||||
* @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency The currency the <code>transaction</code> was made in.
|
||||
* @property \Stripe\StripeObject $evidence
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $status Current status of the dispute.
|
||||
* @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
*/
|
||||
class Dispute extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.dispute';
|
||||
public const OBJECT_NAME = 'issuing.dispute';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Create;
|
||||
|
|
@ -36,7 +36,7 @@ class Dispute extends \Stripe\ApiResource
|
|||
use \Stripe\ApiOperations\Update;
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -45,7 +45,7 @@ class Dispute extends \Stripe\ApiResource
|
|||
*/
|
||||
public function submit($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/submit';
|
||||
$url = $this->instanceUrl() . '/submit';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,30 +14,30 @@ namespace Stripe\Issuing;
|
|||
* href="https://stripe.com/docs/issuing/purchases/transactions">Issued Card
|
||||
* Transactions</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|string|\Stripe\Issuing\Authorization $authorization The <code>Authorization</code> object that led to this transaction.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a> associated with this transaction.
|
||||
* @property string|\Stripe\Issuing\Card $card The card used to make this transaction.
|
||||
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $merchant_amount The amount that the merchant will receive, denominated in <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. It will be different from <code>amount</code> if the merchant is taking payment in a different currency.
|
||||
* @property string $merchant_currency The currency with which the merchant is taking payment.
|
||||
* @property \Stripe\StripeObject $merchant_data
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
* @property string $type The nature of the transaction.
|
||||
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
|
||||
* @property null|string|\Stripe\Issuing\Authorization $authorization The <code>Authorization</code> object that led to this transaction.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a> associated with this transaction.
|
||||
* @property string|\Stripe\Issuing\Card $card The card used to make this transaction.
|
||||
* @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property int $merchant_amount The amount that the merchant will receive, denominated in <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. It will be different from <code>amount</code> if the merchant is taking payment in a different currency.
|
||||
* @property string $merchant_currency The currency with which the merchant is taking payment.
|
||||
* @property \Stripe\StripeObject $merchant_data
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
|
||||
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
* @property string $type The nature of the transaction.
|
||||
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>.
|
||||
*/
|
||||
class Transaction extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'issuing.transaction';
|
||||
public const OBJECT_NAME = 'issuing.transaction';
|
||||
|
||||
use \Stripe\ApiOperations\All;
|
||||
use \Stripe\ApiOperations\Retrieve;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -7,20 +7,20 @@ namespace Stripe;
|
|||
/**
|
||||
* A line item.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount_discount Total discount amount applied. If no discounts were applied, defaults to 0.
|
||||
* @property int $amount_subtotal Total before any discounts or taxes are applied.
|
||||
* @property int $amount_tax Total tax amount applied. If no tax was applied, defaults to 0.
|
||||
* @property int $amount_total Total after discounts and taxes.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
|
||||
* @property \Stripe\StripeObject[] $discounts The discounts applied to the line item.
|
||||
* @property null|\Stripe\Price $price The price used to generate the line item.
|
||||
* @property null|int $quantity The quantity of products being purchased.
|
||||
* @property \Stripe\StripeObject[] $taxes The taxes applied to the line item.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount_discount Total discount amount applied. If no discounts were applied, defaults to 0.
|
||||
* @property int $amount_subtotal Total before any discounts or taxes are applied.
|
||||
* @property int $amount_tax Total tax amount applied. If no tax was applied, defaults to 0.
|
||||
* @property int $amount_total Total after discounts and taxes.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
|
||||
* @property \Stripe\StripeObject[] $discounts The discounts applied to the line item.
|
||||
* @property null|\Stripe\Price $price The price used to generate the line item.
|
||||
* @property null|int $quantity The quantity of products being purchased.
|
||||
* @property \Stripe\StripeObject[] $taxes The taxes applied to the line item.
|
||||
*/
|
||||
class LineItem extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'item';
|
||||
public const OBJECT_NAME = 'item';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $url The URL for the login link.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $url The URL for the login link.
|
||||
*/
|
||||
class LoginLink extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'login_link';
|
||||
public const OBJECT_NAME = 'login_link';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -8,20 +8,20 @@ namespace Stripe;
|
|||
* A Mandate is a record of the permission a customer has given you to debit their
|
||||
* payment method.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $customer_acceptance
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $multi_use
|
||||
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
|
||||
* @property \Stripe\StripeObject $payment_method_details
|
||||
* @property \Stripe\StripeObject $single_use
|
||||
* @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment.
|
||||
* @property string $type The type of the mandate.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $customer_acceptance
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $multi_use
|
||||
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
|
||||
* @property \Stripe\StripeObject $payment_method_details
|
||||
* @property \Stripe\StripeObject $single_use
|
||||
* @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment.
|
||||
* @property string $type The type of the mandate.
|
||||
*/
|
||||
class Mandate extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'mandate';
|
||||
public const OBJECT_NAME = 'mandate';
|
||||
|
||||
use ApiOperations\Retrieve;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -40,8 +40,8 @@ abstract class OAuth
|
|||
*/
|
||||
public static function token($params = null, $opts = null)
|
||||
{
|
||||
$base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
|
||||
$requestor = new ApiRequestor(null, $base);
|
||||
$base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
|
||||
$requestor = new ApiRequestor(null, $base);
|
||||
list($response, $apiKey) = $requestor->request(
|
||||
'post',
|
||||
'/oauth/token',
|
||||
|
|
@ -64,10 +64,10 @@ abstract class OAuth
|
|||
*/
|
||||
public static function deauthorize($params = null, $opts = null)
|
||||
{
|
||||
$params = $params ?: [];
|
||||
$base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
|
||||
$requestor = new ApiRequestor(null, $base);
|
||||
$params['client_id'] = self::_getClientId($params);
|
||||
$params = $params ?: [];
|
||||
$base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
|
||||
$requestor = new ApiRequestor(null, $base);
|
||||
$params['client_id'] = self::_getClientId($params);
|
||||
list($response, $apiKey) = $requestor->request(
|
||||
'post',
|
||||
'/oauth/deauthorize',
|
||||
|
|
@ -81,10 +81,10 @@ abstract class OAuth
|
|||
private static function _getClientId($params = null)
|
||||
{
|
||||
$clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null;
|
||||
if (null === $clientId) {
|
||||
if ($clientId === null) {
|
||||
$clientId = Stripe::getClientId();
|
||||
}
|
||||
if (null === $clientId) {
|
||||
if ($clientId === null) {
|
||||
$msg = 'No client_id provided. (HINT: set your client_id using '
|
||||
. '"Stripe::setClientId(<CLIENT-ID>)". You can find your client_ids '
|
||||
. 'in your Stripe dashboard at '
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
|
|
@ -13,17 +13,17 @@ class OAuthErrorObject extends StripeObject
|
|||
/**
|
||||
* Refreshes this object using the provided values.
|
||||
*
|
||||
* @param array $values
|
||||
* @param array $values
|
||||
* @param null|array|string|Util\RequestOptions $opts
|
||||
* @param bool $partial defaults to false
|
||||
* @param bool $partial defaults to false
|
||||
*/
|
||||
public function refreshFrom($values, $opts, $partial = false)
|
||||
public function refreshFrom($values, $opts, $partial = false) : void
|
||||
{
|
||||
// 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' => null,
|
||||
'error_description' => null,
|
||||
], $values);
|
||||
parent::refreshFrom($values, $opts, $partial);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -18,49 +18,49 @@ namespace Stripe;
|
|||
* Related guide: <a
|
||||
* href="https://stripe.com/docs/payments/payment-intents">Payment Intents API</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
||||
* @property int $amount_capturable Amount that can be captured from this PaymentIntent.
|
||||
* @property \Stripe\StripeObject $amount_details
|
||||
* @property int $amount_received Amount that was collected by this PaymentIntent.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a>.
|
||||
* @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the <a href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard</a>
|
||||
* @property null|int $canceled_at Populated when <code>status</code> is <code>canceled</code>, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (<code>duplicate</code>, <code>fraudulent</code>, <code>requested_by_customer</code>, or <code>abandoned</code>) or generated by Stripe internally (<code>failed_invoice</code>, <code>void_invoice</code>, or <code>automatic</code>).
|
||||
* @property string $capture_method Controls when the funds will be captured from the customer's account.
|
||||
* @property null|string $client_secret <p>The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.</p><p>The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/payments/accept-a-payment?ui=elements">accept a payment</a> and learn about how <code>client_secret</code> should be handled.</p>
|
||||
* @property string $confirmation_method
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Customer $customer <p>ID of the Customer this PaymentIntent belongs to, if one exists.</p><p>Payment methods attached to other Customers cannot be used with this PaymentIntent.</p><p>If present in combination with <a href="https://stripe.com/docs/api#payment_intent_object-setup_future_usage">setup_future_usage</a>, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.</p>
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists.
|
||||
* @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
|
||||
* @property null|string|\Stripe\Charge $latest_charge The latest charge created by this payment intent.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the <a href="https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata">documentation</a>.
|
||||
* @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
* @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent.
|
||||
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent.
|
||||
* @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
|
||||
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
|
||||
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If <code>receipt_email</code> is specified for a payment in live mode, a receipt will be sent regardless of your <a href="https://dashboard.stripe.com/account/emails">email settings</a>.
|
||||
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
|
||||
* @property null|string $setup_future_usage <p>Indicates that you intend to make future payments with this PaymentIntent's payment method.</p><p>Providing this parameter will <a href="https://stripe.com/docs/payments/save-during-payment">attach the payment method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be <a href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer after the transaction completes.</p><p>When processing card payments, Stripe also uses <code>setup_future_usage</code> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.</p>
|
||||
* @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
|
||||
* @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
|
||||
* @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
|
||||
* @property string $status Status of this PaymentIntent, one of <code>requires_payment_method</code>, <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>requires_capture</code>, <code>canceled</code>, or <code>succeeded</code>. Read more about each PaymentIntent <a href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>.
|
||||
* @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
* @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
||||
* @property int $amount_capturable Amount that can be captured from this PaymentIntent.
|
||||
* @property \Stripe\StripeObject $amount_details
|
||||
* @property int $amount_received Amount that was collected by this PaymentIntent.
|
||||
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a>.
|
||||
* @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the <a href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard</a>
|
||||
* @property null|int $canceled_at Populated when <code>status</code> is <code>canceled</code>, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (<code>duplicate</code>, <code>fraudulent</code>, <code>requested_by_customer</code>, or <code>abandoned</code>) or generated by Stripe internally (<code>failed_invoice</code>, <code>void_invoice</code>, or <code>automatic</code>).
|
||||
* @property string $capture_method Controls when the funds will be captured from the customer's account.
|
||||
* @property null|string $client_secret <p>The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.</p><p>The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/payments/accept-a-payment?ui=elements">accept a payment</a> and learn about how <code>client_secret</code> should be handled.</p>
|
||||
* @property string $confirmation_method
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string|\Stripe\Customer $customer <p>ID of the Customer this PaymentIntent belongs to, if one exists.</p><p>Payment methods attached to other Customers cannot be used with this PaymentIntent.</p><p>If present in combination with <a href="https://stripe.com/docs/api#payment_intent_object-setup_future_usage">setup_future_usage</a>, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.</p>
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists.
|
||||
* @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
|
||||
* @property null|string|\Stripe\Charge $latest_charge The latest charge created by this payment intent.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the <a href="https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata">documentation</a>.
|
||||
* @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
* @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent.
|
||||
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent.
|
||||
* @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
|
||||
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
|
||||
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If <code>receipt_email</code> is specified for a payment in live mode, a receipt will be sent regardless of your <a href="https://dashboard.stripe.com/account/emails">email settings</a>.
|
||||
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
|
||||
* @property null|string $setup_future_usage <p>Indicates that you intend to make future payments with this PaymentIntent's payment method.</p><p>Providing this parameter will <a href="https://stripe.com/docs/payments/save-during-payment">attach the payment method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be <a href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer after the transaction completes.</p><p>When processing card payments, Stripe also uses <code>setup_future_usage</code> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.</p>
|
||||
* @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
|
||||
* @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
|
||||
* @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
|
||||
* @property string $status Status of this PaymentIntent, one of <code>requires_payment_method</code>, <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>requires_capture</code>, <code>canceled</code>, or <code>succeeded</code>. Read more about each PaymentIntent <a href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>.
|
||||
* @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
* @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
|
||||
*/
|
||||
class PaymentIntent extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'payment_intent';
|
||||
public const OBJECT_NAME = 'payment_intent';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -68,16 +68,22 @@ class PaymentIntent extends ApiResource
|
|||
use ApiOperations\Search;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const STATUS_CANCELED = 'canceled';
|
||||
const STATUS_PROCESSING = 'processing';
|
||||
const STATUS_REQUIRES_ACTION = 'requires_action';
|
||||
const STATUS_REQUIRES_CAPTURE = 'requires_capture';
|
||||
const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation';
|
||||
const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
|
||||
const STATUS_SUCCEEDED = 'succeeded';
|
||||
public const STATUS_CANCELED = 'canceled';
|
||||
|
||||
public const STATUS_PROCESSING = 'processing';
|
||||
|
||||
public const STATUS_REQUIRES_ACTION = 'requires_action';
|
||||
|
||||
public const STATUS_REQUIRES_CAPTURE = 'requires_capture';
|
||||
|
||||
public const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation';
|
||||
|
||||
public const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
|
||||
|
||||
public const STATUS_SUCCEEDED = 'succeeded';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -86,7 +92,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function applyCustomerBalance($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/apply_customer_balance';
|
||||
$url = $this->instanceUrl() . '/apply_customer_balance';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -94,7 +100,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -103,7 +109,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function cancel($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -111,7 +117,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -120,7 +126,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function capture($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/capture';
|
||||
$url = $this->instanceUrl() . '/capture';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -128,7 +134,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -137,7 +143,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function confirm($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/confirm';
|
||||
$url = $this->instanceUrl() . '/confirm';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -145,7 +151,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -154,7 +160,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function incrementAuthorization($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/increment_authorization';
|
||||
$url = $this->instanceUrl() . '/increment_authorization';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -162,7 +168,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -171,7 +177,7 @@ class PaymentIntent extends ApiResource
|
|||
*/
|
||||
public function verifyMicrodeposits($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/verify_microdeposits';
|
||||
$url = $this->instanceUrl() . '/verify_microdeposits';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -179,7 +185,7 @@ class PaymentIntent extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -17,61 +17,67 @@ namespace Stripe;
|
|||
* Related guide: <a
|
||||
* href="https://stripe.com/docs/payments/payment-links/api">Payment Links API</a>
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the payment link's <code>url</code> is active. If <code>false</code>, customers visiting the URL will be shown a page saying that the link has been deactivated.
|
||||
* @property \Stripe\StripeObject $after_completion
|
||||
* @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
|
||||
* @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property string $billing_address_collection Configuration for collecting the customer's billing address.
|
||||
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration to gather active consent from customers.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $custom_text
|
||||
* @property string $customer_creation Configuration for Customer creation during checkout.
|
||||
* @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the <a href="https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts">Connect documentation</a> for details.
|
||||
* @property null|\Stripe\StripeObject $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
|
||||
* @property string $payment_method_collection Configuration for collecting a payment method during checkout.
|
||||
* @property null|string[] $payment_method_types The list of payment method types that customers can use. When <code>null</code>, Stripe will dynamically show relevant payment methods you've enabled in your <a href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
|
||||
* @property \Stripe\StripeObject $phone_number_collection
|
||||
* @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address.
|
||||
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session.
|
||||
* @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
|
||||
* @property null|\Stripe\StripeObject $subscription_data When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use <code>subscription_data</code>.
|
||||
* @property \Stripe\StripeObject $tax_id_collection
|
||||
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
|
||||
* @property string $url The public URL that can be shared with customers.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the payment link's <code>url</code> is active. If <code>false</code>, customers visiting the URL will be shown a page saying that the link has been deactivated.
|
||||
* @property \Stripe\StripeObject $after_completion
|
||||
* @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled.
|
||||
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
|
||||
* @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property string $billing_address_collection Configuration for collecting the customer's billing address.
|
||||
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration to gather active consent from customers.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $custom_text
|
||||
* @property string $customer_creation Configuration for Customer creation during checkout.
|
||||
* @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the <a href="https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts">Connect documentation</a> for details.
|
||||
* @property null|\Stripe\StripeObject $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
|
||||
* @property string $payment_method_collection Configuration for collecting a payment method during checkout.
|
||||
* @property null|string[] $payment_method_types The list of payment method types that customers can use. When <code>null</code>, Stripe will dynamically show relevant payment methods you've enabled in your <a href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
|
||||
* @property \Stripe\StripeObject $phone_number_collection
|
||||
* @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address.
|
||||
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session.
|
||||
* @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
|
||||
* @property null|\Stripe\StripeObject $subscription_data When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use <code>subscription_data</code>.
|
||||
* @property \Stripe\StripeObject $tax_id_collection
|
||||
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
|
||||
* @property string $url The public URL that can be shared with customers.
|
||||
*/
|
||||
class PaymentLink extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'payment_link';
|
||||
public const OBJECT_NAME = 'payment_link';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
use ApiOperations\Retrieve;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
|
||||
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
|
||||
public const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
|
||||
|
||||
const CUSTOMER_CREATION_ALWAYS = 'always';
|
||||
const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
|
||||
public const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
|
||||
|
||||
const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always';
|
||||
const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required';
|
||||
public const CUSTOMER_CREATION_ALWAYS = 'always';
|
||||
|
||||
const SUBMIT_TYPE_AUTO = 'auto';
|
||||
const SUBMIT_TYPE_BOOK = 'book';
|
||||
const SUBMIT_TYPE_DONATE = 'donate';
|
||||
const SUBMIT_TYPE_PAY = 'pay';
|
||||
public const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
|
||||
|
||||
public const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always';
|
||||
|
||||
public const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required';
|
||||
|
||||
public const SUBMIT_TYPE_AUTO = 'auto';
|
||||
|
||||
public const SUBMIT_TYPE_BOOK = 'book';
|
||||
|
||||
public const SUBMIT_TYPE_DONATE = 'donate';
|
||||
|
||||
public const SUBMIT_TYPE_PAY = 'pay';
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -80,9 +86,9 @@ class PaymentLink extends ApiResource
|
|||
*/
|
||||
public static function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
$url = static::resourceUrl($id) . '/line_items';
|
||||
$url = static::resourceUrl($id) . '/line_items';
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -16,49 +16,49 @@ namespace Stripe;
|
|||
* <a href="https://stripe.com/docs/payments/more-payment-scenarios">More Payment
|
||||
* Scenarios</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $acss_debit
|
||||
* @property \Stripe\StripeObject $affirm
|
||||
* @property \Stripe\StripeObject $afterpay_clearpay
|
||||
* @property \Stripe\StripeObject $alipay
|
||||
* @property \Stripe\StripeObject $au_becs_debit
|
||||
* @property \Stripe\StripeObject $bacs_debit
|
||||
* @property \Stripe\StripeObject $bancontact
|
||||
* @property \Stripe\StripeObject $billing_details
|
||||
* @property \Stripe\StripeObject $blik
|
||||
* @property \Stripe\StripeObject $boleto
|
||||
* @property \Stripe\StripeObject $card
|
||||
* @property \Stripe\StripeObject $card_present
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
|
||||
* @property \Stripe\StripeObject $customer_balance
|
||||
* @property \Stripe\StripeObject $eps
|
||||
* @property \Stripe\StripeObject $fpx
|
||||
* @property \Stripe\StripeObject $giropay
|
||||
* @property \Stripe\StripeObject $grabpay
|
||||
* @property \Stripe\StripeObject $ideal
|
||||
* @property \Stripe\StripeObject $interac_present
|
||||
* @property \Stripe\StripeObject $klarna
|
||||
* @property \Stripe\StripeObject $konbini
|
||||
* @property \Stripe\StripeObject $link
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $oxxo
|
||||
* @property \Stripe\StripeObject $p24
|
||||
* @property \Stripe\StripeObject $paynow
|
||||
* @property \Stripe\StripeObject $pix
|
||||
* @property \Stripe\StripeObject $promptpay
|
||||
* @property \Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
|
||||
* @property \Stripe\StripeObject $sepa_debit
|
||||
* @property \Stripe\StripeObject $sofort
|
||||
* @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
|
||||
* @property \Stripe\StripeObject $us_bank_account
|
||||
* @property \Stripe\StripeObject $wechat_pay
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property \Stripe\StripeObject $acss_debit
|
||||
* @property \Stripe\StripeObject $affirm
|
||||
* @property \Stripe\StripeObject $afterpay_clearpay
|
||||
* @property \Stripe\StripeObject $alipay
|
||||
* @property \Stripe\StripeObject $au_becs_debit
|
||||
* @property \Stripe\StripeObject $bacs_debit
|
||||
* @property \Stripe\StripeObject $bancontact
|
||||
* @property \Stripe\StripeObject $billing_details
|
||||
* @property \Stripe\StripeObject $blik
|
||||
* @property \Stripe\StripeObject $boleto
|
||||
* @property \Stripe\StripeObject $card
|
||||
* @property \Stripe\StripeObject $card_present
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
|
||||
* @property \Stripe\StripeObject $customer_balance
|
||||
* @property \Stripe\StripeObject $eps
|
||||
* @property \Stripe\StripeObject $fpx
|
||||
* @property \Stripe\StripeObject $giropay
|
||||
* @property \Stripe\StripeObject $grabpay
|
||||
* @property \Stripe\StripeObject $ideal
|
||||
* @property \Stripe\StripeObject $interac_present
|
||||
* @property \Stripe\StripeObject $klarna
|
||||
* @property \Stripe\StripeObject $konbini
|
||||
* @property \Stripe\StripeObject $link
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property \Stripe\StripeObject $oxxo
|
||||
* @property \Stripe\StripeObject $p24
|
||||
* @property \Stripe\StripeObject $paynow
|
||||
* @property \Stripe\StripeObject $pix
|
||||
* @property \Stripe\StripeObject $promptpay
|
||||
* @property \Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
|
||||
* @property \Stripe\StripeObject $sepa_debit
|
||||
* @property \Stripe\StripeObject $sofort
|
||||
* @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
|
||||
* @property \Stripe\StripeObject $us_bank_account
|
||||
* @property \Stripe\StripeObject $wechat_pay
|
||||
*/
|
||||
class PaymentMethod extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'payment_method';
|
||||
public const OBJECT_NAME = 'payment_method';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -66,7 +66,7 @@ class PaymentMethod extends ApiResource
|
|||
use ApiOperations\Update;
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -75,7 +75,7 @@ class PaymentMethod extends ApiResource
|
|||
*/
|
||||
public function attach($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/attach';
|
||||
$url = $this->instanceUrl() . '/attach';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ class PaymentMethod extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -92,7 +92,7 @@ class PaymentMethod extends ApiResource
|
|||
*/
|
||||
public function detach($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/detach';
|
||||
$url = $this->instanceUrl() . '/detach';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -14,68 +14,88 @@ namespace Stripe;
|
|||
*
|
||||
* Related guide: <a href="https://stripe.com/docs/payouts">Receiving Payouts</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount (in %s) to be transferred to your bank account or debit card.
|
||||
* @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.
|
||||
* @property bool $automatic Returns <code>true</code> if the payout was created by an <a href="https://stripe.com/docs/payouts#payout-schedule">automated payout schedule</a>, and <code>false</code> if it was <a href="https://stripe.com/docs/payouts#manual-payouts">requested manually</a>.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to.
|
||||
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.
|
||||
* @property null|string $failure_code Error code explaining reason for payout failure if available. See <a href="https://stripe.com/docs/api#payout_failures">Types of payout failures</a> for a list of failure codes.
|
||||
* @property null|string $failure_message Message to user further explaining reason for payout failure if available.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $method The method used to send this payout, which can be <code>standard</code> or <code>instant</code>. <code>instant</code> is only supported for payouts to debit cards. (See <a href="https://stripe.com/blog/instant-payouts-for-marketplaces">Instant payouts for marketplaces</a> for more information.)
|
||||
* @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
|
||||
* @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout.
|
||||
* @property string $source_type The source balance this payout came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
|
||||
* @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement.
|
||||
* @property string $status Current status of the payout: <code>paid</code>, <code>pending</code>, <code>in_transit</code>, <code>canceled</code> or <code>failed</code>. A payout is <code>pending</code> until it is submitted to the bank, when it becomes <code>in_transit</code>. The status then changes to <code>paid</code> if the transaction goes through, or to <code>failed</code> or <code>canceled</code> (within 5 business days). Some failed payouts may initially show as <code>paid</code> but then change to <code>failed</code>.
|
||||
* @property string $type Can be <code>bank_account</code> or <code>card</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property int $amount Amount (in %s) to be transferred to your bank account or debit card.
|
||||
* @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.
|
||||
* @property bool $automatic Returns <code>true</code> if the payout was created by an <a href="https://stripe.com/docs/payouts#payout-schedule">automated payout schedule</a>, and <code>false</code> if it was <a href="https://stripe.com/docs/payouts#manual-payouts">requested manually</a>.
|
||||
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to.
|
||||
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.
|
||||
* @property null|string $failure_code Error code explaining reason for payout failure if available. See <a href="https://stripe.com/docs/api#payout_failures">Types of payout failures</a> for a list of failure codes.
|
||||
* @property null|string $failure_message Message to user further explaining reason for payout failure if available.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property string $method The method used to send this payout, which can be <code>standard</code> or <code>instant</code>. <code>instant</code> is only supported for payouts to debit cards. (See <a href="https://stripe.com/blog/instant-payouts-for-marketplaces">Instant payouts for marketplaces</a> for more information.)
|
||||
* @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
|
||||
* @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout.
|
||||
* @property string $source_type The source balance this payout came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
|
||||
* @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement.
|
||||
* @property string $status Current status of the payout: <code>paid</code>, <code>pending</code>, <code>in_transit</code>, <code>canceled</code> or <code>failed</code>. A payout is <code>pending</code> until it is submitted to the bank, when it becomes <code>in_transit</code>. The status then changes to <code>paid</code> if the transaction goes through, or to <code>failed</code> or <code>canceled</code> (within 5 business days). Some failed payouts may initially show as <code>paid</code> but then change to <code>failed</code>.
|
||||
* @property string $type Can be <code>bank_account</code> or <code>card</code>.
|
||||
*/
|
||||
class Payout extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'payout';
|
||||
public const OBJECT_NAME = 'payout';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
use ApiOperations\Retrieve;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const FAILURE_ACCOUNT_CLOSED = 'account_closed';
|
||||
const FAILURE_ACCOUNT_FROZEN = 'account_frozen';
|
||||
const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
|
||||
const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed';
|
||||
const FAILURE_COULD_NOT_PROCESS = 'could_not_process';
|
||||
const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
const FAILURE_DECLINED = 'declined';
|
||||
const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address';
|
||||
const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
|
||||
const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id';
|
||||
const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
|
||||
const FAILURE_INVALID_CURRENCY = 'invalid_currency';
|
||||
const FAILURE_NO_ACCOUNT = 'no_account';
|
||||
const FAILURE_UNSUPPORTED_CARD = 'unsupported_card';
|
||||
public const FAILURE_ACCOUNT_CLOSED = 'account_closed';
|
||||
|
||||
const METHOD_INSTANT = 'instant';
|
||||
const METHOD_STANDARD = 'standard';
|
||||
public const FAILURE_ACCOUNT_FROZEN = 'account_frozen';
|
||||
|
||||
const STATUS_CANCELED = 'canceled';
|
||||
const STATUS_FAILED = 'failed';
|
||||
const STATUS_IN_TRANSIT = 'in_transit';
|
||||
const STATUS_PAID = 'paid';
|
||||
const STATUS_PENDING = 'pending';
|
||||
public const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
|
||||
|
||||
const TYPE_BANK_ACCOUNT = 'bank_account';
|
||||
const TYPE_CARD = 'card';
|
||||
public const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed';
|
||||
|
||||
public const FAILURE_COULD_NOT_PROCESS = 'could_not_process';
|
||||
|
||||
public const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
|
||||
public const FAILURE_DECLINED = 'declined';
|
||||
|
||||
public const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address';
|
||||
|
||||
public const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
|
||||
|
||||
public const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id';
|
||||
|
||||
public const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
|
||||
public const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
|
||||
|
||||
public const FAILURE_INVALID_CURRENCY = 'invalid_currency';
|
||||
|
||||
public const FAILURE_NO_ACCOUNT = 'no_account';
|
||||
|
||||
public const FAILURE_UNSUPPORTED_CARD = 'unsupported_card';
|
||||
|
||||
public const METHOD_INSTANT = 'instant';
|
||||
|
||||
public const METHOD_STANDARD = 'standard';
|
||||
|
||||
public const STATUS_CANCELED = 'canceled';
|
||||
|
||||
public const STATUS_FAILED = 'failed';
|
||||
|
||||
public const STATUS_IN_TRANSIT = 'in_transit';
|
||||
|
||||
public const STATUS_PAID = 'paid';
|
||||
|
||||
public const STATUS_PENDING = 'pending';
|
||||
|
||||
public const TYPE_BANK_ACCOUNT = 'bank_account';
|
||||
|
||||
public const TYPE_CARD = 'card';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -84,7 +104,7 @@ class Payout extends ApiResource
|
|||
*/
|
||||
public function cancel($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
$url = $this->instanceUrl() . '/cancel';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
@ -92,7 +112,7 @@ class Payout extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
@ -101,7 +121,7 @@ class Payout extends ApiResource
|
|||
*/
|
||||
public function reverse($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/reverse';
|
||||
$url = $this->instanceUrl() . '/reverse';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -19,60 +19,64 @@ namespace Stripe;
|
|||
* href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling
|
||||
* Identity Verification with the API</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $account The account the person is associated with.
|
||||
* @property \Stripe\StripeObject $address
|
||||
* @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only).
|
||||
* @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only).
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $dob
|
||||
* @property null|string $email The person's email address.
|
||||
* @property null|string $first_name The person's first name.
|
||||
* @property null|string $first_name_kana The Kana variation of the person's first name (Japan only).
|
||||
* @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only).
|
||||
* @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
|
||||
* @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
|
||||
* @property null|string $gender The person's gender (International regulations require either "male" or "female").
|
||||
* @property bool $id_number_provided Whether the person's <code>id_number</code> was provided.
|
||||
* @property bool $id_number_secondary_provided Whether the person's <code>id_number_secondary</code> was provided.
|
||||
* @property null|string $last_name The person's last name.
|
||||
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
|
||||
* @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only).
|
||||
* @property null|string $maiden_name The person's maiden name.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nationality The country where the person is a national.
|
||||
* @property null|string $phone The person's phone number.
|
||||
* @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
|
||||
* @property \Stripe\StripeObject $registered_address
|
||||
* @property \Stripe\StripeObject $relationship
|
||||
* @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
|
||||
* @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
|
||||
* @property \Stripe\StripeObject $verification
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $account The account the person is associated with.
|
||||
* @property \Stripe\StripeObject $address
|
||||
* @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only).
|
||||
* @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only).
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property \Stripe\StripeObject $dob
|
||||
* @property null|string $email The person's email address.
|
||||
* @property null|string $first_name The person's first name.
|
||||
* @property null|string $first_name_kana The Kana variation of the person's first name (Japan only).
|
||||
* @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only).
|
||||
* @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
|
||||
* @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
|
||||
* @property null|string $gender The person's gender (International regulations require either "male" or "female").
|
||||
* @property bool $id_number_provided Whether the person's <code>id_number</code> was provided.
|
||||
* @property bool $id_number_secondary_provided Whether the person's <code>id_number_secondary</code> was provided.
|
||||
* @property null|string $last_name The person's last name.
|
||||
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
|
||||
* @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only).
|
||||
* @property null|string $maiden_name The person's maiden name.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nationality The country where the person is a national.
|
||||
* @property null|string $phone The person's phone number.
|
||||
* @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
|
||||
* @property \Stripe\StripeObject $registered_address
|
||||
* @property \Stripe\StripeObject $relationship
|
||||
* @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
|
||||
* @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
|
||||
* @property \Stripe\StripeObject $verification
|
||||
*/
|
||||
class Person extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'person';
|
||||
public const OBJECT_NAME = 'person';
|
||||
|
||||
use ApiOperations\Delete;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const GENDER_FEMALE = 'female';
|
||||
const GENDER_MALE = 'male';
|
||||
public const GENDER_FEMALE = 'female';
|
||||
|
||||
const POLITICAL_EXPOSURE_EXISTING = 'existing';
|
||||
const POLITICAL_EXPOSURE_NONE = 'none';
|
||||
public const GENDER_MALE = 'male';
|
||||
|
||||
const VERIFICATION_STATUS_PENDING = 'pending';
|
||||
const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
|
||||
const VERIFICATION_STATUS_VERIFIED = 'verified';
|
||||
public const POLITICAL_EXPOSURE_EXISTING = 'existing';
|
||||
|
||||
public const POLITICAL_EXPOSURE_NONE = 'none';
|
||||
|
||||
public const VERIFICATION_STATUS_PENDING = 'pending';
|
||||
|
||||
public const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
|
||||
|
||||
public const VERIFICATION_STATUS_VERIFIED = 'verified';
|
||||
|
||||
/**
|
||||
* @return string the API URL for this Stripe account reversal
|
||||
*/
|
||||
public function instanceUrl()
|
||||
{
|
||||
$id = $this['id'];
|
||||
$id = $this['id'];
|
||||
$account = $this['account'];
|
||||
if (!$id) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
|
|
@ -81,23 +85,23 @@ class Person extends ApiResource
|
|||
null
|
||||
);
|
||||
}
|
||||
$id = Util\Util::utf8($id);
|
||||
$id = Util\Util::utf8($id);
|
||||
$account = Util\Util::utf8($account);
|
||||
|
||||
$base = Account::classUrl();
|
||||
$base = Account::classUrl();
|
||||
$accountExtn = \urlencode($account);
|
||||
$extn = \urlencode($id);
|
||||
$extn = \urlencode($id);
|
||||
|
||||
return "{$base}/{$accountExtn}/persons/{$extn}";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string $_id
|
||||
* @param array|string $_id
|
||||
* @param null|array|string $_opts
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function retrieve($_id, $_opts = null)
|
||||
public static function retrieve($_id, $_opts = null) : void
|
||||
{
|
||||
$msg = 'Persons cannot be retrieved without an account ID. Retrieve ' .
|
||||
"a person using `Account::retrievePerson('account_id', " .
|
||||
|
|
@ -107,13 +111,13 @@ class Person extends ApiResource
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param string $_id
|
||||
* @param null|array $_params
|
||||
* @param null|array|string $_options
|
||||
*
|
||||
* @throws \Stripe\Exception\BadMethodCallException
|
||||
*/
|
||||
public static function update($_id, $_params = null, $_options = null)
|
||||
public static function update($_id, $_params = null, $_options = null) : void
|
||||
{
|
||||
$msg = 'Persons cannot be updated without an account ID. Update ' .
|
||||
"a person using `Account::updatePerson('account_id', " .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -24,30 +24,30 @@ namespace Stripe;
|
|||
* a subscription</a> and more about <a
|
||||
* href="https://stripe.com/docs/products-prices/overview">products and prices</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the plan can be used for new purchases.
|
||||
* @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of <code>usage_type=metered</code>. Allowed values are <code>sum</code> for summing up all usage during a period, <code>last_during_period</code> for using the last usage record reported within a period, <code>last_ever</code> for using the last usage record ever (across period bounds) or <code>max</code> which uses the usage record with the maximum reported usage during a period. Defaults to <code>sum</code>.
|
||||
* @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>amount</code>) will be charged per unit in <code>quantity</code> (for plans with <code>usage_type=licensed</code>), or per unit of total usage (for plans with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $interval The frequency at which a subscription is billed. One of <code>day</code>, <code>week</code>, <code>month</code> or <code>year</code>.
|
||||
* @property int $interval_count The number of intervals (specified in the <code>interval</code> attribute) between subscription billings. For example, <code>interval=month</code> and <code>interval_count=3</code> bills every 3 months.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nickname A brief description of the plan, hidden from customers.
|
||||
* @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
|
||||
* @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>.
|
||||
* @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows.
|
||||
* @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>.
|
||||
* @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using <a href="https://stripe.com/docs/api#create_subscription-trial_from_plan"><code>trial_from_plan=true</code></a>.
|
||||
* @property string $usage_type Configures how the quantity per period should be determined. Can be either <code>metered</code> or <code>licensed</code>. <code>licensed</code> automatically bills the <code>quantity</code> set when adding it to a subscription. <code>metered</code> aggregates the total usage based on usage records. Defaults to <code>licensed</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the plan can be used for new purchases.
|
||||
* @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of <code>usage_type=metered</code>. Allowed values are <code>sum</code> for summing up all usage during a period, <code>last_during_period</code> for using the last usage record reported within a period, <code>last_ever</code> for using the last usage record ever (across period bounds) or <code>max</code> which uses the usage record with the maximum reported usage during a period. Defaults to <code>sum</code>.
|
||||
* @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>amount</code>) will be charged per unit in <code>quantity</code> (for plans with <code>usage_type=licensed</code>), or per unit of total usage (for plans with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $interval The frequency at which a subscription is billed. One of <code>day</code>, <code>week</code>, <code>month</code> or <code>year</code>.
|
||||
* @property int $interval_count The number of intervals (specified in the <code>interval</code> attribute) between subscription billings. For example, <code>interval=month</code> and <code>interval_count=3</code> bills every 3 months.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nickname A brief description of the plan, hidden from customers.
|
||||
* @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
|
||||
* @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>.
|
||||
* @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows.
|
||||
* @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>.
|
||||
* @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using <a href="https://stripe.com/docs/api#create_subscription-trial_from_plan"><code>trial_from_plan=true</code></a>.
|
||||
* @property string $usage_type Configures how the quantity per period should be determined. Can be either <code>metered</code> or <code>licensed</code>. <code>licensed</code> automatically bills the <code>quantity</code> set when adding it to a subscription. <code>metered</code> aggregates the total usage based on usage records. Defaults to <code>licensed</code>.
|
||||
*/
|
||||
class Plan extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'plan';
|
||||
public const OBJECT_NAME = 'plan';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
|
|
@ -23,31 +23,31 @@ namespace Stripe;
|
|||
* and more about <a
|
||||
* href="https://stripe.com/docs/products-prices/overview">products and prices</a>.
|
||||
*
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the price can be used for new purchases.
|
||||
* @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>unit_amount</code> or <code>unit_amount_decimal</code>) will be charged per unit in <code>quantity</code> (for prices with <code>usage_type=licensed</code>), or per unit of total usage (for prices with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nickname A brief description of the price, hidden from customers.
|
||||
* @property string|\Stripe\Product $product The ID of the product this price is associated with.
|
||||
* @property null|\Stripe\StripeObject $recurring The recurring components of a price such as <code>interval</code> and <code>usage_type</code>.
|
||||
* @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of <code>inclusive</code>, <code>exclusive</code>, or <code>unspecified</code>. Once specified as either <code>inclusive</code> or <code>exclusive</code>, it cannot be changed.
|
||||
* @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>.
|
||||
* @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows.
|
||||
* @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>.
|
||||
* @property string $type One of <code>one_time</code> or <code>recurring</code> depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
||||
* @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property bool $active Whether the price can be used for new purchases.
|
||||
* @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>unit_amount</code> or <code>unit_amount_decimal</code>) will be charged per unit in <code>quantity</code> (for prices with <code>usage_type=licensed</code>), or per unit of total usage (for prices with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
||||
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $nickname A brief description of the price, hidden from customers.
|
||||
* @property string|\Stripe\Product $product The ID of the product this price is associated with.
|
||||
* @property null|\Stripe\StripeObject $recurring The recurring components of a price such as <code>interval</code> and <code>usage_type</code>.
|
||||
* @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of <code>inclusive</code>, <code>exclusive</code>, or <code>unspecified</code>. Once specified as either <code>inclusive</code> or <code>exclusive</code>, it cannot be changed.
|
||||
* @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>.
|
||||
* @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows.
|
||||
* @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>.
|
||||
* @property string $type One of <code>one_time</code> or <code>recurring</code> depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
||||
* @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if <code>billing_scheme=per_unit</code>.
|
||||
* @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if <code>billing_scheme=per_unit</code>.
|
||||
*/
|
||||
class Price extends ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'price';
|
||||
public const OBJECT_NAME = 'price';
|
||||
|
||||
use ApiOperations\All;
|
||||
use ApiOperations\Create;
|
||||
|
|
@ -55,21 +55,26 @@ class Price extends ApiResource
|
|||
use ApiOperations\Search;
|
||||
use ApiOperations\Update;
|
||||
|
||||
const BILLING_SCHEME_PER_UNIT = 'per_unit';
|
||||
const BILLING_SCHEME_TIERED = 'tiered';
|
||||
public const BILLING_SCHEME_PER_UNIT = 'per_unit';
|
||||
|
||||
const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
|
||||
const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
|
||||
const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
|
||||
public const BILLING_SCHEME_TIERED = 'tiered';
|
||||
|
||||
const TIERS_MODE_GRADUATED = 'graduated';
|
||||
const TIERS_MODE_VOLUME = 'volume';
|
||||
public const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
|
||||
|
||||
const TYPE_ONE_TIME = 'one_time';
|
||||
const TYPE_RECURRING = 'recurring';
|
||||
public const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
|
||||
|
||||
public const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
|
||||
|
||||
public const TIERS_MODE_GRADUATED = 'graduated';
|
||||
|
||||
public const TIERS_MODE_VOLUME = 'volume';
|
||||
|
||||
public const TYPE_ONE_TIME = 'one_time';
|
||||
|
||||
public const TYPE_RECURRING = 'recurring';
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user