mirror of https://github.com/itflow-org/itflow
Bump DataTable from 2.3.3 to 2.3.4, TinyMCE 8.0.2 to 8.2.0, Stripe-PHP 17.6.0 to 18.1.0, PHPMailer from 6.10.0 to 7.0.0, chartjs from 4.5.0 to 4.5.1
This commit is contained in:
parent
7ea39eb545
commit
f733a27ad7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -48,7 +48,7 @@ This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/o
|
||||||
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"phpmailer/phpmailer": "^6.10.0"
|
"phpmailer/phpmailer": "^7.0.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
or run
|
or run
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
6.10.0
|
7.0.0
|
||||||
|
|
|
||||||
|
|
@ -49,14 +49,15 @@
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
|
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
|
||||||
|
"ext-imap": "Needed to support advanced email address parsing according to RFC822",
|
||||||
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||||
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
|
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
|
||||||
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
|
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
|
||||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||||
"psr/log": "For optional PSR-3 debug logging",
|
"psr/log": "For optional PSR-3 debug logging",
|
||||||
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication",
|
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
|
||||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
@ -71,6 +72,7 @@
|
||||||
"license": "LGPL-2.1-only",
|
"license": "LGPL-2.1-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"check": "./vendor/bin/phpcs",
|
"check": "./vendor/bin/phpcs",
|
||||||
|
"style": "./vendor/bin/phpcbf",
|
||||||
"test": "./vendor/bin/phpunit --no-coverage",
|
"test": "./vendor/bin/phpunit --no-coverage",
|
||||||
"coverage": "./vendor/bin/phpunit",
|
"coverage": "./vendor/bin/phpunit",
|
||||||
"lint": [
|
"lint": [
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
|
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
|
||||||
$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP está afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.';
|
$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP ha sido afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
|
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
|
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
|
||||||
|
|
@ -18,7 +18,7 @@ $PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
|
||||||
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
|
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
|
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
|
$PHPMAILER_LANG['from_failed'] = 'La siguiente dirección de remitente falló: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
|
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
|
||||||
$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
|
$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
|
||||||
|
|
@ -34,3 +34,5 @@ $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
|
||||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
|
$PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
|
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
|
||||||
|
$PHPMAILER_LANG['imap_recommended'] = 'No se recomienda usar el analizador de direcciones simplificado. Instala la extensión IMAP de PHP para un análisis RFC822 más completo.';
|
||||||
|
$PHPMAILER_LANG['deprecated_argument'] = 'El argumento $useimap ha quedado obsoleto';
|
||||||
|
|
|
||||||
|
|
@ -561,9 +561,9 @@ class PHPMailer
|
||||||
* string $body the email body
|
* string $body the email body
|
||||||
* string $from email address of sender
|
* string $from email address of sender
|
||||||
* string $extra extra information of possible use
|
* string $extra extra information of possible use
|
||||||
* "smtp_transaction_id' => last smtp transaction id
|
* 'smtp_transaction_id' => last smtp transaction id
|
||||||
*
|
*
|
||||||
* @var string
|
* @var callable|callable-string
|
||||||
*/
|
*/
|
||||||
public $action_function = '';
|
public $action_function = '';
|
||||||
|
|
||||||
|
|
@ -711,7 +711,7 @@ class PHPMailer
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $language = [];
|
protected static $language = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of errors encountered.
|
* The number of errors encountered.
|
||||||
|
|
@ -768,7 +768,7 @@ class PHPMailer
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.10.0';
|
const VERSION = '7.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error severity: message only, continue processing.
|
* Error severity: message only, continue processing.
|
||||||
|
|
@ -1102,7 +1102,7 @@ class PHPMailer
|
||||||
//At-sign is missing.
|
//At-sign is missing.
|
||||||
$error_message = sprintf(
|
$error_message = sprintf(
|
||||||
'%s (%s): %s',
|
'%s (%s): %s',
|
||||||
$this->lang('invalid_address'),
|
self::lang('invalid_address'),
|
||||||
$kind,
|
$kind,
|
||||||
$address
|
$address
|
||||||
);
|
);
|
||||||
|
|
@ -1187,7 +1187,7 @@ class PHPMailer
|
||||||
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
|
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
|
||||||
$error_message = sprintf(
|
$error_message = sprintf(
|
||||||
'%s: %s',
|
'%s: %s',
|
||||||
$this->lang('Invalid recipient kind'),
|
self::lang('Invalid recipient kind'),
|
||||||
$kind
|
$kind
|
||||||
);
|
);
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
|
|
@ -1201,7 +1201,7 @@ class PHPMailer
|
||||||
if (!static::validateAddress($address)) {
|
if (!static::validateAddress($address)) {
|
||||||
$error_message = sprintf(
|
$error_message = sprintf(
|
||||||
'%s (%s): %s',
|
'%s (%s): %s',
|
||||||
$this->lang('invalid_address'),
|
self::lang('invalid_address'),
|
||||||
$kind,
|
$kind,
|
||||||
$address
|
$address
|
||||||
);
|
);
|
||||||
|
|
@ -1220,12 +1220,16 @@ class PHPMailer
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} elseif (!array_key_exists(strtolower($address), $this->ReplyTo)) {
|
} else {
|
||||||
$this->ReplyTo[strtolower($address)] = [$address, $name];
|
foreach ($this->ReplyTo as $replyTo) {
|
||||||
|
if (0 === strcasecmp($replyTo[0], $address)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->ReplyTo[] = [$address, $name];
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1238,15 +1242,18 @@ class PHPMailer
|
||||||
* @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
|
* @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
|
||||||
*
|
*
|
||||||
* @param string $addrstr The address list string
|
* @param string $addrstr The address list string
|
||||||
* @param bool $useimap Whether to use the IMAP extension to parse the list
|
* @param null $useimap Deprecated argument since 6.11.0.
|
||||||
* @param string $charset The charset to use when decoding the address list string.
|
* @param string $charset The charset to use when decoding the address list string.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591)
|
public static function parseAddresses($addrstr, $useimap = null, $charset = self::CHARSET_ISO88591)
|
||||||
{
|
{
|
||||||
|
if ($useimap !== null) {
|
||||||
|
trigger_error(self::lang('deprecated_argument'), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
$addresses = [];
|
$addresses = [];
|
||||||
if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
|
if (function_exists('imap_rfc822_parse_adrlist')) {
|
||||||
//Use this built-in parser if it's available
|
//Use this built-in parser if it's available
|
||||||
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
||||||
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
|
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
|
||||||
|
|
@ -1256,20 +1263,13 @@ class PHPMailer
|
||||||
'.SYNTAX-ERROR.' !== $address->host &&
|
'.SYNTAX-ERROR.' !== $address->host &&
|
||||||
static::validateAddress($address->mailbox . '@' . $address->host)
|
static::validateAddress($address->mailbox . '@' . $address->host)
|
||||||
) {
|
) {
|
||||||
//Decode the name part if it's present and encoded
|
//Decode the name part if it's present and maybe encoded
|
||||||
if (
|
if (
|
||||||
property_exists($address, 'personal') &&
|
property_exists($address, 'personal')
|
||||||
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
&& is_string($address->personal)
|
||||||
defined('MB_CASE_UPPER') &&
|
&& $address->personal !== ''
|
||||||
preg_match('/^=\?.*\?=$/s', $address->personal)
|
|
||||||
) {
|
) {
|
||||||
$origCharset = mb_internal_encoding();
|
$address->personal = static::decodeHeader($address->personal, $charset);
|
||||||
mb_internal_encoding($charset);
|
|
||||||
//Undo any RFC2047-encoded spaces-as-underscores
|
|
||||||
$address->personal = str_replace('_', '=20', $address->personal);
|
|
||||||
//Decode the name
|
|
||||||
$address->personal = mb_decode_mimeheader($address->personal);
|
|
||||||
mb_internal_encoding($origCharset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$addresses[] = [
|
$addresses[] = [
|
||||||
|
|
@ -1280,40 +1280,51 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Use this simpler parser
|
//Use this simpler parser
|
||||||
$list = explode(',', $addrstr);
|
$addresses = static::parseSimplerAddresses($addrstr, $charset);
|
||||||
foreach ($list as $address) {
|
}
|
||||||
$address = trim($address);
|
|
||||||
//Is there a separate name part?
|
return $addresses;
|
||||||
if (strpos($address, '<') === false) {
|
}
|
||||||
//No separate name, just use the whole thing
|
|
||||||
if (static::validateAddress($address)) {
|
/**
|
||||||
$addresses[] = [
|
* Parse a string containing one or more RFC822-style comma-separated email addresses
|
||||||
'name' => '',
|
* with the form "display name <address>" into an array of name/address pairs.
|
||||||
'address' => $address,
|
* Uses a simpler parser that does not require the IMAP extension but doesnt support
|
||||||
];
|
* the full RFC822 spec. For full RFC822 support, use the PHP IMAP extension.
|
||||||
}
|
*
|
||||||
} else {
|
* @param string $addrstr The address list string
|
||||||
list($name, $email) = explode('<', $address);
|
* @param string $charset The charset to use when decoding the address list string.
|
||||||
$email = trim(str_replace('>', '', $email));
|
*
|
||||||
$name = trim($name);
|
* @return array
|
||||||
if (static::validateAddress($email)) {
|
*/
|
||||||
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
protected static function parseSimplerAddresses($addrstr, $charset)
|
||||||
//If this name is encoded, decode it
|
{
|
||||||
if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) {
|
// Emit a runtime notice to recommend using the IMAP extension for full RFC822 parsing
|
||||||
$origCharset = mb_internal_encoding();
|
trigger_error(self::lang('imap_recommended'), E_USER_NOTICE);
|
||||||
mb_internal_encoding($charset);
|
|
||||||
//Undo any RFC2047-encoded spaces-as-underscores
|
$addresses = [];
|
||||||
$name = str_replace('_', '=20', $name);
|
$list = explode(',', $addrstr);
|
||||||
//Decode the name
|
foreach ($list as $address) {
|
||||||
$name = mb_decode_mimeheader($name);
|
$address = trim($address);
|
||||||
mb_internal_encoding($origCharset);
|
//Is there a separate name part?
|
||||||
}
|
if (strpos($address, '<') === false) {
|
||||||
$addresses[] = [
|
//No separate name, just use the whole thing
|
||||||
//Remove any surrounding quotes and spaces from the name
|
if (static::validateAddress($address)) {
|
||||||
'name' => trim($name, '\'" '),
|
$addresses[] = [
|
||||||
'address' => $email,
|
'name' => '',
|
||||||
];
|
'address' => $address,
|
||||||
}
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$parsed = static::parseEmailString($address);
|
||||||
|
$email = $parsed['email'];
|
||||||
|
if (static::validateAddress($email)) {
|
||||||
|
$name = static::decodeHeader($parsed['name'], $charset);
|
||||||
|
$addresses[] = [
|
||||||
|
//Remove any surrounding quotes and spaces from the name
|
||||||
|
'name' => trim($name, '\'" '),
|
||||||
|
'address' => $email,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1321,6 +1332,42 @@ class PHPMailer
|
||||||
return $addresses;
|
return $addresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse a string containing an email address with an optional name
|
||||||
|
* and divide it into a name and email address.
|
||||||
|
*
|
||||||
|
* @param string $input The email with name.
|
||||||
|
*
|
||||||
|
* @return array{name: string, email: string}
|
||||||
|
*/
|
||||||
|
private static function parseEmailString($input)
|
||||||
|
{
|
||||||
|
$input = trim((string)$input);
|
||||||
|
|
||||||
|
if ($input === '') {
|
||||||
|
return ['name' => '', 'email' => ''];
|
||||||
|
}
|
||||||
|
|
||||||
|
$pattern = '/^\s*(?:(?:"([^"]*)"|\'([^\']*)\'|([^<]*?))\s*)?<\s*([^>]+)\s*>\s*$/';
|
||||||
|
if (preg_match($pattern, $input, $matches)) {
|
||||||
|
$name = '';
|
||||||
|
// Double quotes including special scenarios.
|
||||||
|
if (isset($matches[1]) && $matches[1] !== '') {
|
||||||
|
$name = $matches[1];
|
||||||
|
// Single quotes including special scenarios.
|
||||||
|
} elseif (isset($matches[2]) && $matches[2] !== '') {
|
||||||
|
$name = $matches[2];
|
||||||
|
// Simplest scenario, name and email are in the format "Name <email>".
|
||||||
|
} elseif (isset($matches[3])) {
|
||||||
|
$name = trim($matches[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['name' => $name, 'email' => trim($matches[4])];
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['name' => '', 'email' => $input];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the From and FromName properties.
|
* Set the From and FromName properties.
|
||||||
*
|
*
|
||||||
|
|
@ -1334,6 +1381,10 @@ class PHPMailer
|
||||||
*/
|
*/
|
||||||
public function setFrom($address, $name = '', $auto = true)
|
public function setFrom($address, $name = '', $auto = true)
|
||||||
{
|
{
|
||||||
|
if (is_null($name)) {
|
||||||
|
//Helps avoid a deprecation warning in the preg_replace() below
|
||||||
|
$name = '';
|
||||||
|
}
|
||||||
$address = trim((string)$address);
|
$address = trim((string)$address);
|
||||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||||
//Don't validate now addresses with IDN. Will be done in send().
|
//Don't validate now addresses with IDN. Will be done in send().
|
||||||
|
|
@ -1345,7 +1396,7 @@ class PHPMailer
|
||||||
) {
|
) {
|
||||||
$error_message = sprintf(
|
$error_message = sprintf(
|
||||||
'%s (From): %s',
|
'%s (From): %s',
|
||||||
$this->lang('invalid_address'),
|
self::lang('invalid_address'),
|
||||||
$address
|
$address
|
||||||
);
|
);
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
|
|
@ -1601,7 +1652,7 @@ class PHPMailer
|
||||||
&& ini_get('mail.add_x_header') === '1'
|
&& ini_get('mail.add_x_header') === '1'
|
||||||
&& stripos(PHP_OS, 'WIN') === 0
|
&& stripos(PHP_OS, 'WIN') === 0
|
||||||
) {
|
) {
|
||||||
trigger_error($this->lang('buggy_php'), E_USER_WARNING);
|
trigger_error(self::lang('buggy_php'), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -1631,7 +1682,7 @@ class PHPMailer
|
||||||
call_user_func_array([$this, 'addAnAddress'], $params);
|
call_user_func_array([$this, 'addAnAddress'], $params);
|
||||||
}
|
}
|
||||||
if (count($this->to) + count($this->cc) + count($this->bcc) < 1) {
|
if (count($this->to) + count($this->cc) + count($this->bcc) < 1) {
|
||||||
throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('provide_address'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Validate From, Sender, and ConfirmReadingTo addresses
|
//Validate From, Sender, and ConfirmReadingTo addresses
|
||||||
|
|
@ -1648,7 +1699,7 @@ class PHPMailer
|
||||||
if (!static::validateAddress($this->{$address_kind})) {
|
if (!static::validateAddress($this->{$address_kind})) {
|
||||||
$error_message = sprintf(
|
$error_message = sprintf(
|
||||||
'%s (%s): %s',
|
'%s (%s): %s',
|
||||||
$this->lang('invalid_address'),
|
self::lang('invalid_address'),
|
||||||
$address_kind,
|
$address_kind,
|
||||||
$this->{$address_kind}
|
$this->{$address_kind}
|
||||||
);
|
);
|
||||||
|
|
@ -1670,7 +1721,7 @@ class PHPMailer
|
||||||
$this->setMessageType();
|
$this->setMessageType();
|
||||||
//Refuse to send an empty message unless we are specifically allowing it
|
//Refuse to send an empty message unless we are specifically allowing it
|
||||||
if (!$this->AllowEmpty && empty($this->Body)) {
|
if (!$this->AllowEmpty && empty($this->Body)) {
|
||||||
throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('empty_message'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Trim subject consistently
|
//Trim subject consistently
|
||||||
|
|
@ -1809,8 +1860,10 @@ class PHPMailer
|
||||||
} else {
|
} else {
|
||||||
$sendmailFmt = '%s -oi -f%s -t';
|
$sendmailFmt = '%s -oi -f%s -t';
|
||||||
}
|
}
|
||||||
|
} elseif ($this->Mailer === 'qmail') {
|
||||||
|
$sendmailFmt = '%s';
|
||||||
} else {
|
} else {
|
||||||
//allow sendmail to choose a default envelope sender. It may
|
//Allow sendmail to choose a default envelope sender. It may
|
||||||
//seem preferable to force it to use the From header as with
|
//seem preferable to force it to use the From header as with
|
||||||
//SMTP, but that introduces new problems (see
|
//SMTP, but that introduces new problems (see
|
||||||
//<https://github.com/PHPMailer/PHPMailer/issues/2298>), and
|
//<https://github.com/PHPMailer/PHPMailer/issues/2298>), and
|
||||||
|
|
@ -1828,33 +1881,35 @@ class PHPMailer
|
||||||
foreach ($this->SingleToArray as $toAddr) {
|
foreach ($this->SingleToArray as $toAddr) {
|
||||||
$mail = @popen($sendmail, 'w');
|
$mail = @popen($sendmail, 'w');
|
||||||
if (!$mail) {
|
if (!$mail) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
$this->edebug("To: {$toAddr}");
|
$this->edebug("To: {$toAddr}");
|
||||||
fwrite($mail, 'To: ' . $toAddr . "\n");
|
fwrite($mail, 'To: ' . $toAddr . "\n");
|
||||||
fwrite($mail, $header);
|
fwrite($mail, $header);
|
||||||
fwrite($mail, $body);
|
fwrite($mail, $body);
|
||||||
$result = pclose($mail);
|
$result = pclose($mail);
|
||||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
$addrinfo = static::parseAddresses($toAddr, null, $this->CharSet);
|
||||||
$this->doCallback(
|
foreach ($addrinfo as $addr) {
|
||||||
($result === 0),
|
$this->doCallback(
|
||||||
[[$addrinfo['address'], $addrinfo['name']]],
|
($result === 0),
|
||||||
$this->cc,
|
[[$addr['address'], $addr['name']]],
|
||||||
$this->bcc,
|
$this->cc,
|
||||||
$this->Subject,
|
$this->bcc,
|
||||||
$body,
|
$this->Subject,
|
||||||
$this->From,
|
$body,
|
||||||
[]
|
$this->From,
|
||||||
);
|
[]
|
||||||
|
);
|
||||||
|
}
|
||||||
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||||
if (0 !== $result) {
|
if (0 !== $result) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$mail = @popen($sendmail, 'w');
|
$mail = @popen($sendmail, 'w');
|
||||||
if (!$mail) {
|
if (!$mail) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
fwrite($mail, $header);
|
fwrite($mail, $header);
|
||||||
fwrite($mail, $body);
|
fwrite($mail, $body);
|
||||||
|
|
@ -1871,7 +1926,7 @@ class PHPMailer
|
||||||
);
|
);
|
||||||
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||||
if (0 !== $result) {
|
if (0 !== $result) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2010,17 +2065,19 @@ class PHPMailer
|
||||||
if ($this->SingleTo && count($toArr) > 1) {
|
if ($this->SingleTo && count($toArr) > 1) {
|
||||||
foreach ($toArr as $toAddr) {
|
foreach ($toArr as $toAddr) {
|
||||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
$addrinfo = static::parseAddresses($toAddr, null, $this->CharSet);
|
||||||
$this->doCallback(
|
foreach ($addrinfo as $addr) {
|
||||||
$result,
|
$this->doCallback(
|
||||||
[[$addrinfo['address'], $addrinfo['name']]],
|
$result,
|
||||||
$this->cc,
|
[[$addr['address'], $addr['name']]],
|
||||||
$this->bcc,
|
$this->cc,
|
||||||
$this->Subject,
|
$this->bcc,
|
||||||
$body,
|
$this->Subject,
|
||||||
$this->From,
|
$body,
|
||||||
[]
|
$this->From,
|
||||||
);
|
[]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
||||||
|
|
@ -2030,7 +2087,7 @@ class PHPMailer
|
||||||
ini_set('sendmail_from', $old_from);
|
ini_set('sendmail_from', $old_from);
|
||||||
}
|
}
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('instantiate'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2116,12 +2173,12 @@ class PHPMailer
|
||||||
$header = static::stripTrailingWSP($header) . static::$LE . static::$LE;
|
$header = static::stripTrailingWSP($header) . static::$LE . static::$LE;
|
||||||
$bad_rcpt = [];
|
$bad_rcpt = [];
|
||||||
if (!$this->smtpConnect($this->SMTPOptions)) {
|
if (!$this->smtpConnect($this->SMTPOptions)) {
|
||||||
throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
//If we have recipient addresses that need Unicode support,
|
//If we have recipient addresses that need Unicode support,
|
||||||
//but the server doesn't support it, stop here
|
//but the server doesn't support it, stop here
|
||||||
if ($this->UseSMTPUTF8 && !$this->smtp->getServerExt('SMTPUTF8')) {
|
if ($this->UseSMTPUTF8 && !$this->smtp->getServerExt('SMTPUTF8')) {
|
||||||
throw new Exception($this->lang('no_smtputf8'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('no_smtputf8'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
//Sender already validated in preSend()
|
//Sender already validated in preSend()
|
||||||
if ('' === $this->Sender) {
|
if ('' === $this->Sender) {
|
||||||
|
|
@ -2133,7 +2190,7 @@ class PHPMailer
|
||||||
$this->smtp->xclient($this->SMTPXClient);
|
$this->smtp->xclient($this->SMTPXClient);
|
||||||
}
|
}
|
||||||
if (!$this->smtp->mail($smtp_from)) {
|
if (!$this->smtp->mail($smtp_from)) {
|
||||||
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
$this->setError(self::lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
||||||
throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
|
throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2155,7 +2212,7 @@ class PHPMailer
|
||||||
|
|
||||||
//Only send the DATA command if we have viable recipients
|
//Only send the DATA command if we have viable recipients
|
||||||
if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) {
|
if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) {
|
||||||
throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('data_not_accepted'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
$smtp_transaction_id = $this->smtp->getLastTransactionID();
|
$smtp_transaction_id = $this->smtp->getLastTransactionID();
|
||||||
|
|
@ -2186,7 +2243,7 @@ class PHPMailer
|
||||||
foreach ($bad_rcpt as $bad) {
|
foreach ($bad_rcpt as $bad) {
|
||||||
$errstr .= $bad['to'] . ': ' . $bad['error'];
|
$errstr .= $bad['to'] . ': ' . $bad['error'];
|
||||||
}
|
}
|
||||||
throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE);
|
throw new Exception(self::lang('recipients_failed') . $errstr, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2240,7 +2297,7 @@ class PHPMailer
|
||||||
$hostinfo
|
$hostinfo
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry));
|
$this->edebug(self::lang('invalid_hostentry') . ' ' . trim($hostentry));
|
||||||
//Not a valid host entry
|
//Not a valid host entry
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -2252,7 +2309,7 @@ class PHPMailer
|
||||||
|
|
||||||
//Check the host name is a valid name or IP address before trying to use it
|
//Check the host name is a valid name or IP address before trying to use it
|
||||||
if (!static::isValidHost($hostinfo[2])) {
|
if (!static::isValidHost($hostinfo[2])) {
|
||||||
$this->edebug($this->lang('invalid_host') . ' ' . $hostinfo[2]);
|
$this->edebug(self::lang('invalid_host') . ' ' . $hostinfo[2]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
|
|
@ -2272,7 +2329,7 @@ class PHPMailer
|
||||||
if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) {
|
if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) {
|
||||||
//Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled
|
//Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled
|
||||||
if (!$sslext) {
|
if (!$sslext) {
|
||||||
throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL);
|
throw new Exception(self::lang('extension_missing') . 'openssl', self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$host = $hostinfo[2];
|
$host = $hostinfo[2];
|
||||||
|
|
@ -2324,7 +2381,7 @@ class PHPMailer
|
||||||
$this->oauth
|
$this->oauth
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Exception($this->lang('authenticate'));
|
throw new Exception(self::lang('authenticate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2374,7 +2431,7 @@ class PHPMailer
|
||||||
*
|
*
|
||||||
* @return bool Returns true if the requested language was loaded, false otherwise.
|
* @return bool Returns true if the requested language was loaded, false otherwise.
|
||||||
*/
|
*/
|
||||||
public function setLanguage($langcode = 'en', $lang_path = '')
|
public static function setLanguage($langcode = 'en', $lang_path = '')
|
||||||
{
|
{
|
||||||
//Backwards compatibility for renamed language codes
|
//Backwards compatibility for renamed language codes
|
||||||
$renamed_langcodes = [
|
$renamed_langcodes = [
|
||||||
|
|
@ -2423,6 +2480,9 @@ class PHPMailer
|
||||||
'smtp_error' => 'SMTP server error: ',
|
'smtp_error' => 'SMTP server error: ',
|
||||||
'variable_set' => 'Cannot set or reset variable: ',
|
'variable_set' => 'Cannot set or reset variable: ',
|
||||||
'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses',
|
'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses',
|
||||||
|
'imap_recommended' => 'Using simplified address parser is not recommended. ' .
|
||||||
|
'Install the PHP IMAP extension for full RFC822 parsing.',
|
||||||
|
'deprecated_argument' => 'Argument $useimap is deprecated',
|
||||||
];
|
];
|
||||||
if (empty($lang_path)) {
|
if (empty($lang_path)) {
|
||||||
//Calculate an absolute path so it can work if CWD is not here
|
//Calculate an absolute path so it can work if CWD is not here
|
||||||
|
|
@ -2489,7 +2549,7 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->language = $PHPMAILER_LANG;
|
self::$language = $PHPMAILER_LANG;
|
||||||
|
|
||||||
return $foundlang; //Returns false if language not found
|
return $foundlang; //Returns false if language not found
|
||||||
}
|
}
|
||||||
|
|
@ -2501,11 +2561,11 @@ class PHPMailer
|
||||||
*/
|
*/
|
||||||
public function getTranslations()
|
public function getTranslations()
|
||||||
{
|
{
|
||||||
if (empty($this->language)) {
|
if (empty(self::$language)) {
|
||||||
$this->setLanguage(); // Set the default language.
|
self::setLanguage(); // Set the default language.
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->language;
|
return self::$language;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2928,10 +2988,6 @@ class PHPMailer
|
||||||
//Create unique IDs and preset boundaries
|
//Create unique IDs and preset boundaries
|
||||||
$this->setBoundaries();
|
$this->setBoundaries();
|
||||||
|
|
||||||
if ($this->sign_key_file) {
|
|
||||||
$body .= $this->getMailMIME() . static::$LE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->setWordWrap();
|
$this->setWordWrap();
|
||||||
|
|
||||||
$bodyEncoding = $this->Encoding;
|
$bodyEncoding = $this->Encoding;
|
||||||
|
|
@ -2963,6 +3019,12 @@ class PHPMailer
|
||||||
if (static::ENCODING_BASE64 !== $altBodyEncoding && static::hasLineLongerThanMax($this->AltBody)) {
|
if (static::ENCODING_BASE64 !== $altBodyEncoding && static::hasLineLongerThanMax($this->AltBody)) {
|
||||||
$altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE;
|
$altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->sign_key_file) {
|
||||||
|
$this->Encoding = $bodyEncoding;
|
||||||
|
$body .= $this->getMailMIME() . static::$LE;
|
||||||
|
}
|
||||||
|
|
||||||
//Use this as a preamble in all multipart message types
|
//Use this as a preamble in all multipart message types
|
||||||
$mimepre = '';
|
$mimepre = '';
|
||||||
switch ($this->message_type) {
|
switch ($this->message_type) {
|
||||||
|
|
@ -3144,12 +3206,12 @@ class PHPMailer
|
||||||
if ($this->isError()) {
|
if ($this->isError()) {
|
||||||
$body = '';
|
$body = '';
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL);
|
throw new Exception(self::lang('empty_message'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
} elseif ($this->sign_key_file) {
|
} elseif ($this->sign_key_file) {
|
||||||
try {
|
try {
|
||||||
if (!defined('PKCS7_TEXT')) {
|
if (!defined('PKCS7_TEXT')) {
|
||||||
throw new Exception($this->lang('extension_missing') . 'openssl');
|
throw new Exception(self::lang('extension_missing') . 'openssl');
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = tempnam(sys_get_temp_dir(), 'srcsign');
|
$file = tempnam(sys_get_temp_dir(), 'srcsign');
|
||||||
|
|
@ -3187,7 +3249,7 @@ class PHPMailer
|
||||||
$body = $parts[1];
|
$body = $parts[1];
|
||||||
} else {
|
} else {
|
||||||
@unlink($signed);
|
@unlink($signed);
|
||||||
throw new Exception($this->lang('signing') . openssl_error_string());
|
throw new Exception(self::lang('signing') . openssl_error_string());
|
||||||
}
|
}
|
||||||
} catch (Exception $exc) {
|
} catch (Exception $exc) {
|
||||||
$body = '';
|
$body = '';
|
||||||
|
|
@ -3332,7 +3394,7 @@ class PHPMailer
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
if (!static::fileIsAccessible($path)) {
|
if (!static::fileIsAccessible($path)) {
|
||||||
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
|
throw new Exception(self::lang('file_access') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//If a MIME type is not specified, try to work it out from the file name
|
//If a MIME type is not specified, try to work it out from the file name
|
||||||
|
|
@ -3345,7 +3407,7 @@ class PHPMailer
|
||||||
$name = $filename;
|
$name = $filename;
|
||||||
}
|
}
|
||||||
if (!$this->validateEncoding($encoding)) {
|
if (!$this->validateEncoding($encoding)) {
|
||||||
throw new Exception($this->lang('encoding') . $encoding);
|
throw new Exception(self::lang('encoding') . $encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->attachment[] = [
|
$this->attachment[] = [
|
||||||
|
|
@ -3506,11 +3568,11 @@ class PHPMailer
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!static::fileIsAccessible($path)) {
|
if (!static::fileIsAccessible($path)) {
|
||||||
throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
|
throw new Exception(self::lang('file_open') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
$file_buffer = file_get_contents($path);
|
$file_buffer = file_get_contents($path);
|
||||||
if (false === $file_buffer) {
|
if (false === $file_buffer) {
|
||||||
throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
|
throw new Exception(self::lang('file_open') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
$file_buffer = $this->encodeString($file_buffer, $encoding);
|
$file_buffer = $this->encodeString($file_buffer, $encoding);
|
||||||
|
|
||||||
|
|
@ -3563,9 +3625,9 @@ class PHPMailer
|
||||||
$encoded = $this->encodeQP($str);
|
$encoded = $this->encodeQP($str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->setError($this->lang('encoding') . $encoding);
|
$this->setError(self::lang('encoding') . $encoding);
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception($this->lang('encoding') . $encoding);
|
throw new Exception(self::lang('encoding') . $encoding);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3671,6 +3733,42 @@ class PHPMailer
|
||||||
return trim(static::normalizeBreaks($encoded));
|
return trim(static::normalizeBreaks($encoded));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode an RFC2047-encoded header value
|
||||||
|
* Attempts multiple strategies so it works even when the mbstring extension is disabled.
|
||||||
|
*
|
||||||
|
* @param string $value The header value to decode
|
||||||
|
* @param string $charset The target charset to convert to, defaults to ISO-8859-1 for BC
|
||||||
|
*
|
||||||
|
* @return string The decoded header value
|
||||||
|
*/
|
||||||
|
public static function decodeHeader($value, $charset = self::CHARSET_ISO88591)
|
||||||
|
{
|
||||||
|
if (!is_string($value) || $value === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
// Detect the presence of any RFC2047 encoded-words
|
||||||
|
$hasEncodedWord = (bool) preg_match('/=\?.*\?=/s', $value);
|
||||||
|
if ($hasEncodedWord && defined('MB_CASE_UPPER')) {
|
||||||
|
$origCharset = mb_internal_encoding();
|
||||||
|
// Always decode to UTF-8 to provide a consistent, modern output encoding.
|
||||||
|
mb_internal_encoding($charset);
|
||||||
|
if (PHP_VERSION_ID < 80300) {
|
||||||
|
// Undo any RFC2047-encoded spaces-as-underscores.
|
||||||
|
$value = str_replace('_', '=20', $value);
|
||||||
|
} else {
|
||||||
|
// PHP 8.3+ already interprets underscores as spaces. Remove additional
|
||||||
|
// linear whitespace between adjacent encoded words to avoid double spacing.
|
||||||
|
$value = preg_replace('/(\?=)\s+(=\?)/', '$1$2', $value);
|
||||||
|
}
|
||||||
|
// Decode the header value
|
||||||
|
$value = mb_decode_mimeheader($value);
|
||||||
|
mb_internal_encoding($origCharset);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a string contains multi-byte characters.
|
* Check if a string contains multi-byte characters.
|
||||||
*
|
*
|
||||||
|
|
@ -3840,7 +3938,7 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->validateEncoding($encoding)) {
|
if (!$this->validateEncoding($encoding)) {
|
||||||
throw new Exception($this->lang('encoding') . $encoding);
|
throw new Exception(self::lang('encoding') . $encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Append to $attachment array
|
//Append to $attachment array
|
||||||
|
|
@ -3899,7 +3997,7 @@ class PHPMailer
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
if (!static::fileIsAccessible($path)) {
|
if (!static::fileIsAccessible($path)) {
|
||||||
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
|
throw new Exception(self::lang('file_access') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//If a MIME type is not specified, try to work it out from the file name
|
//If a MIME type is not specified, try to work it out from the file name
|
||||||
|
|
@ -3908,7 +4006,7 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->validateEncoding($encoding)) {
|
if (!$this->validateEncoding($encoding)) {
|
||||||
throw new Exception($this->lang('encoding') . $encoding);
|
throw new Exception(self::lang('encoding') . $encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME);
|
$filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME);
|
||||||
|
|
@ -3974,7 +4072,7 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->validateEncoding($encoding)) {
|
if (!$this->validateEncoding($encoding)) {
|
||||||
throw new Exception($this->lang('encoding') . $encoding);
|
throw new Exception(self::lang('encoding') . $encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Append to $attachment array
|
//Append to $attachment array
|
||||||
|
|
@ -4231,7 +4329,7 @@ class PHPMailer
|
||||||
}
|
}
|
||||||
if (strpbrk($name . $value, "\r\n") !== false) {
|
if (strpbrk($name . $value, "\r\n") !== false) {
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception($this->lang('invalid_header'));
|
throw new Exception(self::lang('invalid_header'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -4255,15 +4353,15 @@ class PHPMailer
|
||||||
if ('smtp' === $this->Mailer && null !== $this->smtp) {
|
if ('smtp' === $this->Mailer && null !== $this->smtp) {
|
||||||
$lasterror = $this->smtp->getError();
|
$lasterror = $this->smtp->getError();
|
||||||
if (!empty($lasterror['error'])) {
|
if (!empty($lasterror['error'])) {
|
||||||
$msg .= ' ' . $this->lang('smtp_error') . $lasterror['error'];
|
$msg .= ' ' . self::lang('smtp_error') . $lasterror['error'];
|
||||||
if (!empty($lasterror['detail'])) {
|
if (!empty($lasterror['detail'])) {
|
||||||
$msg .= ' ' . $this->lang('smtp_detail') . $lasterror['detail'];
|
$msg .= ' ' . self::lang('smtp_detail') . $lasterror['detail'];
|
||||||
}
|
}
|
||||||
if (!empty($lasterror['smtp_code'])) {
|
if (!empty($lasterror['smtp_code'])) {
|
||||||
$msg .= ' ' . $this->lang('smtp_code') . $lasterror['smtp_code'];
|
$msg .= ' ' . self::lang('smtp_code') . $lasterror['smtp_code'];
|
||||||
}
|
}
|
||||||
if (!empty($lasterror['smtp_code_ex'])) {
|
if (!empty($lasterror['smtp_code_ex'])) {
|
||||||
$msg .= ' ' . $this->lang('smtp_code_ex') . $lasterror['smtp_code_ex'];
|
$msg .= ' ' . self::lang('smtp_code_ex') . $lasterror['smtp_code_ex'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4388,21 +4486,21 @@ class PHPMailer
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function lang($key)
|
protected static function lang($key)
|
||||||
{
|
{
|
||||||
if (count($this->language) < 1) {
|
if (count(self::$language) < 1) {
|
||||||
$this->setLanguage(); //Set the default language
|
self::setLanguage(); //Set the default language
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($key, $this->language)) {
|
if (array_key_exists($key, self::$language)) {
|
||||||
if ('smtp_connect_failed' === $key) {
|
if ('smtp_connect_failed' === $key) {
|
||||||
//Include a link to troubleshooting docs on SMTP connection failure.
|
//Include a link to troubleshooting docs on SMTP connection failure.
|
||||||
//This is by far the biggest cause of support questions
|
//This is by far the biggest cause of support questions
|
||||||
//but it's usually not PHPMailer's fault.
|
//but it's usually not PHPMailer's fault.
|
||||||
return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
|
return self::$language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->language[$key];
|
return self::$language[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return the key as a fallback
|
//Return the key as a fallback
|
||||||
|
|
@ -4417,7 +4515,7 @@ class PHPMailer
|
||||||
*/
|
*/
|
||||||
private function getSmtpErrorMessage($base_key)
|
private function getSmtpErrorMessage($base_key)
|
||||||
{
|
{
|
||||||
$message = $this->lang($base_key);
|
$message = self::lang($base_key);
|
||||||
$error = $this->smtp->getError();
|
$error = $this->smtp->getError();
|
||||||
if (!empty($error['error'])) {
|
if (!empty($error['error'])) {
|
||||||
$message .= ' ' . $error['error'];
|
$message .= ' ' . $error['error'];
|
||||||
|
|
@ -4461,7 +4559,7 @@ class PHPMailer
|
||||||
//Ensure name is not empty, and that neither name nor value contain line breaks
|
//Ensure name is not empty, and that neither name nor value contain line breaks
|
||||||
if (empty($name) || strpbrk($name . $value, "\r\n") !== false) {
|
if (empty($name) || strpbrk($name . $value, "\r\n") !== false) {
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception($this->lang('invalid_header'));
|
throw new Exception(self::lang('invalid_header'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -4854,7 +4952,7 @@ class PHPMailer
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$this->setError($this->lang('variable_set') . $name);
|
$this->setError(self::lang('variable_set') . $name);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -4992,7 +5090,7 @@ class PHPMailer
|
||||||
{
|
{
|
||||||
if (!defined('PKCS7_TEXT')) {
|
if (!defined('PKCS7_TEXT')) {
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception($this->lang('extension_missing') . 'openssl');
|
throw new Exception(self::lang('extension_missing') . 'openssl');
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class POP3
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.10.0';
|
const VERSION = '7.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default POP3 port number.
|
* Default POP3 port number.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class SMTP
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.10.0';
|
const VERSION = '7.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP line break constant.
|
* SMTP line break constant.
|
||||||
|
|
@ -205,6 +205,7 @@ class SMTP
|
||||||
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
||||||
'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
|
'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
|
||||||
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
|
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
|
||||||
|
'Gsmtp' => '/[\d]{3} 2\.0\.0 OK (.*) - gsmtp/',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -633,10 +634,41 @@ class SMTP
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$oauth = $OAuth->getOauth64();
|
$oauth = $OAuth->getOauth64();
|
||||||
|
/*
|
||||||
//Start authentication
|
* An SMTP command line can have a maximum length of 512 bytes, including the command name,
|
||||||
if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
|
* so the base64-encoded OAUTH token has a maximum length of:
|
||||||
return false;
|
* 512 - 13 (AUTH XOAUTH2) - 2 (CRLF) = 497 bytes
|
||||||
|
* If the token is longer than that, the command and the token must be sent separately as described in
|
||||||
|
* https://www.rfc-editor.org/rfc/rfc4954#section-4
|
||||||
|
*/
|
||||||
|
if ($oauth === '') {
|
||||||
|
//Sending an empty auth token is legitimate, but it must be encoded as '='
|
||||||
|
//to indicate it's not a 2-part command
|
||||||
|
if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 =', 235)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} elseif (strlen($oauth) <= 497) {
|
||||||
|
//Authenticate using a token in the initial-response part
|
||||||
|
if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//The token is too long, so we need to send it in two parts.
|
||||||
|
//Send the auth command without a token and expect a 334
|
||||||
|
if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2', 334)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//Send the token
|
||||||
|
if (!$this->sendCommand('OAuth TOKEN', $oauth, [235, 334])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//If the server answers with 334, send an empty line and wait for a 235
|
||||||
|
if (
|
||||||
|
substr($this->last_reply, 0, 3) === '334'
|
||||||
|
&& $this->sendCommand('AUTH End', '', 235)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -1309,7 +1341,16 @@ class SMTP
|
||||||
|
|
||||||
//stream_select returns false when the `select` system call is interrupted
|
//stream_select returns false when the `select` system call is interrupted
|
||||||
//by an incoming signal, try the select again
|
//by an incoming signal, try the select again
|
||||||
if (stripos($message, 'interrupted system call') !== false) {
|
if (
|
||||||
|
stripos($message, 'interrupted system call') !== false ||
|
||||||
|
(
|
||||||
|
// on applications with a different locale than english, the message above is not found because
|
||||||
|
// it's translated. So we also check for the SOCKET_EINTR constant which is defined under
|
||||||
|
// Windows and UNIX-like platforms (if available on the platform).
|
||||||
|
defined('SOCKET_EINTR') &&
|
||||||
|
stripos($message, 'stream_select(): Unable to select [' . SOCKET_EINTR . ']') !== false
|
||||||
|
)
|
||||||
|
) {
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
'SMTP -> get_lines(): retrying stream_select',
|
'SMTP -> get_lines(): retrying stream_select',
|
||||||
self::DEBUG_LOWLEVEL
|
self::DEBUG_LOWLEVEL
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
2025-08-27.basil
|
3ccf295957c8cadc88e1463ea3ab4ec683a0314f
|
||||||
|
|
@ -1,4 +1,116 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
## 18.1.0 - 2025-10-29
|
||||||
|
|
||||||
|
This release changes the pinned API version to `2025-10-29.clover`.
|
||||||
|
|
||||||
|
* [#1946](https://github.com/stripe/stripe-php/pull/1946) Update generated code
|
||||||
|
* Improve docs for PaymentIntent related endpoints
|
||||||
|
* [#1942](https://github.com/stripe/stripe-php/pull/1942) Update generated code
|
||||||
|
* Add support for new resources `PaymentAttemptRecord`, `PaymentIntentAmountDetailsLineItem`, and `PaymentRecord`
|
||||||
|
* Add support for `all` and `retrieve` methods on resource `PaymentAttemptRecord`
|
||||||
|
* Add support for `report_payment_attempt_canceled`, `report_payment_attempt_failed`, `report_payment_attempt_guaranteed`, `report_payment_attempt_informational`, `report_payment_attempt`, `report_payment`, `report_refund`, and `retrieve` methods on resource `PaymentRecord`
|
||||||
|
* Add support for `all` method on resource `PaymentIntentAmountDetailsLineItem`
|
||||||
|
* Add support for `representative_declaration` on `Account.company`, `Account.create().$params.company`, `Account.update().$params.company`, and `Token.create().$params.account.company`
|
||||||
|
* Change `Billing\CreditGrant.create().$params.category` to be optional
|
||||||
|
* Add support for `payment_method_configuration` on `BillingPortal\Configuration.create().$params.feature.payment_method_update` and `BillingPortal\Configuration.update().$params.feature.payment_method_update`
|
||||||
|
* Add support for new value `solana` on enum `Charge.payment_method_details.crypto.network`
|
||||||
|
* Add support for `twint` on `Checkout.Session.payment_method_options` and `Checkout\Session.create().$params.payment_method_option`
|
||||||
|
* Add support for new value `custom` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
|
||||||
|
* Add support for `payment_record_refund` and `type` on `CreditNote.create().$params.refund`, `CreditNote.preview().$params.refund`, `CreditNote.preview_lines().$params.refund`, and `CreditNote.refunds[]`
|
||||||
|
* Add support for `customer_sheet` and `mobile_payment_element` on `CustomerSession.components` and `CustomerSession.create().$params.component`
|
||||||
|
* Add support for `provider` on `Customer.tax`
|
||||||
|
* Add support for new values `balance_settings.updated` and `invoice.payment_attempt_required` on enum `Event.type`
|
||||||
|
* Add support for new value `platform_terms_of_service` on enum `File.purpose`
|
||||||
|
* Add support for `payment_record` on `Invoice.attach_payment().$params`, `InvoicePayment.all().$params.payment`, and `InvoicePayment.payment`
|
||||||
|
* Change type of `InvoicePayment.all().$params.payment.type` from `literal('payment_intent')` to `enum('payment_intent'|'payment_record')`
|
||||||
|
* Add support for new value `custom` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
|
||||||
|
* Add support for `amount_details` on `PaymentIntent.capture().$params`, `PaymentIntent.confirm().$params`, `PaymentIntent.create().$params`, `PaymentIntent.increment_authorization().$params`, and `PaymentIntent.update().$params`
|
||||||
|
* Add support for `payment_details` on `PaymentIntent.capture().$params`, `PaymentIntent.confirm().$params`, `PaymentIntent.create().$params`, `PaymentIntent.increment_authorization().$params`, `PaymentIntent.update().$params`, and `PaymentIntent`
|
||||||
|
* Add support for `discount_amount`, `line_items`, `shipping`, and `tax` on `PaymentIntent.amount_details`
|
||||||
|
* Add support for `name_collection` on `PaymentLink.create().$params`, `PaymentLink.update().$params`, and `PaymentLink`
|
||||||
|
* Add support for new value `mb_way` on enum `PaymentLink.payment_method_types`
|
||||||
|
* Add support for `crypto` on `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, and `Refund.destination_details`
|
||||||
|
* Add support for `mb_way` on `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, and `PaymentMethodConfiguration`
|
||||||
|
* Add support for `custom` on `PaymentMethod.create().$params` and `PaymentMethod`
|
||||||
|
* Add support for `excluded_payment_method_types` on `SetupIntent.create().$params`, `SetupIntent.update().$params`, and `SetupIntent`
|
||||||
|
* Add support for `tw` on `Tax.Registration.country_options` and `Tax\Registration.create().$params.country_option`
|
||||||
|
* Add support for `gip` on `Terminal.Configuration.tipping`, `Terminal\Configuration.create().$params.tipping`, and `Terminal\Configuration.update().$params.tipping`
|
||||||
|
* Add support for `last_seen_at` on `Terminal.Reader`
|
||||||
|
* Add support for `gt`, `gte`, `lt`, `lte`, and `types` on `V2\Core\Event.all().$params`
|
||||||
|
* Change `V2\Core\Event.all().$params.object_id` to be optional
|
||||||
|
* Add support for snapshot event `BALANCE_SETTINGS_UPDATED` with resource `BalanceSettings`
|
||||||
|
* Add support for snapshot event `INVOICE_PAYMENT_ATTEMPT_REQUIRED` with resource `Invoice`
|
||||||
|
* Add support for error code `payment_intent_rate_limit_exceeded` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
|
||||||
|
|
||||||
|
## 18.0.0 - 2025-09-30
|
||||||
|
|
||||||
|
This release changes the pinned API version to `2025-09-30.clover` and contains breaking changes (prefixed with ⚠️ below)
|
||||||
|
|
||||||
|
* [#1903](https://github.com/stripe/stripe-php/pull/1903) ⚠️ Add strongly typed EventNotifications
|
||||||
|
We've overhauled how V2 Events are handled in the SDK! This approach should provide a lot more information at authoring and compile time, leading to more robust integrations. As part of this process, there are a number of changes to be aware of.
|
||||||
|
- Added matching `EventNotification` classes for every v2 `Event`. For example, there's now a `V1BillingMeterErrorReportTriggeredEventNotification` to match the existing `V1BillingMeterErrorReportTriggeredEvent`. Each of these interfaces defines a `fetchEvent()` method to retrieve its corresponding event. For events with related objects, there's a `fetchRelatedObject()` method that performs the API call and casts the response to the correct type.
|
||||||
|
- ⚠️ Rename function `StripeClient->parseThinEvent` to `StripeClient->parseEventNotification` and remove the `ThinEvent` class.
|
||||||
|
- This function now returns a `Stripe\V2\Core\EventNotification` (which is the shared base class that all of the more specific `Stripe\*EventNotifications` classes share) instead of `ThinEvent`. When applicable, these event notifications will have the `relatedObject` property and a `fetchRelatedObject()` function. They also have a `fetchEvent()` method to retrieve their corresponding `Stripe\Event\*Event` instance.
|
||||||
|
- If you parse an event the SDK doesn't have types for (e.g. it's newer than the SDK you're using), you'll get an instance of `Stripe\Events\UnknownEventNotification` instead of a more specific type. It has both the `relatedObject` property and the `FetchRelatedObject()` function (but they may be/return `null`)
|
||||||
|
- ⚠️ removed the `Util::json_decode_thin_event_object`. Its functionality was folded into the new `\Stripe\V2\EventNotification::fromJson` method.
|
||||||
|
* [#1925](https://github.com/stripe/stripe-php/pull/1925) add version deprecation note to README
|
||||||
|
- NOTE: we'll be dropping support for PHP 5.6, 7.0, and 7.1 in the next major version (March 2026). The README has been updated with a link to our new [language version support policy](https://docs.stripe.com/sdks/versioning?lang=php#stripe-sdk-language-version-support-policy)
|
||||||
|
* [#1921](https://github.com/stripe/stripe-php/pull/1921) Update generated code
|
||||||
|
* Change `Invoice.id` to be required.
|
||||||
|
* [#1923](https://github.com/stripe/stripe-php/pull/1923) Update generated code
|
||||||
|
* Remove support for `balance_report` and `payout_reconciliation_report` on `AccountSession.components` and `AccountSession.create().$params.component`
|
||||||
|
* [#1920](https://github.com/stripe/stripe-php/pull/1920) Move `V2.Event` API resources to `V2.Core.Events`
|
||||||
|
- ⚠️ Move all V2 Event-related resources (`Event`, `RelatedObject`, etc) from `Stripe\V2` to `Stripe\V2\Core`. They now correctly match their API path and are in line with all other resources. To update your code:
|
||||||
|
```diff
|
||||||
|
-Stripe\V2\Event
|
||||||
|
+Stripe\V2\Core\Event
|
||||||
|
```
|
||||||
|
* [#1916](https://github.com/stripe/stripe-php/pull/1916) Add `StripeContext` object
|
||||||
|
- Add the `StripeContext` class. Previously you could only send a string for `stripe-context` header.
|
||||||
|
- ⚠️ Change `EventNotification` (formerly known as `ThinEvent`)'s `context` property from `string` to `StripeContext`
|
||||||
|
* [#1905](https://github.com/stripe/stripe-php/pull/1905) Added StripeContext, StripeAccount and StripeVersion to BaseStripeClientInterface
|
||||||
|
- ⚠️ Add getter methods `getStripeContext`, `getStripeVersion` and `getStripeAccount` to `BaseStripeClientInterface`. Users with custom StripeClient that implement `StripeClientInterface`, `StripeStreamingClientInterface` or `BaseStripeClientInterface` will have to add implementations for these methods.
|
||||||
|
* [#1898](https://github.com/stripe/stripe-php/pull/1898) ⚠️ Build SDK w/ V2 OpenAPI spec
|
||||||
|
- ⚠️ The delete methods for v2 APIs (the ones in the `StripeClient.v2` namespace) now return a `V2DeletedObject` which has the id of the object that has been deleted and a string representing the type of the object that has been deleted.
|
||||||
|
- the generated types of some properties in `EventDestination` changed from `something: null|string` to `something?: string`
|
||||||
|
|
||||||
|
* [#1900](https://github.com/stripe/stripe-php/pull/1900), [#1912](https://github.com/stripe/stripe-php/pull/1912) Update generated code based on incoming API changes in the `2025-09-30.clover` API version.
|
||||||
|
* ⚠️ Remove support for `link` and `pay_by_bank` on `PaymentMethod.update().$params`
|
||||||
|
* ⚠️ Remove support for `coupon` on `Discount`, `PromotionCode.create().$params`, and `PromotionCode`. Use `Discount.source.coupon`, `PromotionCode.create().$params.promotion.code`, and `PromotionCode.promotion.code` instead.
|
||||||
|
* ⚠️ Remove support for values `saturday` and `sunday` from enum `Account.settings.payouts.schedule.weekly_payout_days`
|
||||||
|
* ⚠️ Remove support for `iterations` on `Invoice.create_preview().$params.schedule_detail.phase`, `SubscriptionSchedule.create().$params.phase`, and `SubscriptionSchedule.update().$params.phase`
|
||||||
|
* Add support for new value `prevented` on enum `Dispute.status`
|
||||||
|
* Add support for new resource `BalanceSettings`
|
||||||
|
* Add support for `retrieve` and `update` methods on resource `BalanceSettings`
|
||||||
|
* Add support for new values `external_request` and `unsupported_business_type` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `BankAccount.future_requirements.errors[].code`, `BankAccount.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
|
||||||
|
* Add support for `source` on `Discount`
|
||||||
|
* Add support for `mb_way_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability`
|
||||||
|
* Add support for `trial_update_behavior` on `BillingPortal.Configuration.features.subscription_update`, `BillingPortal\Configuration.create().$params.feature.subscription_update`, and `BillingPortal\Configuration.update().$params.feature.subscription_update`
|
||||||
|
* Add support for `mb_way` on `Charge.payment_method_details`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethod`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_datum`
|
||||||
|
* Add support for `branding_settings` and `name_collection` on `Checkout.Session` and `Checkout\Session.create().$params`
|
||||||
|
* Add support for `excluded_payment_method_types` on `Checkout.Session`, `Checkout\Session.create().$params`, `PaymentIntent.confirm().$params`, and `PaymentIntent.update().$params`
|
||||||
|
* Add support for `unit_label` on `Checkout\Session.create().$params.line_item.price_datum.product_datum`, `Invoice.add_lines().$params.line.price_datum.product_datum`, `Invoice.update_lines().$params.line.price_datum.product_datum`, `InvoiceLineItem.update().$params.price_datum.product_datum`, and `PaymentLink.create().$params.line_item.price_datum.product_datum`
|
||||||
|
* Add support for `alma`, `billie`, and `satispay` on `Checkout.Session.payment_method_options` and `Checkout\Session.create().$params.payment_method_option`
|
||||||
|
* Add support for `demo_pay` on `Checkout\Session.create().$params.payment_method_option`
|
||||||
|
* Add support for `capture_method` on `Checkout.Session.payment_method_options.affirm`, `Checkout.Session.payment_method_options.afterpay_clearpay`, `Checkout.Session.payment_method_options.amazon_pay`, `Checkout.Session.payment_method_options.card`, `Checkout.Session.payment_method_options.cashapp`, `Checkout.Session.payment_method_options.klarna`, `Checkout.Session.payment_method_options.link`, `Checkout.Session.payment_method_options.mobilepay`, `Checkout.Session.payment_method_options.revolut_pay`, `Checkout\Session.create().$params.payment_method_option.affirm`, `Checkout\Session.create().$params.payment_method_option.afterpay_clearpay`, `Checkout\Session.create().$params.payment_method_option.amazon_pay`, `Checkout\Session.create().$params.payment_method_option.card`, `Checkout\Session.create().$params.payment_method_option.cashapp`, `Checkout\Session.create().$params.payment_method_option.klarna`, `Checkout\Session.create().$params.payment_method_option.link`, `Checkout\Session.create().$params.payment_method_option.mobilepay`, and `Checkout\Session.create().$params.payment_method_option.revolut_pay`
|
||||||
|
* Add support for `flexible` on `Checkout\Session.create().$params.subscription_datum.billing_mode`, `Invoice.create_preview().$params.schedule_detail.billing_mode`, `Invoice.create_preview().$params.subscription_detail.billing_mode`, `Quote.create().$params.subscription_datum.billing_mode`, `Quote.subscription_data.billing_mode`, `Subscription.billing_mode`, `Subscription.create().$params.billing_mode`, `Subscription.migrate().$params.billing_mode`, `SubscriptionSchedule.billing_mode`, and `SubscriptionSchedule.create().$params.billing_mode`
|
||||||
|
* Add support for `business_name` and `individual_name` on `Checkout.Session.collected_information`, `Checkout.Session.customer_details`, `Customer.create().$params`, `Customer.update().$params`, and `Customer`
|
||||||
|
* Add support for new values `mb_way` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
|
||||||
|
* Add support for `chargeback_loss_reason_code` on `Dispute.payment_method_details.klarna`
|
||||||
|
* Add support for `net_amount` and `proration_details` on `InvoiceItem`
|
||||||
|
* Add support for `fraud_disputability_likelihood` and `risk_assessment` on `Issuing\Authorization.create().$params`
|
||||||
|
* Add support for `second_line` on `Issuing.Card`
|
||||||
|
* Add support for new values `mb_way` on enum `PaymentIntent.excluded_payment_method_types`
|
||||||
|
* Add support for `fr_meal_voucher_conecs` on `PaymentMethodConfiguration.create().$params` and `PaymentMethodConfiguration.update().$params`
|
||||||
|
* Add support for `promotion` on `PromotionCode.create().$params` and `PromotionCode`
|
||||||
|
* Add support for new values `acknowledged` and `payment_never_settled` on enum `Review.closed_reason`
|
||||||
|
* Add support for `provider` on `Tax.Settings.defaults`
|
||||||
|
* Add support for `bbpos_wisepad3` on `Terminal.Configuration`, `Terminal\Configuration.create().$params`, and `Terminal\Configuration.update().$params`
|
||||||
|
* Add support for `address_kana`, `address_kanji`, `display_name_kana`, `display_name_kanji`, and `phone` on `Terminal.Location`, `Terminal\Location.create().$params`, and `Terminal\Location.update().$params`
|
||||||
|
* Change `Terminal\Location.create().$params.address` to be optional
|
||||||
|
* Change `Terminal\Location.create().$params.display_name` to be optional
|
||||||
|
* Add support for error codes `financial_connections_account_pending_account_numbers` and `financial_connections_account_unavailable_account_numbers` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
|
||||||
|
|
||||||
|
|
||||||
## 17.6.0 - 2025-08-27
|
## 17.6.0 - 2025-08-27
|
||||||
* [#1895](https://github.com/stripe/stripe-php/pull/1895) Add section on private preview SDKs in readme
|
* [#1895](https://github.com/stripe/stripe-php/pull/1895) Add section on private preview SDKs in readme
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
v1932
|
v2102
|
||||||
|
|
@ -15,6 +15,10 @@ API.
|
||||||
|
|
||||||
PHP 5.6.0 and later.
|
PHP 5.6.0 and later.
|
||||||
|
|
||||||
|
Note that per our [language version support policy](https://docs.stripe.com/sdks/versioning?lang=php#stripe-sdk-language-version-support-policy), support for PHP 5.6, 7.0, and 7.1 will be removed in the March 2026 major version.
|
||||||
|
|
||||||
|
Additional PHP versions will be dropped in future major versions, so upgrade to supported versions if possible.
|
||||||
|
|
||||||
## Composer
|
## Composer
|
||||||
|
|
||||||
You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:
|
You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:
|
||||||
|
|
@ -218,6 +222,7 @@ Some preview features require a name and version to be set in the `Stripe-Versio
|
||||||
```php
|
```php
|
||||||
Stripe::addBetaVersion("feature_beta", "v3");
|
Stripe::addBetaVersion("feature_beta", "v3");
|
||||||
```
|
```
|
||||||
|
|
||||||
### Private Preview SDKs
|
### Private Preview SDKs
|
||||||
|
|
||||||
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
|
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
17.6.0
|
18.1.0
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ require __DIR__ . '/lib/Util/ApiVersion.php';
|
||||||
// Stripe singleton
|
// Stripe singleton
|
||||||
require __DIR__ . '/lib/Stripe.php';
|
require __DIR__ . '/lib/Stripe.php';
|
||||||
|
|
||||||
|
// Stripe Context
|
||||||
|
require __DIR__ . '/lib/StripeContext.php';
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
require __DIR__ . '/lib/Util/CaseInsensitiveArray.php';
|
require __DIR__ . '/lib/Util/CaseInsensitiveArray.php';
|
||||||
require __DIR__ . '/lib/Util/LoggerInterface.php';
|
require __DIR__ . '/lib/Util/LoggerInterface.php';
|
||||||
|
|
@ -14,6 +17,7 @@ require __DIR__ . '/lib/Util/RequestOptions.php';
|
||||||
require __DIR__ . '/lib/Util/Set.php';
|
require __DIR__ . '/lib/Util/Set.php';
|
||||||
require __DIR__ . '/lib/Util/Util.php';
|
require __DIR__ . '/lib/Util/Util.php';
|
||||||
require __DIR__ . '/lib/Util/EventTypes.php';
|
require __DIR__ . '/lib/Util/EventTypes.php';
|
||||||
|
require __DIR__ . '/lib/Util/EventNotificationTypes.php';
|
||||||
require __DIR__ . '/lib/Util/ObjectTypes.php';
|
require __DIR__ . '/lib/Util/ObjectTypes.php';
|
||||||
|
|
||||||
// HttpClient
|
// HttpClient
|
||||||
|
|
@ -68,8 +72,9 @@ require __DIR__ . '/lib/SingletonApiResource.php';
|
||||||
require __DIR__ . '/lib/Service/ServiceNavigatorTrait.php';
|
require __DIR__ . '/lib/Service/ServiceNavigatorTrait.php';
|
||||||
require __DIR__ . '/lib/Service/AbstractService.php';
|
require __DIR__ . '/lib/Service/AbstractService.php';
|
||||||
require __DIR__ . '/lib/Service/AbstractServiceFactory.php';
|
require __DIR__ . '/lib/Service/AbstractServiceFactory.php';
|
||||||
require __DIR__ . '/lib/V2/Event.php';
|
require __DIR__ . '/lib/V2/Core/Event.php';
|
||||||
require __DIR__ . '/lib/ThinEvent.php';
|
require __DIR__ . '/lib/V2/Core/EventNotification.php';
|
||||||
|
require __DIR__ . '/lib/Events/UnknownEventNotification.php';
|
||||||
require __DIR__ . '/lib/Reason.php';
|
require __DIR__ . '/lib/Reason.php';
|
||||||
require __DIR__ . '/lib/RelatedObject.php';
|
require __DIR__ . '/lib/RelatedObject.php';
|
||||||
require __DIR__ . '/lib/Collection.php';
|
require __DIR__ . '/lib/Collection.php';
|
||||||
|
|
@ -95,6 +100,7 @@ require __DIR__ . '/lib/ApplicationFee.php';
|
||||||
require __DIR__ . '/lib/ApplicationFeeRefund.php';
|
require __DIR__ . '/lib/ApplicationFeeRefund.php';
|
||||||
require __DIR__ . '/lib/Apps/Secret.php';
|
require __DIR__ . '/lib/Apps/Secret.php';
|
||||||
require __DIR__ . '/lib/Balance.php';
|
require __DIR__ . '/lib/Balance.php';
|
||||||
|
require __DIR__ . '/lib/BalanceSettings.php';
|
||||||
require __DIR__ . '/lib/BalanceTransaction.php';
|
require __DIR__ . '/lib/BalanceTransaction.php';
|
||||||
require __DIR__ . '/lib/BankAccount.php';
|
require __DIR__ . '/lib/BankAccount.php';
|
||||||
require __DIR__ . '/lib/Billing/Alert.php';
|
require __DIR__ . '/lib/Billing/Alert.php';
|
||||||
|
|
@ -136,8 +142,11 @@ require __DIR__ . '/lib/Event.php';
|
||||||
require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php';
|
require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php';
|
||||||
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
|
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
|
||||||
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php';
|
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php';
|
||||||
|
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEventNotification.php';
|
||||||
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
|
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
|
||||||
|
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEventNotification.php';
|
||||||
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEvent.php';
|
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEvent.php';
|
||||||
|
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEventNotification.php';
|
||||||
require __DIR__ . '/lib/Exception/TemporarySessionExpiredException.php';
|
require __DIR__ . '/lib/Exception/TemporarySessionExpiredException.php';
|
||||||
require __DIR__ . '/lib/ExchangeRate.php';
|
require __DIR__ . '/lib/ExchangeRate.php';
|
||||||
require __DIR__ . '/lib/File.php';
|
require __DIR__ . '/lib/File.php';
|
||||||
|
|
@ -167,11 +176,14 @@ require __DIR__ . '/lib/Issuing/Transaction.php';
|
||||||
require __DIR__ . '/lib/LineItem.php';
|
require __DIR__ . '/lib/LineItem.php';
|
||||||
require __DIR__ . '/lib/LoginLink.php';
|
require __DIR__ . '/lib/LoginLink.php';
|
||||||
require __DIR__ . '/lib/Mandate.php';
|
require __DIR__ . '/lib/Mandate.php';
|
||||||
|
require __DIR__ . '/lib/PaymentAttemptRecord.php';
|
||||||
require __DIR__ . '/lib/PaymentIntent.php';
|
require __DIR__ . '/lib/PaymentIntent.php';
|
||||||
|
require __DIR__ . '/lib/PaymentIntentAmountDetailsLineItem.php';
|
||||||
require __DIR__ . '/lib/PaymentLink.php';
|
require __DIR__ . '/lib/PaymentLink.php';
|
||||||
require __DIR__ . '/lib/PaymentMethod.php';
|
require __DIR__ . '/lib/PaymentMethod.php';
|
||||||
require __DIR__ . '/lib/PaymentMethodConfiguration.php';
|
require __DIR__ . '/lib/PaymentMethodConfiguration.php';
|
||||||
require __DIR__ . '/lib/PaymentMethodDomain.php';
|
require __DIR__ . '/lib/PaymentMethodDomain.php';
|
||||||
|
require __DIR__ . '/lib/PaymentRecord.php';
|
||||||
require __DIR__ . '/lib/Payout.php';
|
require __DIR__ . '/lib/Payout.php';
|
||||||
require __DIR__ . '/lib/Person.php';
|
require __DIR__ . '/lib/Person.php';
|
||||||
require __DIR__ . '/lib/Plan.php';
|
require __DIR__ . '/lib/Plan.php';
|
||||||
|
|
@ -196,6 +208,7 @@ require __DIR__ . '/lib/Service/ApplicationFeeService.php';
|
||||||
require __DIR__ . '/lib/Service/Apps/AppsServiceFactory.php';
|
require __DIR__ . '/lib/Service/Apps/AppsServiceFactory.php';
|
||||||
require __DIR__ . '/lib/Service/Apps/SecretService.php';
|
require __DIR__ . '/lib/Service/Apps/SecretService.php';
|
||||||
require __DIR__ . '/lib/Service/BalanceService.php';
|
require __DIR__ . '/lib/Service/BalanceService.php';
|
||||||
|
require __DIR__ . '/lib/Service/BalanceSettingsService.php';
|
||||||
require __DIR__ . '/lib/Service/BalanceTransactionService.php';
|
require __DIR__ . '/lib/Service/BalanceTransactionService.php';
|
||||||
require __DIR__ . '/lib/Service/Billing/AlertService.php';
|
require __DIR__ . '/lib/Service/Billing/AlertService.php';
|
||||||
require __DIR__ . '/lib/Service/Billing/BillingServiceFactory.php';
|
require __DIR__ . '/lib/Service/Billing/BillingServiceFactory.php';
|
||||||
|
|
@ -254,11 +267,13 @@ require __DIR__ . '/lib/Service/Issuing/PhysicalBundleService.php';
|
||||||
require __DIR__ . '/lib/Service/Issuing/TokenService.php';
|
require __DIR__ . '/lib/Service/Issuing/TokenService.php';
|
||||||
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
|
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
|
||||||
require __DIR__ . '/lib/Service/MandateService.php';
|
require __DIR__ . '/lib/Service/MandateService.php';
|
||||||
|
require __DIR__ . '/lib/Service/PaymentAttemptRecordService.php';
|
||||||
require __DIR__ . '/lib/Service/PaymentIntentService.php';
|
require __DIR__ . '/lib/Service/PaymentIntentService.php';
|
||||||
require __DIR__ . '/lib/Service/PaymentLinkService.php';
|
require __DIR__ . '/lib/Service/PaymentLinkService.php';
|
||||||
require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.php';
|
require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.php';
|
||||||
require __DIR__ . '/lib/Service/PaymentMethodDomainService.php';
|
require __DIR__ . '/lib/Service/PaymentMethodDomainService.php';
|
||||||
require __DIR__ . '/lib/Service/PaymentMethodService.php';
|
require __DIR__ . '/lib/Service/PaymentMethodService.php';
|
||||||
|
require __DIR__ . '/lib/Service/PaymentRecordService.php';
|
||||||
require __DIR__ . '/lib/Service/PayoutService.php';
|
require __DIR__ . '/lib/Service/PayoutService.php';
|
||||||
require __DIR__ . '/lib/Service/PlanService.php';
|
require __DIR__ . '/lib/Service/PlanService.php';
|
||||||
require __DIR__ . '/lib/Service/PriceService.php';
|
require __DIR__ . '/lib/Service/PriceService.php';
|
||||||
|
|
@ -381,7 +396,8 @@ require __DIR__ . '/lib/Treasury/TransactionEntry.php';
|
||||||
require __DIR__ . '/lib/V2/Billing/MeterEvent.php';
|
require __DIR__ . '/lib/V2/Billing/MeterEvent.php';
|
||||||
require __DIR__ . '/lib/V2/Billing/MeterEventAdjustment.php';
|
require __DIR__ . '/lib/V2/Billing/MeterEventAdjustment.php';
|
||||||
require __DIR__ . '/lib/V2/Billing/MeterEventSession.php';
|
require __DIR__ . '/lib/V2/Billing/MeterEventSession.php';
|
||||||
require __DIR__ . '/lib/V2/EventDestination.php';
|
require __DIR__ . '/lib/V2/Core/EventDestination.php';
|
||||||
|
require __DIR__ . '/lib/V2/DeletedObject.php';
|
||||||
require __DIR__ . '/lib/WebhookEndpoint.php';
|
require __DIR__ . '/lib/WebhookEndpoint.php';
|
||||||
|
|
||||||
// The end of the section generated from our OpenAPI spec
|
// The end of the section generated from our OpenAPI spec
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@ namespace Stripe;
|
||||||
* @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 string $account The ID of the account the AccountSession was created for
|
* @property string $account The ID of the account the AccountSession was created for
|
||||||
* @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. 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/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p>
|
* @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. 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/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p>
|
||||||
* @property (object{account_management: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), account_onboarding: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), balance_report: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), balances: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), disputes_list: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), documents: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), financial_account: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, send_money: bool, transfer_balance: bool}&StripeObject)}&StripeObject), financial_account_transactions: (object{enabled: bool, features: (object{card_spend_dispute_management: bool}&StripeObject)}&StripeObject), instant_payouts_promotion: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, instant_payouts: bool}&StripeObject)}&StripeObject), issuing_card: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, spend_control_management: bool}&StripeObject)}&StripeObject), issuing_cards_list: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, disable_stripe_user_authentication: bool, spend_control_management: bool}&StripeObject)}&StripeObject), notification_banner: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), payment_details: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payment_disputes: (object{enabled: bool, features: (object{destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payments: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payout_details: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), payout_reconciliation_report: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), payouts: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), payouts_list: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_registrations: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_settings: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject)}&StripeObject) $components
|
* @property (object{account_management: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), account_onboarding: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), balances: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), disputes_list: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), documents: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), financial_account: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, send_money: bool, transfer_balance: bool}&StripeObject)}&StripeObject), financial_account_transactions: (object{enabled: bool, features: (object{card_spend_dispute_management: bool}&StripeObject)}&StripeObject), instant_payouts_promotion: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, instant_payouts: bool}&StripeObject)}&StripeObject), issuing_card: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, spend_control_management: bool}&StripeObject)}&StripeObject), issuing_cards_list: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, disable_stripe_user_authentication: bool, spend_control_management: bool}&StripeObject)}&StripeObject), notification_banner: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), payment_details: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payment_disputes: (object{enabled: bool, features: (object{destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payments: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payout_details: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), payouts: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), payouts_list: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_registrations: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_settings: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject)}&StripeObject) $components
|
||||||
* @property int $expires_at The timestamp at which this AccountSession will expire.
|
* @property int $expires_at The timestamp at which this AccountSession will expire.
|
||||||
* @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.
|
||||||
*/
|
*/
|
||||||
|
|
@ -28,7 +28,7 @@ class AccountSession extends ApiResource
|
||||||
* Creates a AccountSession object that includes a single-use token that the
|
* Creates a AccountSession object that includes a single-use token that the
|
||||||
* platform can use on their front-end to grant client-side API access.
|
* platform can use on their front-end to grant client-side API access.
|
||||||
*
|
*
|
||||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return AccountSession the created resource
|
* @return AccountSession the created resource
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Options for customizing account balances and payout settings for a Stripe platform’s connected accounts.
|
||||||
|
*
|
||||||
|
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||||
|
* @property (object{debit_negative_balances: null|bool, payouts: null|(object{minimum_balance_by_currency: null|StripeObject, schedule: null|(object{interval: null|string, monthly_payout_days?: int[], weekly_payout_days?: string[]}&StripeObject), statement_descriptor: null|string, status: string}&StripeObject), settlement_timing: (object{delay_days: int, delay_days_override?: int}&StripeObject)}&StripeObject) $payments
|
||||||
|
*/
|
||||||
|
class BalanceSettings extends SingletonApiResource
|
||||||
|
{
|
||||||
|
const OBJECT_NAME = 'balance_settings';
|
||||||
|
|
||||||
|
use ApiOperations\Update;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves balance settings for a given connected account. Related guide: <a
|
||||||
|
* href="/connect/authentication">Making API calls for connected accounts</a>.
|
||||||
|
*
|
||||||
|
* @param null|array|string $opts
|
||||||
|
*
|
||||||
|
* @return BalanceSettings
|
||||||
|
*
|
||||||
|
* @throws Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public static function retrieve($opts = null)
|
||||||
|
{
|
||||||
|
$opts = Util\RequestOptions::parse($opts);
|
||||||
|
$instance = new static(null, $opts);
|
||||||
|
$instance->refresh();
|
||||||
|
|
||||||
|
return $instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates balance settings for a given connected account. Related guide: <a
|
||||||
|
* href="/connect/authentication">Making API calls for connected accounts</a>.
|
||||||
|
*
|
||||||
|
* @param string $id the ID of the resource to update
|
||||||
|
* @param null|array{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{minimum_balance_by_currency?: null|array<string, null|int>, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_timing?: array{delay_days_override?: null|int}}} $params
|
||||||
|
* @param null|array|string $opts
|
||||||
|
*
|
||||||
|
* @return BalanceSettings the updated resource
|
||||||
|
*
|
||||||
|
* @throws Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public static function update($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
self::_validateParams($params);
|
||||||
|
$url = static::resourceUrl($id);
|
||||||
|
|
||||||
|
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||||
|
$obj = Util\Util::convertToStripeObject($response->json, $opts);
|
||||||
|
$obj->setLastResponse($response);
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
namespace Stripe;
|
namespace Stripe;
|
||||||
|
|
||||||
use Stripe\Util\Util;
|
use Stripe\Util\Util;
|
||||||
|
use Stripe\V2\Core\EventNotification;
|
||||||
|
|
||||||
class BaseStripeClient implements StripeClientInterface, StripeStreamingClientInterface
|
class BaseStripeClient implements StripeClientInterface, StripeStreamingClientInterface
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +55,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
* - client_id (null|string): the Stripe client ID, to be used in OAuth requests.
|
* - client_id (null|string): the Stripe client ID, to be used in OAuth requests.
|
||||||
* - stripe_account (null|string): a Stripe account ID. If set, all requests sent by the client
|
* - stripe_account (null|string): a Stripe account ID. If set, all requests sent by the client
|
||||||
* will automatically use the {@code Stripe-Account} header with that account ID.
|
* will automatically use the {@code Stripe-Account} header with that account ID.
|
||||||
* - stripe_context (null|string): a Stripe account or compartment ID. If set, all requests sent by the client
|
* - stripe_context (null|string|\Stripe\StripeContext): a Stripe account or compartment ID. If set, all requests sent by the client
|
||||||
* will automatically use the {@code Stripe-Context} header with that ID.
|
* will automatically use the {@code Stripe-Context} header with that ID.
|
||||||
* - stripe_version (null|string): a Stripe API version. If set, all requests sent by the client
|
* - stripe_version (null|string): a Stripe API version. If set, all requests sent by the client
|
||||||
* will include the {@code Stripe-Version} header with that API version.
|
* will include the {@code Stripe-Version} header with that API version.
|
||||||
|
|
@ -131,6 +132,26 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
return $this->config['stripe_account'];
|
return $this->config['stripe_account'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stripe Context ID used by the client to send requests.
|
||||||
|
*
|
||||||
|
* @return null|string|StripeContext the Stripe Context ID used by the client to send requests
|
||||||
|
*/
|
||||||
|
public function getStripeContext()
|
||||||
|
{
|
||||||
|
return $this->config['stripe_context'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stripe Version used by the client to send requests.
|
||||||
|
*
|
||||||
|
* @return null|string the Stripe Context ID used by the client to send requests
|
||||||
|
*/
|
||||||
|
public function getStripeVersion()
|
||||||
|
{
|
||||||
|
return $this->config['stripe_version'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the base URL for Stripe's API.
|
* Gets the base URL for Stripe's API.
|
||||||
*
|
*
|
||||||
|
|
@ -212,7 +233,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
$requestor = new ApiRequestor($this->apiKeyForRequest($opts), $baseUrl, $this->getAppInfo());
|
$requestor = new ApiRequestor($this->apiKeyForRequest($opts), $baseUrl, $this->getAppInfo());
|
||||||
list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers, $apiMode, ['stripe_client'], $opts->maxNetworkRetries);
|
list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers, $apiMode, ['stripe_client'], $opts->maxNetworkRetries);
|
||||||
$opts->discardNonPersistentHeaders();
|
$opts->discardNonPersistentHeaders();
|
||||||
$obj = Util::convertToStripeObject($response->json, $opts, $apiMode);
|
$obj = Util::convertToStripeObject($response->json, $opts, $apiMode, Util::isV2DeleteRequest($method, $apiMode));
|
||||||
if (\is_array($obj)) {
|
if (\is_array($obj)) {
|
||||||
// Edge case for v2 endpoints that return empty/void response
|
// Edge case for v2 endpoints that return empty/void response
|
||||||
// Example: client->v2->billing->meterEventStream->create
|
// Example: client->v2->billing->meterEventStream->create
|
||||||
|
|
@ -233,10 +254,11 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
* @param null|array $params the parameters of the request
|
* @param null|array $params the parameters of the request
|
||||||
* @param array $opts the special modifiers of the request
|
* @param array $opts the special modifiers of the request
|
||||||
* @param null|int $maxNetworkRetries
|
* @param null|int $maxNetworkRetries
|
||||||
|
* @param null|mixed $usage used internally by the SDK
|
||||||
*
|
*
|
||||||
* @return ApiResponse
|
* @return ApiResponse
|
||||||
*/
|
*/
|
||||||
public function rawRequest($method, $path, $params = null, $opts = [], $maxNetworkRetries = null)
|
public function rawRequest($method, $path, $params = null, $opts = [], $maxNetworkRetries = null, $usage = null)
|
||||||
{
|
{
|
||||||
if ('post' !== $method && null !== $params) {
|
if ('post' !== $method && null !== $params) {
|
||||||
throw new Exception\InvalidArgumentException('Error: rawRequest only supports $params on post requests. Please pass null and add your parameters to $path');
|
throw new Exception\InvalidArgumentException('Error: rawRequest only supports $params on post requests. Please pass null and add your parameters to $path');
|
||||||
|
|
@ -247,10 +269,6 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
$headers = $opts['headers'] ?: [];
|
$headers = $opts['headers'] ?: [];
|
||||||
unset($opts['headers']);
|
unset($opts['headers']);
|
||||||
}
|
}
|
||||||
if (\is_array($opts) && \array_key_exists('stripe_context', $opts)) {
|
|
||||||
$headers['Stripe-Context'] = $opts['stripe_context'];
|
|
||||||
unset($opts['stripe_context']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$defaultRawRequestOpts = $this->defaultOpts;
|
$defaultRawRequestOpts = $this->defaultOpts;
|
||||||
|
|
||||||
|
|
@ -260,7 +278,12 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
$opts->headers = \array_merge($opts->headers, $headers);
|
$opts->headers = \array_merge($opts->headers, $headers);
|
||||||
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
$baseUrl = $opts->apiBase ?: $this->getApiBase();
|
||||||
$requestor = new ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
$requestor = new ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
|
||||||
list($response) = $requestor->request($method, $path, $params, $opts->headers, $apiMode, ['raw_request'], $maxNetworkRetries);
|
|
||||||
|
if (null === $usage) {
|
||||||
|
$usage = ['raw_request'];
|
||||||
|
}
|
||||||
|
|
||||||
|
list($response) = $requestor->request($method, $path, $params, $opts->headers, $apiMode, $usage, $maxNetworkRetries);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
@ -401,8 +424,8 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// stripe_context
|
// stripe_context
|
||||||
if (null !== $config['stripe_context'] && !\is_string($config['stripe_context'])) {
|
if (null !== $config['stripe_context'] && !\is_string($config['stripe_context']) && !($config['stripe_context'] instanceof StripeContext)) {
|
||||||
throw new Exception\InvalidArgumentException('stripe_context must be null or a string');
|
throw new Exception\InvalidArgumentException('stripe_context must be null, a string, or a StripeContext instance');
|
||||||
}
|
}
|
||||||
|
|
||||||
// stripe_version
|
// stripe_version
|
||||||
|
|
@ -466,7 +489,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a V2\Events instance using the provided JSON payload. Throws an
|
* Returns a \Stripe\V2\Core\Events instance using the provided JSON payload. Throws an
|
||||||
* Exception\UnexpectedValueException if the payload is not valid JSON, and
|
* Exception\UnexpectedValueException if the payload is not valid JSON, and
|
||||||
* an Exception\SignatureVerificationException if the signature
|
* an Exception\SignatureVerificationException if the signature
|
||||||
* verification fails for any reason.
|
* verification fails for any reason.
|
||||||
|
|
@ -478,24 +501,16 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||||
* @param int $tolerance maximum difference allowed between the header's
|
* @param int $tolerance maximum difference allowed between the header's
|
||||||
* timestamp and the current time. Defaults to 300 seconds (5 min)
|
* timestamp and the current time. Defaults to 300 seconds (5 min)
|
||||||
*
|
*
|
||||||
* @return ThinEvent
|
* @return EventNotification
|
||||||
*
|
*
|
||||||
* @throws Exception\SignatureVerificationException if the verification fails
|
* @throws Exception\SignatureVerificationException if the verification fails
|
||||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON,
|
* @throws Exception\UnexpectedValueException if the payload is not valid JSON,
|
||||||
*/
|
*/
|
||||||
public function parseThinEvent($payload, $sigHeader, $secret, $tolerance = Webhook::DEFAULT_TOLERANCE)
|
public function parseEventNotification($payload, $sigHeader, $secret, $tolerance = Webhook::DEFAULT_TOLERANCE)
|
||||||
{
|
{
|
||||||
$eventData = Util::utf8($payload);
|
$eventData = Util::utf8($payload);
|
||||||
WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance);
|
WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance);
|
||||||
|
|
||||||
try {
|
return EventNotification::fromJson($eventData, $this);
|
||||||
return Util::json_decode_thin_event_object(
|
|
||||||
$eventData,
|
|
||||||
'\Stripe\ThinEvent'
|
|
||||||
);
|
|
||||||
} catch (\ReflectionException $e) {
|
|
||||||
// Fail gracefully
|
|
||||||
return new ThinEvent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,27 @@ interface BaseStripeClientInterface
|
||||||
*/
|
*/
|
||||||
public function getClientId();
|
public function getClientId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stripe account ID used by the client to send requests.
|
||||||
|
*
|
||||||
|
* @return null|string the Stripe account ID used by the client to send requests
|
||||||
|
*/
|
||||||
|
public function getStripeAccount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stripe Context ID used by the client to send requests.
|
||||||
|
*
|
||||||
|
* @return null|string the Stripe Context ID used by the client to send requests
|
||||||
|
*/
|
||||||
|
public function getStripeContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stripe Version used by the client to send requests.
|
||||||
|
*
|
||||||
|
* @return null|string the Stripe Context ID used by the client to send requests
|
||||||
|
*/
|
||||||
|
public function getStripeVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the base URL for Stripe's API.
|
* Gets the base URL for Stripe's API.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class CreditGrant extends \Stripe\ApiResource
|
||||||
/**
|
/**
|
||||||
* Creates a credit grant.
|
* Creates a credit grant.
|
||||||
*
|
*
|
||||||
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
|
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category?: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return CreditGrant the created resource
|
* @return CreditGrant the created resource
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
namespace Stripe\BillingPortal;
|
namespace Stripe\BillingPortal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A portal configuration describes the functionality and behavior of a portal session.
|
* A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: <a href="/customer-management/configure-portal">Configure the customer portal</a>.
|
||||||
*
|
*
|
||||||
* @property string $id Unique identifier for the object.
|
* @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 $object String representing the object's type. Objects of the same type share the same value.
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Stripe\BillingPortal;
|
||||||
* @property (object{headline: null|string, privacy_policy_url: null|string, terms_of_service_url: null|string}&\Stripe\StripeObject) $business_profile
|
* @property (object{headline: null|string, privacy_policy_url: null|string, terms_of_service_url: null|string}&\Stripe\StripeObject) $business_profile
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @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 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 (object{customer_update: (object{allowed_updates: string[], enabled: bool}&\Stripe\StripeObject), invoice_history: (object{enabled: bool}&\Stripe\StripeObject), payment_method_update: (object{enabled: bool}&\Stripe\StripeObject), subscription_cancel: (object{cancellation_reason: (object{enabled: bool, options: string[]}&\Stripe\StripeObject), enabled: bool, mode: string, proration_behavior: string}&\Stripe\StripeObject), subscription_update: (object{default_allowed_updates: string[], enabled: bool, products?: null|((object{adjustable_quantity: (object{enabled: bool, maximum: null|int, minimum: int}&\Stripe\StripeObject), prices: string[], product: string}&\Stripe\StripeObject))[], proration_behavior: string, schedule_at_period_end: (object{conditions: (object{type: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $features
|
* @property (object{customer_update: (object{allowed_updates: string[], enabled: bool}&\Stripe\StripeObject), invoice_history: (object{enabled: bool}&\Stripe\StripeObject), payment_method_update: (object{enabled: bool}&\Stripe\StripeObject), subscription_cancel: (object{cancellation_reason: (object{enabled: bool, options: string[]}&\Stripe\StripeObject), enabled: bool, mode: string, proration_behavior: string}&\Stripe\StripeObject), subscription_update: (object{default_allowed_updates: string[], enabled: bool, products?: null|((object{adjustable_quantity: (object{enabled: bool, maximum: null|int, minimum: int}&\Stripe\StripeObject), prices: string[], product: string}&\Stripe\StripeObject))[], proration_behavior: string, schedule_at_period_end: (object{conditions: (object{type: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), trial_update_behavior: string}&\Stripe\StripeObject)}&\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 $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 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 (object{enabled: bool, url: null|string}&\Stripe\StripeObject) $login_page
|
* @property (object{enabled: bool, url: null|string}&\Stripe\StripeObject) $login_page
|
||||||
|
|
@ -32,7 +32,7 @@ class Configuration extends \Stripe\ApiResource
|
||||||
* Creates a configuration that describes the functionality and behavior of a
|
* Creates a configuration that describes the functionality and behavior of a
|
||||||
* PortalSession.
|
* PortalSession.
|
||||||
*
|
*
|
||||||
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
|
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return Configuration the created resource
|
* @return Configuration the created resource
|
||||||
|
|
@ -93,7 +93,7 @@ class Configuration extends \Stripe\ApiResource
|
||||||
* Updates a configuration that describes the functionality of the customer portal.
|
* Updates a configuration that describes the functionality of the customer portal.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
|
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return Configuration the updated resource
|
* @return Configuration the updated resource
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace Stripe;
|
||||||
* @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 $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 $allow_redisplay This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
|
* @property null|string $allow_redisplay This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
|
||||||
* @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 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>Eftpos Australia</code>, <code>Girocard</code>, <code>JCB</code>, <code>MasterCard</code>, <code>UnionPay</code>, <code>Visa</code>, or <code>Unknown</code>.
|
* @property string $brand Card brand. Can be <code>American Express</code>, <code>Cartes Bancaires</code>, <code>Diners Club</code>, <code>Discover</code>, <code>Eftpos Australia</code>, <code>Girocard</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 $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://www.iso.org/iso-4217-currency-codes.html">ISO code for currency</a> in lowercase. Must be a <a href="https://docs.stripe.com/currencies">supported currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an <a href="/api/external_account_cards/object">External Account</a> where <a href="/api/accounts/object#account_object-controller-is_controller">controller.is_controller</a> is <code>true</code>.
|
* @property null|string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO code for currency</a> in lowercase. Must be a <a href="https://docs.stripe.com/currencies">supported currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an <a href="/api/external_account_cards/object">External Account</a> where <a href="/api/accounts/object#account_object-controller-is_controller">controller.is_controller</a> is <code>true</code>.
|
||||||
* @property null|Customer|string $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|Customer|string $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.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -32,7 +32,7 @@ namespace Stripe;
|
||||||
* @property int $pre_payment_amount The amount of the credit note by which the invoice's <code>amount_remaining</code> and <code>amount_due</code> were reduced.
|
* @property int $pre_payment_amount The amount of the credit note by which the invoice's <code>amount_remaining</code> and <code>amount_due</code> were reduced.
|
||||||
* @property ((object{amount: int, credit_balance_transaction?: Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
|
* @property ((object{amount: int, credit_balance_transaction?: Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
|
||||||
* @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 $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 ((object{amount_refunded: int, refund: Refund|string}&StripeObject))[] $refunds Refunds related to this credit note.
|
* @property ((object{amount_refunded: int, payment_record_refund: null|(object{payment_record: string, refund_group: string}&StripeObject), refund: Refund|string, type: null|string}&StripeObject))[] $refunds Refunds related to this credit note.
|
||||||
* @property null|(object{amount_subtotal: int, amount_tax: int, amount_total: int, shipping_rate: null|ShippingRate|string, taxes?: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject) $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice.
|
* @property null|(object{amount_subtotal: int, amount_tax: int, amount_total: int, shipping_rate: null|ShippingRate|string, taxes?: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject) $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice.
|
||||||
* @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 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 cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
|
* @property int $subtotal The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
|
||||||
|
|
@ -85,7 +85,7 @@ class CreditNote extends ApiResource
|
||||||
* <code>post_payment_credit_notes_amount</code>, or both, depending on the
|
* <code>post_payment_credit_notes_amount</code>, or both, depending on the
|
||||||
* invoice’s <code>amount_remaining</code> at the time of credit note creation.
|
* invoice’s <code>amount_remaining</code> at the time of credit note creation.
|
||||||
*
|
*
|
||||||
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, payment_record_refund?: array{payment_record: string, refund_group: string}, refund?: string, type?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return CreditNote the created resource
|
* @return CreditNote the created resource
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace Stripe;
|
||||||
* @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|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject) $address The customer's address.
|
* @property null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject) $address The customer's address.
|
||||||
* @property null|int $balance The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance">invoice_credit_balance</a>.
|
* @property null|int $balance The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance">invoice_credit_balance</a>.
|
||||||
|
* @property null|string $business_name The customer's business name.
|
||||||
* @property null|CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The <code>settings[reconciliation_mode]</code> field describes if these funds apply to these payment intents manually or automatically.
|
* @property null|CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The <code>settings[reconciliation_mode]</code> field describes if these funds apply to these payment intents manually or automatically.
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @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 $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.
|
||||||
|
|
@ -20,6 +21,7 @@ namespace Stripe;
|
||||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||||
* @property null|Discount $discount Describes the current discount active on the customer, if there is one.
|
* @property null|Discount $discount Describes the current discount active on the customer, if there is one.
|
||||||
* @property null|string $email The customer's email address.
|
* @property null|string $email The customer's email address.
|
||||||
|
* @property null|string $individual_name The customer's individual name.
|
||||||
* @property null|StripeObject $invoice_credit_balance The current multi-currency balances, if any, that's 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's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
|
* @property null|StripeObject $invoice_credit_balance The current multi-currency balances, if any, that's 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's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
|
||||||
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
|
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
|
||||||
* @property null|(object{custom_fields: null|(object{name: string, value: string}&StripeObject)[], default_payment_method: null|PaymentMethod|string, footer: null|string, rendering_options: null|(object{amount_tax_display: null|string, template: null|string}&StripeObject)}&StripeObject) $invoice_settings
|
* @property null|(object{custom_fields: null|(object{name: string, value: string}&StripeObject)[], default_payment_method: null|PaymentMethod|string, footer: null|string, rendering_options: null|(object{amount_tax_display: null|string, template: null|string}&StripeObject)}&StripeObject) $invoice_settings
|
||||||
|
|
@ -32,7 +34,7 @@ namespace Stripe;
|
||||||
* @property null|(object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), carrier?: null|string, name?: string, phone?: null|string, tracking_number?: null|string}&StripeObject) $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
|
* @property null|(object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), carrier?: null|string, name?: string, phone?: null|string, tracking_number?: null|string}&StripeObject) $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
|
||||||
* @property null|Collection<Account|BankAccount|Card|Source> $sources The customer's payment sources, if any.
|
* @property null|Collection<Account|BankAccount|Card|Source> $sources The customer's payment sources, if any.
|
||||||
* @property null|Collection<Subscription> $subscriptions The customer's current subscriptions, if any.
|
* @property null|Collection<Subscription> $subscriptions The customer's current subscriptions, if any.
|
||||||
* @property null|(object{automatic_tax: string, ip_address: null|string, location: null|(object{country: string, source: string, state: null|string}&StripeObject)}&StripeObject) $tax
|
* @property null|(object{automatic_tax: string, ip_address: null|string, location: null|(object{country: string, source: string, state: null|string}&StripeObject), provider: string}&StripeObject) $tax
|
||||||
* @property null|string $tax_exempt Describes the customer's tax exemption status, which is <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the following text: <strong>"Reverse charge"</strong>.
|
* @property null|string $tax_exempt Describes the customer's tax exemption status, which is <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the following text: <strong>"Reverse charge"</strong>.
|
||||||
* @property null|Collection<TaxId> $tax_ids The customer's tax IDs.
|
* @property null|Collection<TaxId> $tax_ids The customer's tax IDs.
|
||||||
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock that this customer belongs to.
|
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock that this customer belongs to.
|
||||||
|
|
@ -51,7 +53,7 @@ class Customer extends ApiResource
|
||||||
/**
|
/**
|
||||||
* Creates a new customer object.
|
* Creates a new customer object.
|
||||||
*
|
*
|
||||||
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params
|
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, business_name?: null|string, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], individual_name?: null|string, invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return Customer the created resource
|
* @return Customer the created resource
|
||||||
|
|
@ -145,7 +147,7 @@ class Customer extends ApiResource
|
||||||
* This request accepts mostly the same arguments as the customer creation call.
|
* This request accepts mostly the same arguments as the customer creation call.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
|
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, business_name?: null|string, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], individual_name?: null|string, invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return Customer the updated resource
|
* @return Customer the updated resource
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Stripe;
|
||||||
*
|
*
|
||||||
* @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 string $client_secret <p>The client secret of this Customer Session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
|
* @property string $client_secret <p>The client secret of this Customer Session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
|
||||||
* @property null|(object{buy_button: (object{enabled: bool}&StripeObject), payment_element: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: string[], payment_method_redisplay: string, payment_method_redisplay_limit: null|int, payment_method_remove: string, payment_method_save: string, payment_method_save_usage: null|string}&StripeObject)}&StripeObject), pricing_table: (object{enabled: bool}&StripeObject)}&StripeObject) $components Configuration for the components supported by this Customer Session.
|
* @property null|(object{buy_button: (object{enabled: bool}&StripeObject), customer_sheet: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: null|string[], payment_method_remove: null|string}&StripeObject)}&StripeObject), mobile_payment_element: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: null|string[], payment_method_redisplay: null|string, payment_method_remove: null|string, payment_method_save: null|string, payment_method_save_allow_redisplay_override: null|string}&StripeObject)}&StripeObject), payment_element: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: string[], payment_method_redisplay: string, payment_method_redisplay_limit: null|int, payment_method_remove: string, payment_method_save: string, payment_method_save_usage: null|string}&StripeObject)}&StripeObject), pricing_table: (object{enabled: bool}&StripeObject)}&StripeObject) $components Configuration for the components supported by this Customer Session.
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||||
* @property Customer|string $customer The Customer the Customer Session was created for.
|
* @property Customer|string $customer The Customer the Customer Session was created for.
|
||||||
* @property int $expires_at The timestamp at which this Customer Session will expire.
|
* @property int $expires_at The timestamp at which this Customer Session will expire.
|
||||||
|
|
@ -29,7 +29,7 @@ class CustomerSession extends ApiResource
|
||||||
* you can use on your front-end to grant client-side API access for certain
|
* you can use on your front-end to grant client-side API access for certain
|
||||||
* customer resources.
|
* customer resources.
|
||||||
*
|
*
|
||||||
* @param null|array{components: array{buy_button?: array{enabled: bool}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
|
* @param null|array{components: array{buy_button?: array{enabled: bool}, customer_sheet?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_remove?: string}}, mobile_payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_remove?: string, payment_method_save?: string, payment_method_save_allow_redisplay_override?: string}}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return CustomerSession the created resource
|
* @return CustomerSession the created resource
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@ namespace Stripe;
|
||||||
* @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use <code>expand[]=discounts</code> in API calls to expand discount IDs in an array.
|
* @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use <code>expand[]=discounts</code> in API calls to expand discount IDs in an array.
|
||||||
* @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|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 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 Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#subscriptions">subscriptions</a>, <a href="https://stripe.com/docs/api#invoices">invoices</a>, <a href="https://stripe.com/docs/api/checkout/sessions">checkout sessions</a>, <a href="https://stripe.com/docs/api#quotes">quotes</a>, and more. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a> or <a href="https://stripe.com/docs/api/payment_intents">payment intents</a>.
|
|
||||||
* @property null|Customer|string $customer The ID of the customer associated with this discount.
|
* @property null|Customer|string $customer The ID of the customer associated with this discount.
|
||||||
* @property null|int $end If the coupon has a duration of <code>repeating</code>, the date that this discount will end. If the coupon has a duration of <code>once</code> or <code>forever</code>, this attribute will be null.
|
* @property null|int $end If the coupon has a duration of <code>repeating</code>, the date that this discount will end. If the coupon has a duration of <code>once</code> or <code>forever</code>, this attribute will be null.
|
||||||
* @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 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 <code>id</code> (or invoice line item <code>id</code> 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 null|string $invoice_item The invoice item <code>id</code> (or invoice line item <code>id</code> 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 null|PromotionCode|string $promotion_code The promotion code applied to create this discount.
|
* @property null|PromotionCode|string $promotion_code The promotion code applied to create this discount.
|
||||||
|
* @property (object{coupon: null|Coupon|string, type: string}&StripeObject) $source
|
||||||
* @property int $start Date that the coupon was applied.
|
* @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 $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
||||||
* @property null|string $subscription_item The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
|
* @property null|string $subscription_item The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace Stripe;
|
||||||
* @property 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 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 $network_reason_code Network-dependent reason code for the dispute.
|
||||||
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's disputed.
|
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's disputed.
|
||||||
* @property null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: string, network_reason_code: null|string}&StripeObject), klarna?: (object{reason_code: null|string}&StripeObject), paypal?: (object{case_id: null|string, reason_code: null|string}&StripeObject), type: string}&StripeObject) $payment_method_details
|
* @property null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: string, network_reason_code: null|string}&StripeObject), klarna?: (object{chargeback_loss_reason_code?: string, reason_code: null|string}&StripeObject), paypal?: (object{case_id: null|string, reason_code: null|string}&StripeObject), type: string}&StripeObject) $payment_method_details
|
||||||
* @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>noncompliant</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Learn more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>.
|
* @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>noncompliant</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Learn more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>.
|
||||||
* @property string $status The current status of a dispute. Possible values include:<code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>won</code>, <code>lost</code>, or <code>prevented</code>.
|
* @property string $status The current status of a dispute. Possible values include:<code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>won</code>, <code>lost</code>, or <code>prevented</code>.
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,6 +53,7 @@ class Dispute extends ApiResource
|
||||||
|
|
||||||
const STATUS_LOST = 'lost';
|
const STATUS_LOST = 'lost';
|
||||||
const STATUS_NEEDS_RESPONSE = 'needs_response';
|
const STATUS_NEEDS_RESPONSE = 'needs_response';
|
||||||
|
const STATUS_PREVENTED = 'prevented';
|
||||||
const STATUS_UNDER_REVIEW = 'under_review';
|
const STATUS_UNDER_REVIEW = 'under_review';
|
||||||
const STATUS_WARNING_CLOSED = 'warning_closed';
|
const STATUS_WARNING_CLOSED = 'warning_closed';
|
||||||
const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
|
const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@ class ErrorObject extends StripeObject
|
||||||
const CODE_EMAIL_INVALID = 'email_invalid';
|
const CODE_EMAIL_INVALID = 'email_invalid';
|
||||||
const CODE_EXPIRED_CARD = 'expired_card';
|
const CODE_EXPIRED_CARD = 'expired_card';
|
||||||
const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_INACTIVE = 'financial_connections_account_inactive';
|
const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_INACTIVE = 'financial_connections_account_inactive';
|
||||||
|
const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_PENDING_ACCOUNT_NUMBERS = 'financial_connections_account_pending_account_numbers';
|
||||||
|
const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_UNAVAILABLE_ACCOUNT_NUMBERS = 'financial_connections_account_unavailable_account_numbers';
|
||||||
const CODE_FINANCIAL_CONNECTIONS_NO_SUCCESSFUL_TRANSACTION_REFRESH = 'financial_connections_no_successful_transaction_refresh';
|
const CODE_FINANCIAL_CONNECTIONS_NO_SUCCESSFUL_TRANSACTION_REFRESH = 'financial_connections_no_successful_transaction_refresh';
|
||||||
const CODE_FORWARDING_API_INACTIVE = 'forwarding_api_inactive';
|
const CODE_FORWARDING_API_INACTIVE = 'forwarding_api_inactive';
|
||||||
const CODE_FORWARDING_API_INVALID_PARAMETER = 'forwarding_api_invalid_parameter';
|
const CODE_FORWARDING_API_INVALID_PARAMETER = 'forwarding_api_invalid_parameter';
|
||||||
|
|
@ -151,6 +153,7 @@ class ErrorObject extends StripeObject
|
||||||
const CODE_PAYMENT_INTENT_MANDATE_INVALID = 'payment_intent_mandate_invalid';
|
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_EXPIRED = 'payment_intent_payment_attempt_expired';
|
||||||
const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_FAILED = 'payment_intent_payment_attempt_failed';
|
const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_FAILED = 'payment_intent_payment_attempt_failed';
|
||||||
|
const CODE_PAYMENT_INTENT_RATE_LIMIT_EXCEEDED = 'payment_intent_rate_limit_exceeded';
|
||||||
const CODE_PAYMENT_INTENT_UNEXPECTED_STATE = 'payment_intent_unexpected_state';
|
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_ALREADY_VERIFIED = 'payment_method_bank_account_already_verified';
|
||||||
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked';
|
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked';
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ class Event extends ApiResource
|
||||||
const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
||||||
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
||||||
const BALANCE_AVAILABLE = 'balance.available';
|
const BALANCE_AVAILABLE = 'balance.available';
|
||||||
|
const BALANCE_SETTINGS_UPDATED = 'balance_settings.updated';
|
||||||
const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
|
const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
|
||||||
const BILLING_CREDIT_BALANCE_TRANSACTION_CREATED = 'billing.credit_balance_transaction.created';
|
const BILLING_CREDIT_BALANCE_TRANSACTION_CREATED = 'billing.credit_balance_transaction.created';
|
||||||
const BILLING_CREDIT_GRANT_CREATED = 'billing.credit_grant.created';
|
const BILLING_CREDIT_GRANT_CREATED = 'billing.credit_grant.created';
|
||||||
|
|
@ -144,6 +145,7 @@ class Event extends ApiResource
|
||||||
const INVOICE_OVERPAID = 'invoice.overpaid';
|
const INVOICE_OVERPAID = 'invoice.overpaid';
|
||||||
const INVOICE_PAID = 'invoice.paid';
|
const INVOICE_PAID = 'invoice.paid';
|
||||||
const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
||||||
|
const INVOICE_PAYMENT_ATTEMPT_REQUIRED = 'invoice.payment_attempt_required';
|
||||||
const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
||||||
const INVOICE_PAYMENT_PAID = 'invoice_payment.paid';
|
const INVOICE_PAYMENT_PAID = 'invoice_payment.paid';
|
||||||
const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
||||||
|
|
@ -303,6 +305,7 @@ class Event extends ApiResource
|
||||||
const TYPE_APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
const TYPE_APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
|
||||||
const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
|
||||||
const TYPE_BALANCE_AVAILABLE = 'balance.available';
|
const TYPE_BALANCE_AVAILABLE = 'balance.available';
|
||||||
|
const TYPE_BALANCE_SETTINGS_UPDATED = 'balance_settings.updated';
|
||||||
const TYPE_BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
|
const TYPE_BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
|
||||||
const TYPE_BILLING_CREDIT_BALANCE_TRANSACTION_CREATED = 'billing.credit_balance_transaction.created';
|
const TYPE_BILLING_CREDIT_BALANCE_TRANSACTION_CREATED = 'billing.credit_balance_transaction.created';
|
||||||
const TYPE_BILLING_CREDIT_GRANT_CREATED = 'billing.credit_grant.created';
|
const TYPE_BILLING_CREDIT_GRANT_CREATED = 'billing.credit_grant.created';
|
||||||
|
|
@ -394,6 +397,7 @@ class Event extends ApiResource
|
||||||
const TYPE_INVOICE_OVERPAID = 'invoice.overpaid';
|
const TYPE_INVOICE_OVERPAID = 'invoice.overpaid';
|
||||||
const TYPE_INVOICE_PAID = 'invoice.paid';
|
const TYPE_INVOICE_PAID = 'invoice.paid';
|
||||||
const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
|
||||||
|
const TYPE_INVOICE_PAYMENT_ATTEMPT_REQUIRED = 'invoice.payment_attempt_required';
|
||||||
const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
|
||||||
const TYPE_INVOICE_PAYMENT_PAID = 'invoice_payment.paid';
|
const TYPE_INVOICE_PAYMENT_PAID = 'invoice_payment.paid';
|
||||||
const TYPE_INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
const TYPE_INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Stripe\Events;
|
||||||
|
|
||||||
|
use Stripe\V2\Core\EventNotification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class representing an EventNotification that the SDK doesn't have types for.
|
||||||
|
*
|
||||||
|
* @property null|\Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event.
|
||||||
|
*/
|
||||||
|
class UnknownEventNotification extends EventNotification
|
||||||
|
{
|
||||||
|
public $related_object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the event's related object from the Stripe API, if one exists. Returns null otherwise.
|
||||||
|
*
|
||||||
|
* @return null|\Stripe\StripeObject
|
||||||
|
*/
|
||||||
|
public function fetchRelatedObject()
|
||||||
|
{
|
||||||
|
return parent::fetchRelatedObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Stripe\Events;
|
||||||
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
||||||
* @property \Stripe\EventData\V1BillingMeterErrorReportTriggeredEventData $data data associated with the event
|
* @property \Stripe\EventData\V1BillingMeterErrorReportTriggeredEventData $data data associated with the event
|
||||||
*/
|
*/
|
||||||
class V1BillingMeterErrorReportTriggeredEvent extends \Stripe\V2\Event
|
class V1BillingMeterErrorReportTriggeredEvent extends \Stripe\V2\Core\Event
|
||||||
{
|
{
|
||||||
const LOOKUP_TYPE = 'v1.billing.meter.error_report_triggered';
|
const LOOKUP_TYPE = 'v1.billing.meter.error_report_triggered';
|
||||||
|
|
||||||
|
|
@ -22,14 +22,9 @@ class V1BillingMeterErrorReportTriggeredEvent extends \Stripe\V2\Event
|
||||||
public function fetchRelatedObject()
|
public function fetchRelatedObject()
|
||||||
{
|
{
|
||||||
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
|
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
|
||||||
list($object, $options) = $this->_request(
|
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
|
||||||
'get',
|
'stripe_context' => $this->context,
|
||||||
$this->related_object->url,
|
], [], $apiMode);
|
||||||
[],
|
|
||||||
['stripe_account' => $this->context],
|
|
||||||
[],
|
|
||||||
$apiMode
|
|
||||||
);
|
|
||||||
|
|
||||||
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
|
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Events;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
||||||
|
*/
|
||||||
|
class V1BillingMeterErrorReportTriggeredEventNotification extends \Stripe\V2\Core\EventNotification
|
||||||
|
{
|
||||||
|
const LOOKUP_TYPE = 'v1.billing.meter.error_report_triggered';
|
||||||
|
public $related_object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the full event object from the API. Make an API request on every call.
|
||||||
|
*
|
||||||
|
* @return V1BillingMeterErrorReportTriggeredEvent
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function fetchEvent()
|
||||||
|
{
|
||||||
|
return parent::fetchEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the related object from the API. Make an API request on every call.
|
||||||
|
*
|
||||||
|
* @return \Stripe\Billing\Meter
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function fetchRelatedObject()
|
||||||
|
{
|
||||||
|
return parent::fetchRelatedObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Stripe\Events;
|
||||||
/**
|
/**
|
||||||
* @property \Stripe\EventData\V1BillingMeterNoMeterFoundEventData $data data associated with the event
|
* @property \Stripe\EventData\V1BillingMeterNoMeterFoundEventData $data data associated with the event
|
||||||
*/
|
*/
|
||||||
class V1BillingMeterNoMeterFoundEvent extends \Stripe\V2\Event
|
class V1BillingMeterNoMeterFoundEvent extends \Stripe\V2\Core\Event
|
||||||
{
|
{
|
||||||
const LOOKUP_TYPE = 'v1.billing.meter.no_meter_found';
|
const LOOKUP_TYPE = 'v1.billing.meter.no_meter_found';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Events;
|
||||||
|
|
||||||
|
class V1BillingMeterNoMeterFoundEventNotification extends \Stripe\V2\Core\EventNotification
|
||||||
|
{
|
||||||
|
const LOOKUP_TYPE = 'v1.billing.meter.no_meter_found';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the full event object from the API. Make an API request on every call.
|
||||||
|
*
|
||||||
|
* @return V1BillingMeterNoMeterFoundEvent
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function fetchEvent()
|
||||||
|
{
|
||||||
|
return parent::fetchEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,28 +7,23 @@ namespace Stripe\Events;
|
||||||
/**
|
/**
|
||||||
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
||||||
*/
|
*/
|
||||||
class V2CoreEventDestinationPingEvent extends \Stripe\V2\Event
|
class V2CoreEventDestinationPingEvent extends \Stripe\V2\Core\Event
|
||||||
{
|
{
|
||||||
const LOOKUP_TYPE = 'v2.core.event_destination.ping';
|
const LOOKUP_TYPE = 'v2.core.event_destination.ping';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the related object from the API. Make an API request on every call.
|
* Retrieves the related object from the API. Make an API request on every call.
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
public function fetchRelatedObject()
|
public function fetchRelatedObject()
|
||||||
{
|
{
|
||||||
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
|
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
|
||||||
list($object, $options) = $this->_request(
|
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
|
||||||
'get',
|
'stripe_context' => $this->context,
|
||||||
$this->related_object->url,
|
], [], $apiMode);
|
||||||
[],
|
|
||||||
['stripe_account' => $this->context],
|
|
||||||
[],
|
|
||||||
$apiMode
|
|
||||||
);
|
|
||||||
|
|
||||||
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
|
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Events;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
|
||||||
|
*/
|
||||||
|
class V2CoreEventDestinationPingEventNotification extends \Stripe\V2\Core\EventNotification
|
||||||
|
{
|
||||||
|
const LOOKUP_TYPE = 'v2.core.event_destination.ping';
|
||||||
|
public $related_object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the full event object from the API. Make an API request on every call.
|
||||||
|
*
|
||||||
|
* @return V2CoreEventDestinationPingEvent
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function fetchEvent()
|
||||||
|
{
|
||||||
|
return parent::fetchEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the related object from the API. Make an API request on every call.
|
||||||
|
*
|
||||||
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function fetchRelatedObject()
|
||||||
|
{
|
||||||
|
return parent::fetchRelatedObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
namespace Stripe;
|
namespace Stripe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* [Deprecated] The <code>ExchangeRate</code> APIs are deprecated. Please use the <a href="https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api">FX Quotes API</a> instead.
|
||||||
|
*
|
||||||
* <code>ExchangeRate</code> objects allow you to determine the rates that Stripe is currently
|
* <code>ExchangeRate</code> objects allow you to determine the rates that Stripe is currently
|
||||||
* using to convert from one currency to another. Since this number is variable
|
* using to convert from one currency to another. Since this number is variable
|
||||||
* throughout the day, there are various reasons why you might want to know the current
|
* throughout the day, there are various reasons why you might want to know the current
|
||||||
|
|
@ -41,9 +43,16 @@ class ExchangeRate extends ApiResource
|
||||||
const OBJECT_NAME = 'exchange_rate';
|
const OBJECT_NAME = 'exchange_rate';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* [Deprecated] The <code>ExchangeRate</code> APIs are deprecated. Please use the
|
||||||
|
* <a
|
||||||
|
* href="https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api">FX
|
||||||
|
* Quotes API</a> instead.
|
||||||
|
*
|
||||||
* Returns a list of objects that contain the rates at which foreign currencies are
|
* Returns a list of objects that contain the rates at which foreign currencies are
|
||||||
* converted to one another. Only shows the currencies for which Stripe supports.
|
* converted to one another. Only shows the currencies for which Stripe supports.
|
||||||
*
|
*
|
||||||
|
* @deprecated this method is deprecated, please refer to the description for details
|
||||||
|
*
|
||||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
|
|
@ -59,9 +68,16 @@ class ExchangeRate extends ApiResource
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* [Deprecated] The <code>ExchangeRate</code> APIs are deprecated. Please use the
|
||||||
|
* <a
|
||||||
|
* href="https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api">FX
|
||||||
|
* Quotes API</a> instead.
|
||||||
|
*
|
||||||
* Retrieves the exchange rates from the given currency to every supported
|
* Retrieves the exchange rates from the given currency to every supported
|
||||||
* currency.
|
* currency.
|
||||||
*
|
*
|
||||||
|
* @deprecated this method is deprecated, please refer to the description for details
|
||||||
|
*
|
||||||
* @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
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ class File extends ApiResource
|
||||||
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
|
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
|
||||||
const PURPOSE_ISSUING_REGULATORY_REPORTING = 'issuing_regulatory_reporting';
|
const PURPOSE_ISSUING_REGULATORY_REPORTING = 'issuing_regulatory_reporting';
|
||||||
const PURPOSE_PCI_DOCUMENT = 'pci_document';
|
const PURPOSE_PCI_DOCUMENT = 'pci_document';
|
||||||
|
const PURPOSE_PLATFORM_TERMS_OF_SERVICE = 'platform_terms_of_service';
|
||||||
const PURPOSE_SELFIE = 'selfie';
|
const PURPOSE_SELFIE = 'selfie';
|
||||||
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
|
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
|
||||||
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
|
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Stripe;
|
||||||
*
|
*
|
||||||
* Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send invoices to customers</a>
|
* Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send invoices to customers</a>
|
||||||
*
|
*
|
||||||
* @property null|string $id Unique identifier for the object. For preview invoices created using the <a href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint, this id will be prefixed with <code>upcoming_in</code>.
|
* @property string $id Unique identifier for the object. For preview invoices created using the <a href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint, this id will be prefixed with <code>upcoming_in</code>.
|
||||||
* @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|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
|
* @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 $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@ namespace Stripe;
|
||||||
* @property null|Invoice|string $invoice The ID of the invoice this invoice item belongs to.
|
* @property null|Invoice|string $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 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|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|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 $net_amount The amount after discounts, but before credits and taxes. This field is <code>null</code> for <code>discountable=true</code> items.
|
||||||
* @property null|(object{subscription_details: null|(object{subscription: string, subscription_item?: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice item.
|
* @property null|(object{subscription_details: null|(object{subscription: string, subscription_item?: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice item.
|
||||||
* @property (object{end: int, start: int}&StripeObject) $period
|
* @property (object{end: int, start: int}&StripeObject) $period
|
||||||
* @property null|(object{price_details?: (object{price: string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the invoice item.
|
* @property null|(object{price_details?: (object{price: string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the invoice item.
|
||||||
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
|
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
|
||||||
|
* @property null|(object{discount_amounts: ((object{amount: int, discount: Discount|string}&StripeObject))[]}&StripeObject) $proration_details
|
||||||
* @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 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|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|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|TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
|
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class InvoiceLineItem extends ApiResource
|
||||||
* before the invoice is finalized.
|
* before the invoice is finalized.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params
|
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return InvoiceLineItem the updated resource
|
* @return InvoiceLineItem the updated resource
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ namespace Stripe;
|
||||||
* @property Invoice|string $invoice The invoice that was paid.
|
* @property Invoice|string $invoice The invoice that was paid.
|
||||||
* @property bool $is_default Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s <code>amount_remaining</code>. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
|
* @property bool $is_default Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s <code>amount_remaining</code>. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
|
||||||
* @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.
|
||||||
* @property (object{charge?: Charge|string, payment_intent?: PaymentIntent|string, type: string}&StripeObject) $payment
|
* @property (object{charge?: Charge|string, payment_intent?: PaymentIntent|string, payment_record?: PaymentRecord|string, type: string}&StripeObject) $payment
|
||||||
* @property string $status The status of the payment, one of <code>open</code>, <code>paid</code>, or <code>canceled</code>.
|
* @property string $status The status of the payment, one of <code>open</code>, <code>paid</code>, or <code>canceled</code>.
|
||||||
* @property (object{canceled_at: null|int, paid_at: null|int}&StripeObject) $status_transitions
|
* @property (object{canceled_at: null|int, paid_at: null|int}&StripeObject) $status_transitions
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,7 +36,7 @@ class InvoicePayment extends ApiResource
|
||||||
* the first handful of those items. There is also a URL where you can retrieve the
|
* the first handful of those items. There is also a URL where you can retrieve the
|
||||||
* full (paginated) list of payments.
|
* full (paginated) list of payments.
|
||||||
*
|
*
|
||||||
* @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, type: string}, starting_after?: string, status?: string} $params
|
* @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, payment_record?: string, type: string}, starting_after?: string, status?: string} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return Collection<InvoicePayment> of ApiResources
|
* @return Collection<InvoicePayment> of ApiResources
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ namespace Stripe\Issuing;
|
||||||
* @property null|Card|string $replaced_by The latest card that replaces this card, if any.
|
* @property null|Card|string $replaced_by The latest card that replaces this card, if any.
|
||||||
* @property null|Card|string $replacement_for The card this card replaces, if any.
|
* @property null|Card|string $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|string $replacement_reason The reason why the previous card needed to be replaced.
|
||||||
|
* @property null|string $second_line Text separate from cardholder name, printed on the card.
|
||||||
* @property null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_validation: null|(object{mode: string, normalized_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), result: null|string}&\Stripe\StripeObject), carrier: null|string, customs: null|(object{eori_number: null|string}&\Stripe\StripeObject), eta: null|int, name: string, phone_number: null|string, require_signature: null|bool, service: string, status: null|string, tracking_number: null|string, tracking_url: null|string, type: string}&\Stripe\StripeObject) $shipping Where and how the card will be shipped.
|
* @property null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_validation: null|(object{mode: string, normalized_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), result: null|string}&\Stripe\StripeObject), carrier: null|string, customs: null|(object{eori_number: null|string}&\Stripe\StripeObject), eta: null|int, name: string, phone_number: null|string, require_signature: null|bool, service: string, status: null|string, tracking_number: null|string, tracking_url: null|string, type: string}&\Stripe\StripeObject) $shipping Where and how the card will be shipped.
|
||||||
* @property (object{allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_categories: null|string[], blocked_merchant_countries: null|string[], spending_limits: null|((object{amount: int, categories: null|string[], interval: string}&\Stripe\StripeObject))[], spending_limits_currency: null|string}&\Stripe\StripeObject) $spending_controls
|
* @property (object{allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_categories: null|string[], blocked_merchant_countries: null|string[], spending_limits: null|((object{amount: int, categories: null|string[], interval: string}&\Stripe\StripeObject))[], spending_limits_currency: null|string}&\Stripe\StripeObject) $spending_controls
|
||||||
* @property string $status Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to <code>inactive</code>.
|
* @property string $status Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to <code>inactive</code>.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// 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 null|int $discount_amount <p>The discount applied on this line item represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. An integer greater than 0.</p><p>This field is mutually exclusive with the <code>amount_details[discount_amount]</code> field.</p>
|
||||||
|
* @property null|(object{card?: (object{commodity_code: null|string}&StripeObject), card_present?: (object{commodity_code: null|string}&StripeObject), klarna?: (object{image_url: null|string, product_url: null|string, reference: null|string, subscription_reference: null|string}&StripeObject), paypal?: (object{category?: string, description?: string, sold_by?: string}&StripeObject)}&StripeObject) $payment_method_options Payment method-specific information for line items.
|
||||||
|
* @property null|string $product_code The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.
|
||||||
|
* @property string $product_name <p>The product name of the line item. Required for L3 rates. At most 1024 characters long.</p><p>For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters.</p>
|
||||||
|
* @property int $quantity The quantity of items. Required for L3 rates. An integer greater than 0.
|
||||||
|
* @property null|(object{total_tax_amount: int}&StripeObject) $tax Contains information about the tax on the item.
|
||||||
|
* @property int $unit_cost The unit cost of the line item represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. Required for L3 rates. An integer greater than or equal to 0.
|
||||||
|
* @property null|string $unit_of_measure A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long.
|
||||||
|
*/
|
||||||
|
class PaymentIntentAmountDetailsLineItem extends ApiResource
|
||||||
|
{
|
||||||
|
const OBJECT_NAME = 'payment_intent_amount_details_line_item';
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,7 @@ namespace Stripe;
|
||||||
* @property null|Collection<LineItem> $line_items The line items representing what is being sold.
|
* @property null|Collection<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 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 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 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|(object{business?: (object{enabled: bool, optional: bool}&StripeObject), individual?: (object{enabled: bool, optional: bool}&StripeObject)}&StripeObject) $name_collection
|
||||||
* @property null|Account|string $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|Account|string $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|((object{adjustable_quantity: null|(object{enabled: bool, maximum: null|int, minimum: null|int}&StripeObject), price: string, quantity: int}&StripeObject))[] $optional_items The optional items presented to the customer at checkout.
|
* @property null|((object{adjustable_quantity: null|(object{enabled: bool, maximum: null|int, minimum: null|int}&StripeObject), price: string, quantity: int}&StripeObject))[] $optional_items The optional items presented to the customer at checkout.
|
||||||
* @property null|(object{capture_method: null|string, description: null|string, metadata: StripeObject, setup_future_usage: null|string, statement_descriptor: null|string, statement_descriptor_suffix: null|string, transfer_group: null|string}&StripeObject) $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
|
* @property null|(object{capture_method: null|string, description: null|string, metadata: StripeObject, setup_future_usage: null|string, statement_descriptor: null|string, statement_descriptor_suffix: null|string, transfer_group: null|string}&StripeObject) $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
|
||||||
|
|
@ -70,7 +71,7 @@ class PaymentLink extends ApiResource
|
||||||
/**
|
/**
|
||||||
* Creates a payment link.
|
* Creates a payment link.
|
||||||
*
|
*
|
||||||
* @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity: int}[], metadata?: array<string, string>, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: array<string, string>, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array<string, string>, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params
|
* @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity: int}[], metadata?: array<string, string>, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: array<string, string>, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array<string, string>, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return PaymentLink the created resource
|
* @return PaymentLink the created resource
|
||||||
|
|
@ -129,7 +130,7 @@ class PaymentLink extends ApiResource
|
||||||
* Updates a payment link.
|
* Updates a payment link.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return PaymentLink the updated resource
|
* @return PaymentLink the updated resource
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ namespace Stripe;
|
||||||
* @property null|(object{buyer_id: null|string, cashtag: null|string}&StripeObject) $cashapp
|
* @property null|(object{buyer_id: null|string, cashtag: null|string}&StripeObject) $cashapp
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||||
* @property null|(object{}&StripeObject) $crypto
|
* @property null|(object{}&StripeObject) $crypto
|
||||||
|
* @property null|(object{display_name: null|string, logo: null|(object{content_type: null|string, url: string}&StripeObject), type: string}&StripeObject) $custom
|
||||||
* @property null|Customer|string $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 null|Customer|string $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 null|(object{}&StripeObject) $customer_balance
|
* @property null|(object{}&StripeObject) $customer_balance
|
||||||
* @property null|(object{bank: null|string}&StripeObject) $eps
|
* @property null|(object{bank: null|string}&StripeObject) $eps
|
||||||
|
|
@ -46,6 +47,7 @@ namespace Stripe;
|
||||||
* @property null|(object{brand: null|string, last4: null|string}&StripeObject) $kr_card
|
* @property null|(object{brand: null|string, last4: null|string}&StripeObject) $kr_card
|
||||||
* @property null|(object{email: null|string, persistent_token?: string}&StripeObject) $link
|
* @property null|(object{email: null|string, persistent_token?: string}&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 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|(object{}&StripeObject) $mb_way
|
||||||
* @property null|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|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|(object{}&StripeObject) $mobilepay
|
* @property null|(object{}&StripeObject) $mobilepay
|
||||||
* @property null|(object{}&StripeObject) $multibanco
|
* @property null|(object{}&StripeObject) $multibanco
|
||||||
|
|
@ -98,6 +100,7 @@ class PaymentMethod extends ApiResource
|
||||||
const TYPE_CARD_PRESENT = 'card_present';
|
const TYPE_CARD_PRESENT = 'card_present';
|
||||||
const TYPE_CASHAPP = 'cashapp';
|
const TYPE_CASHAPP = 'cashapp';
|
||||||
const TYPE_CRYPTO = 'crypto';
|
const TYPE_CRYPTO = 'crypto';
|
||||||
|
const TYPE_CUSTOM = 'custom';
|
||||||
const TYPE_CUSTOMER_BALANCE = 'customer_balance';
|
const TYPE_CUSTOMER_BALANCE = 'customer_balance';
|
||||||
const TYPE_EPS = 'eps';
|
const TYPE_EPS = 'eps';
|
||||||
const TYPE_FPX = 'fpx';
|
const TYPE_FPX = 'fpx';
|
||||||
|
|
@ -110,6 +113,7 @@ class PaymentMethod extends ApiResource
|
||||||
const TYPE_KONBINI = 'konbini';
|
const TYPE_KONBINI = 'konbini';
|
||||||
const TYPE_KR_CARD = 'kr_card';
|
const TYPE_KR_CARD = 'kr_card';
|
||||||
const TYPE_LINK = 'link';
|
const TYPE_LINK = 'link';
|
||||||
|
const TYPE_MB_WAY = 'mb_way';
|
||||||
const TYPE_MOBILEPAY = 'mobilepay';
|
const TYPE_MOBILEPAY = 'mobilepay';
|
||||||
const TYPE_MULTIBANCO = 'multibanco';
|
const TYPE_MULTIBANCO = 'multibanco';
|
||||||
const TYPE_NAVER_PAY = 'naver_pay';
|
const TYPE_NAVER_PAY = 'naver_pay';
|
||||||
|
|
@ -144,7 +148,7 @@ class PaymentMethod extends ApiResource
|
||||||
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
|
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
|
||||||
* method details ahead of a future payment.
|
* method details ahead of a future payment.
|
||||||
*
|
*
|
||||||
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, crypto?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
|
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, crypto?: array{}, custom?: array{type: string}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return PaymentMethod the created resource
|
* @return PaymentMethod the created resource
|
||||||
|
|
@ -210,7 +214,7 @@ class PaymentMethod extends ApiResource
|
||||||
* to be updated.
|
* to be updated.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|array<string, string>, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
|
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], metadata?: null|array<string, string>, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return PaymentMethod the updated resource
|
* @return PaymentMethod the updated resource
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ namespace Stripe;
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $card
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $card
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $cartes_bancaires
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $cartes_bancaires
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $cashapp
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $cashapp
|
||||||
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $crypto
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $customer_balance
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $customer_balance
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $eps
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $eps
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $fpx
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $fpx
|
||||||
|
|
@ -55,6 +56,7 @@ namespace Stripe;
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $kr_card
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $kr_card
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $link
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&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 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|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $mb_way
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $mobilepay
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $mobilepay
|
||||||
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $multibanco
|
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $multibanco
|
||||||
* @property string $name The configuration's name.
|
* @property string $name The configuration's name.
|
||||||
|
|
@ -89,7 +91,7 @@ class PaymentMethodConfiguration extends ApiResource
|
||||||
/**
|
/**
|
||||||
* Creates a payment method configuration.
|
* Creates a payment method configuration.
|
||||||
*
|
*
|
||||||
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, crypto?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, fr_meal_voucher_conecs?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mb_way?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return PaymentMethodConfiguration the created resource
|
* @return PaymentMethodConfiguration the created resource
|
||||||
|
|
@ -148,7 +150,7 @@ class PaymentMethodConfiguration extends ApiResource
|
||||||
* Update payment method configuration.
|
* Update payment method configuration.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, crypto?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, fr_meal_voucher_conecs?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mb_way?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return PaymentMethodConfiguration the updated resource
|
* @return PaymentMethodConfiguration the updated resource
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,8 +5,8 @@
|
||||||
namespace Stripe;
|
namespace Stripe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Promotion Code represents a customer-redeemable code for a <a href="https://stripe.com/docs/api#coupons">coupon</a>.
|
* A Promotion Code represents a customer-redeemable code for an underlying promotion.
|
||||||
* You can create multiple codes for a single coupon.
|
* You can create multiple codes for a single promotion.
|
||||||
*
|
*
|
||||||
* If you enable promotion codes in your <a href="https://stripe.com/docs/customer-management/configure-portal">customer portal configuration</a>, then customers can redeem a code themselves when updating a subscription in the portal.
|
* If you enable promotion codes in your <a href="https://stripe.com/docs/customer-management/configure-portal">customer portal configuration</a>, then customers can redeem a code themselves when updating a subscription in the portal.
|
||||||
* Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.
|
* Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.
|
||||||
|
|
@ -15,13 +15,13 @@ namespace Stripe;
|
||||||
* @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 bool $active Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
|
* @property bool $active Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
|
||||||
* @property string $code The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
|
* @property string $code The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
|
||||||
* @property Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#subscriptions">subscriptions</a>, <a href="https://stripe.com/docs/api#invoices">invoices</a>, <a href="https://stripe.com/docs/api/checkout/sessions">checkout sessions</a>, <a href="https://stripe.com/docs/api#quotes">quotes</a>, and more. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a> or <a href="https://stripe.com/docs/api/payment_intents">payment intents</a>.
|
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||||
* @property null|Customer|string $customer The customer that this promotion code can be used by.
|
* @property null|Customer|string $customer The customer that this promotion code can be used by.
|
||||||
* @property null|int $expires_at Date at which the promotion code can no longer be redeemed.
|
* @property null|int $expires_at Date at which the promotion code can no longer be redeemed.
|
||||||
* @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.
|
||||||
* @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed.
|
* @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed.
|
||||||
* @property null|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|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 (object{coupon: null|Coupon|string, type: string}&StripeObject) $promotion
|
||||||
* @property (object{currency_options?: StripeObject, first_time_transaction: bool, minimum_amount: null|int, minimum_amount_currency: null|string}&StripeObject) $restrictions
|
* @property (object{currency_options?: StripeObject, first_time_transaction: bool, minimum_amount: null|int, minimum_amount_currency: null|string}&StripeObject) $restrictions
|
||||||
* @property int $times_redeemed Number of times this promotion code has been used.
|
* @property int $times_redeemed Number of times this promotion code has been used.
|
||||||
*/
|
*/
|
||||||
|
|
@ -32,10 +32,10 @@ class PromotionCode extends ApiResource
|
||||||
use ApiOperations\Update;
|
use ApiOperations\Update;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A promotion code points to a coupon. You can optionally restrict the code to a
|
* A promotion code points to an underlying promotion. You can optionally restrict
|
||||||
* specific customer, redemption limit, and expiration date.
|
* the code to a specific customer, redemption limit, and expiration date.
|
||||||
*
|
*
|
||||||
* @param null|array{active?: bool, code?: string, coupon: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: array<string, string>, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params
|
* @param null|array{active?: bool, code?: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: array<string, string>, promotion: array{coupon?: string, type: string}, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return PromotionCode the created resource
|
* @return PromotionCode the created resource
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Stripe;
|
||||||
* @property string $status The status of the quote.
|
* @property string $status The status of the quote.
|
||||||
* @property (object{accepted_at: null|int, canceled_at: null|int, finalized_at: null|int}&StripeObject) $status_transitions
|
* @property (object{accepted_at: null|int, canceled_at: null|int, finalized_at: null|int}&StripeObject) $status_transitions
|
||||||
* @property null|string|Subscription $subscription The subscription that was created or updated from this quote.
|
* @property null|string|Subscription $subscription The subscription that was created or updated from this quote.
|
||||||
* @property (object{billing_mode: (object{type: string}&StripeObject), description: null|string, effective_date: null|int, metadata: null|StripeObject, trial_period_days: null|int}&StripeObject) $subscription_data
|
* @property (object{billing_mode: (object{flexible?: (object{proration_discounts?: string}&StripeObject), type: string}&StripeObject), description: null|string, effective_date: null|int, metadata: null|StripeObject, trial_period_days: null|int}&StripeObject) $subscription_data
|
||||||
* @property null|string|SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote.
|
* @property null|string|SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote.
|
||||||
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to.
|
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to.
|
||||||
* @property (object{amount_discount: int, amount_shipping: null|int, amount_tax: int, breakdown?: (object{discounts: (object{amount: int, discount: Discount}&StripeObject)[], taxes: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject)}&StripeObject) $total_details
|
* @property (object{amount_discount: int, amount_shipping: null|int, amount_tax: int, breakdown?: (object{discounts: (object{amount: int, discount: Discount}&StripeObject)[], taxes: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject)}&StripeObject) $total_details
|
||||||
|
|
@ -64,7 +64,7 @@ class Quote extends ApiResource
|
||||||
* <code>expires_at</code> can be set in the dashboard via the <a
|
* <code>expires_at</code> can be set in the dashboard via the <a
|
||||||
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
||||||
*
|
*
|
||||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return Quote the created resource
|
* @return Quote the created resource
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,40 @@
|
||||||
namespace Stripe;
|
namespace Stripe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property string $id Unique identifier for the event.
|
* Information on the API request that instigated the event.
|
||||||
* @property string $idempotency_key
|
*
|
||||||
|
* @property string $id ID of the API request that caused the event.
|
||||||
|
* @property string $idempotency_key The idempotency key transmitted during the request.
|
||||||
*/
|
*/
|
||||||
class Reason
|
class ReasonRequest
|
||||||
{
|
{
|
||||||
public $id;
|
public $id;
|
||||||
public $idempotency_key;
|
public $idempotency_key;
|
||||||
|
|
||||||
|
public function __construct($json)
|
||||||
|
{
|
||||||
|
$this->id = $json['id'];
|
||||||
|
$this->idempotency_key = $json['idempotency_key'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property string $type Event reason type.
|
||||||
|
* @property null|ReasonRequest $request Information on the API request that instigated the event.
|
||||||
|
*/
|
||||||
|
class Reason
|
||||||
|
{
|
||||||
|
public $type;
|
||||||
|
public $request;
|
||||||
|
|
||||||
|
public function __construct($json)
|
||||||
|
{
|
||||||
|
$this->type = $json['type'];
|
||||||
|
|
||||||
|
if ('request' === $this->type) {
|
||||||
|
$this->request = new ReasonRequest($json['request']);
|
||||||
|
} else {
|
||||||
|
$this->request = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Stripe;
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @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 $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. You can use this for displaying to users (available on non-card refunds only).
|
* @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
|
||||||
* @property null|(object{affirm?: (object{}&StripeObject), afterpay_clearpay?: (object{}&StripeObject), alipay?: (object{}&StripeObject), alma?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_bank_transfer?: (object{}&StripeObject), blik?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), br_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), card?: (object{reference?: string, reference_status?: string, reference_type?: string, type: string}&StripeObject), cashapp?: (object{}&StripeObject), customer_cash_balance?: (object{}&StripeObject), eps?: (object{}&StripeObject), eu_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), gb_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), giropay?: (object{}&StripeObject), grabpay?: (object{}&StripeObject), jp_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), klarna?: (object{}&StripeObject), multibanco?: (object{reference: null|string, reference_status: null|string}&StripeObject), mx_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), nz_bank_transfer?: (object{}&StripeObject), p24?: (object{reference: null|string, reference_status: null|string}&StripeObject), paynow?: (object{}&StripeObject), paypal?: (object{network_decline_code: null|string}&StripeObject), pix?: (object{}&StripeObject), revolut?: (object{}&StripeObject), sofort?: (object{}&StripeObject), swish?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), th_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), type: string, us_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), wechat_pay?: (object{}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $destination_details
|
* @property null|(object{affirm?: (object{}&StripeObject), afterpay_clearpay?: (object{}&StripeObject), alipay?: (object{}&StripeObject), alma?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_bank_transfer?: (object{}&StripeObject), blik?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), br_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), card?: (object{reference?: string, reference_status?: string, reference_type?: string, type: string}&StripeObject), cashapp?: (object{}&StripeObject), crypto?: (object{reference: null|string}&StripeObject), customer_cash_balance?: (object{}&StripeObject), eps?: (object{}&StripeObject), eu_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), gb_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), giropay?: (object{}&StripeObject), grabpay?: (object{}&StripeObject), jp_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), klarna?: (object{}&StripeObject), multibanco?: (object{reference: null|string, reference_status: null|string}&StripeObject), mx_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), nz_bank_transfer?: (object{}&StripeObject), p24?: (object{reference: null|string, reference_status: null|string}&StripeObject), paynow?: (object{}&StripeObject), paypal?: (object{network_decline_code: null|string}&StripeObject), pix?: (object{}&StripeObject), revolut?: (object{}&StripeObject), sofort?: (object{}&StripeObject), swish?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), th_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), type: string, us_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), wechat_pay?: (object{}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $destination_details
|
||||||
* @property null|BalanceTransaction|string $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
|
* @property null|BalanceTransaction|string $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
|
||||||
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: <code>lost_or_stolen_card</code>, <code>expired_or_canceled_card</code>, <code>charge_for_pending_refund_disputed</code>, <code>insufficient_funds</code>, <code>declined</code>, <code>merchant_request</code>, or <code>unknown</code>.
|
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: <code>lost_or_stolen_card</code>, <code>expired_or_canceled_card</code>, <code>charge_for_pending_refund_disputed</code>, <code>insufficient_funds</code>, <code>declined</code>, <code>merchant_request</code>, or <code>unknown</code>.
|
||||||
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
|
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,19 @@ namespace Stripe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property string $id Unique identifier for the event.
|
* @property string $id Unique identifier for the event.
|
||||||
* @property string $type
|
* @property string $type the "object" of the related object.
|
||||||
* @property string $url
|
* @property string $url a relative url to retrieve the related object.
|
||||||
*/
|
*/
|
||||||
class RelatedObject
|
class RelatedObject
|
||||||
{
|
{
|
||||||
public $id;
|
public $id;
|
||||||
public $type;
|
public $type;
|
||||||
public $url;
|
public $url;
|
||||||
|
|
||||||
|
public function __construct($json)
|
||||||
|
{
|
||||||
|
$this->id = $json['id'];
|
||||||
|
$this->type = $json['type'];
|
||||||
|
$this->url = $json['url'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,11 @@ class Review extends ApiResource
|
||||||
{
|
{
|
||||||
const OBJECT_NAME = 'review';
|
const OBJECT_NAME = 'review';
|
||||||
|
|
||||||
|
const CLOSED_REASON_ACKNOWLEDGED = 'acknowledged';
|
||||||
const CLOSED_REASON_APPROVED = 'approved';
|
const CLOSED_REASON_APPROVED = 'approved';
|
||||||
const CLOSED_REASON_CANCELED = 'canceled';
|
const CLOSED_REASON_CANCELED = 'canceled';
|
||||||
const CLOSED_REASON_DISPUTED = 'disputed';
|
const CLOSED_REASON_DISPUTED = 'disputed';
|
||||||
|
const CLOSED_REASON_PAYMENT_NEVER_SETTLED = 'payment_never_settled';
|
||||||
const CLOSED_REASON_REDACTED = 'redacted';
|
const CLOSED_REASON_REDACTED = 'redacted';
|
||||||
const CLOSED_REASON_REFUNDED = 'refunded';
|
const CLOSED_REASON_REFUNDED = 'refunded';
|
||||||
const CLOSED_REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud';
|
const CLOSED_REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud';
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -15,7 +15,7 @@ class AccountSessionService extends AbstractService
|
||||||
* Creates a AccountSession object that includes a single-use token that the
|
* Creates a AccountSession object that includes a single-use token that the
|
||||||
* platform can use on their front-end to grant client-side API access.
|
* platform can use on their front-end to grant client-side API access.
|
||||||
*
|
*
|
||||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\AccountSession
|
* @return \Stripe\AccountSession
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*
|
||||||
|
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*/
|
||||||
|
class BalanceSettingsService extends AbstractService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Retrieves balance settings for a given connected account. Related guide: <a
|
||||||
|
* href="/connect/authentication">Making API calls for connected accounts</a>.
|
||||||
|
*
|
||||||
|
* @param null|array{expand?: string[]} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\BalanceSettings
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function retrieve($params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('get', '/v1/balance_settings', $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates balance settings for a given connected account. Related guide: <a
|
||||||
|
* href="/connect/authentication">Making API calls for connected accounts</a>.
|
||||||
|
*
|
||||||
|
* @param null|array{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{minimum_balance_by_currency?: null|array<string, null|int>, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_timing?: array{delay_days_override?: null|int}}} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\BalanceSettings
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function update($params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', '/v1/balance_settings', $params, $opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ class CreditGrantService extends \Stripe\Service\AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a credit grant.
|
* Creates a credit grant.
|
||||||
*
|
*
|
||||||
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
|
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category?: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Billing\CreditGrant
|
* @return \Stripe\Billing\CreditGrant
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||||
* Creates a configuration that describes the functionality and behavior of a
|
* Creates a configuration that describes the functionality and behavior of a
|
||||||
* PortalSession.
|
* PortalSession.
|
||||||
*
|
*
|
||||||
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
|
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\BillingPortal\Configuration
|
* @return \Stripe\BillingPortal\Configuration
|
||||||
|
|
@ -64,7 +64,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||||
* Updates a configuration that describes the functionality of the customer portal.
|
* Updates a configuration that describes the functionality of the customer portal.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
|
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\BillingPortal\Configuration
|
* @return \Stripe\BillingPortal\Configuration
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -14,6 +14,7 @@ namespace Stripe\Service;
|
||||||
* @property ApplicationFeeService $applicationFees
|
* @property ApplicationFeeService $applicationFees
|
||||||
* @property Apps\AppsServiceFactory $apps
|
* @property Apps\AppsServiceFactory $apps
|
||||||
* @property BalanceService $balance
|
* @property BalanceService $balance
|
||||||
|
* @property BalanceSettingsService $balanceSettings
|
||||||
* @property BalanceTransactionService $balanceTransactions
|
* @property BalanceTransactionService $balanceTransactions
|
||||||
* @property Billing\BillingServiceFactory $billing
|
* @property Billing\BillingServiceFactory $billing
|
||||||
* @property BillingPortal\BillingPortalServiceFactory $billingPortal
|
* @property BillingPortal\BillingPortalServiceFactory $billingPortal
|
||||||
|
|
@ -42,11 +43,13 @@ namespace Stripe\Service;
|
||||||
* @property InvoiceService $invoices
|
* @property InvoiceService $invoices
|
||||||
* @property Issuing\IssuingServiceFactory $issuing
|
* @property Issuing\IssuingServiceFactory $issuing
|
||||||
* @property MandateService $mandates
|
* @property MandateService $mandates
|
||||||
|
* @property PaymentAttemptRecordService $paymentAttemptRecords
|
||||||
* @property PaymentIntentService $paymentIntents
|
* @property PaymentIntentService $paymentIntents
|
||||||
* @property PaymentLinkService $paymentLinks
|
* @property PaymentLinkService $paymentLinks
|
||||||
* @property PaymentMethodConfigurationService $paymentMethodConfigurations
|
* @property PaymentMethodConfigurationService $paymentMethodConfigurations
|
||||||
* @property PaymentMethodDomainService $paymentMethodDomains
|
* @property PaymentMethodDomainService $paymentMethodDomains
|
||||||
* @property PaymentMethodService $paymentMethods
|
* @property PaymentMethodService $paymentMethods
|
||||||
|
* @property PaymentRecordService $paymentRecords
|
||||||
* @property PayoutService $payouts
|
* @property PayoutService $payouts
|
||||||
* @property PlanService $plans
|
* @property PlanService $plans
|
||||||
* @property PriceService $prices
|
* @property PriceService $prices
|
||||||
|
|
@ -94,6 +97,7 @@ class CoreServiceFactory extends AbstractServiceFactory
|
||||||
'applicationFees' => ApplicationFeeService::class,
|
'applicationFees' => ApplicationFeeService::class,
|
||||||
'apps' => Apps\AppsServiceFactory::class,
|
'apps' => Apps\AppsServiceFactory::class,
|
||||||
'balance' => BalanceService::class,
|
'balance' => BalanceService::class,
|
||||||
|
'balanceSettings' => BalanceSettingsService::class,
|
||||||
'balanceTransactions' => BalanceTransactionService::class,
|
'balanceTransactions' => BalanceTransactionService::class,
|
||||||
'billing' => Billing\BillingServiceFactory::class,
|
'billing' => Billing\BillingServiceFactory::class,
|
||||||
'billingPortal' => BillingPortal\BillingPortalServiceFactory::class,
|
'billingPortal' => BillingPortal\BillingPortalServiceFactory::class,
|
||||||
|
|
@ -122,11 +126,13 @@ class CoreServiceFactory extends AbstractServiceFactory
|
||||||
'invoices' => InvoiceService::class,
|
'invoices' => InvoiceService::class,
|
||||||
'issuing' => Issuing\IssuingServiceFactory::class,
|
'issuing' => Issuing\IssuingServiceFactory::class,
|
||||||
'mandates' => MandateService::class,
|
'mandates' => MandateService::class,
|
||||||
|
'paymentAttemptRecords' => PaymentAttemptRecordService::class,
|
||||||
'paymentIntents' => PaymentIntentService::class,
|
'paymentIntents' => PaymentIntentService::class,
|
||||||
'paymentLinks' => PaymentLinkService::class,
|
'paymentLinks' => PaymentLinkService::class,
|
||||||
'paymentMethodConfigurations' => PaymentMethodConfigurationService::class,
|
'paymentMethodConfigurations' => PaymentMethodConfigurationService::class,
|
||||||
'paymentMethodDomains' => PaymentMethodDomainService::class,
|
'paymentMethodDomains' => PaymentMethodDomainService::class,
|
||||||
'paymentMethods' => PaymentMethodService::class,
|
'paymentMethods' => PaymentMethodService::class,
|
||||||
|
'paymentRecords' => PaymentRecordService::class,
|
||||||
'payouts' => PayoutService::class,
|
'payouts' => PayoutService::class,
|
||||||
'plans' => PlanService::class,
|
'plans' => PlanService::class,
|
||||||
'prices' => PriceService::class,
|
'prices' => PriceService::class,
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class CreditNoteService extends AbstractService
|
||||||
* <code>post_payment_credit_notes_amount</code>, or both, depending on the
|
* <code>post_payment_credit_notes_amount</code>, or both, depending on the
|
||||||
* invoice’s <code>amount_remaining</code> at the time of credit note creation.
|
* invoice’s <code>amount_remaining</code> at the time of credit note creation.
|
||||||
*
|
*
|
||||||
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, payment_record_refund?: array{payment_record: string, refund_group: string}, refund?: string, type?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\CreditNote
|
* @return \Stripe\CreditNote
|
||||||
|
|
@ -82,7 +82,7 @@ class CreditNoteService extends AbstractService
|
||||||
/**
|
/**
|
||||||
* Get a preview of a credit note without creating it.
|
* Get a preview of a credit note without creating it.
|
||||||
*
|
*
|
||||||
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, payment_record_refund?: array{payment_record: string, refund_group: string}, refund?: string, type?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\CreditNote
|
* @return \Stripe\CreditNote
|
||||||
|
|
@ -99,7 +99,7 @@ class CreditNoteService extends AbstractService
|
||||||
* property containing the first handful of those items. This URL you can retrieve
|
* property containing the first handful of those items. This URL you can retrieve
|
||||||
* the full (paginated) list of line items.
|
* the full (paginated) list of line items.
|
||||||
*
|
*
|
||||||
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, ending_before?: string, expand?: string[], invoice: string, limit?: int, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, refund?: string}[], shipping_cost?: array{shipping_rate?: string}, starting_after?: string} $params
|
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, ending_before?: string, expand?: string[], invoice: string, limit?: int, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, payment_record_refund?: array{payment_record: string, refund_group: string}, refund?: string, type?: string}[], shipping_cost?: array{shipping_rate?: string}, starting_after?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
|
* @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class CustomerService extends AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a new customer object.
|
* Creates a new customer object.
|
||||||
*
|
*
|
||||||
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params
|
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, business_name?: null|string, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], individual_name?: null|string, invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Customer
|
* @return \Stripe\Customer
|
||||||
|
|
@ -421,7 +421,7 @@ class CustomerService extends AbstractService
|
||||||
* This request accepts mostly the same arguments as the customer creation call.
|
* This request accepts mostly the same arguments as the customer creation call.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
|
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, business_name?: null|string, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], individual_name?: null|string, invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Customer
|
* @return \Stripe\Customer
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class CustomerSessionService extends AbstractService
|
||||||
* you can use on your front-end to grant client-side API access for certain
|
* you can use on your front-end to grant client-side API access for certain
|
||||||
* customer resources.
|
* customer resources.
|
||||||
*
|
*
|
||||||
* @param null|array{components: array{buy_button?: array{enabled: bool}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
|
* @param null|array{components: array{buy_button?: array{enabled: bool}, customer_sheet?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_remove?: string}}, mobile_payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_remove?: string, payment_method_save?: string, payment_method_save_allow_redisplay_override?: string}}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\CustomerSession
|
* @return \Stripe\CustomerSession
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,16 @@ namespace Stripe\Service;
|
||||||
class ExchangeRateService extends AbstractService
|
class ExchangeRateService extends AbstractService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* [Deprecated] The <code>ExchangeRate</code> APIs are deprecated. Please use the
|
||||||
|
* <a
|
||||||
|
* href="https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api">FX
|
||||||
|
* Quotes API</a> instead.
|
||||||
|
*
|
||||||
* Returns a list of objects that contain the rates at which foreign currencies are
|
* Returns a list of objects that contain the rates at which foreign currencies are
|
||||||
* converted to one another. Only shows the currencies for which Stripe supports.
|
* converted to one another. Only shows the currencies for which Stripe supports.
|
||||||
*
|
*
|
||||||
|
* @deprecated this method is deprecated, please refer to the description for details
|
||||||
|
*
|
||||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
|
|
@ -28,9 +35,16 @@ class ExchangeRateService extends AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* [Deprecated] The <code>ExchangeRate</code> APIs are deprecated. Please use the
|
||||||
|
* <a
|
||||||
|
* href="https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api">FX
|
||||||
|
* Quotes API</a> instead.
|
||||||
|
*
|
||||||
* Retrieves the exchange rates from the given currency to every supported
|
* Retrieves the exchange rates from the given currency to every supported
|
||||||
* currency.
|
* currency.
|
||||||
*
|
*
|
||||||
|
* @deprecated this method is deprecated, please refer to the description for details
|
||||||
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[]} $params
|
* @param null|array{expand?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@ class AccountService extends \Stripe\Service\AbstractService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribes to periodic refreshes of data associated with a Financial Connections
|
* Subscribes to periodic refreshes of data associated with a Financial Connections
|
||||||
* <code>Account</code>.
|
* <code>Account</code>. When the account status is active, data is typically
|
||||||
|
* refreshed once a day.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], features: string[]} $params
|
* @param null|array{expand?: string[], features: string[]} $params
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class InvoicePaymentService extends AbstractService
|
||||||
* the first handful of those items. There is also a URL where you can retrieve the
|
* the first handful of those items. There is also a URL where you can retrieve the
|
||||||
* full (paginated) list of payments.
|
* full (paginated) list of payments.
|
||||||
*
|
*
|
||||||
* @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, type: string}, starting_after?: string, status?: string} $params
|
* @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, payment_record?: string, type: string}, starting_after?: string, status?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Collection<\Stripe\InvoicePayment>
|
* @return \Stripe\Collection<\Stripe\InvoicePayment>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class InvoiceService extends AbstractService
|
||||||
* still a draft.
|
* still a draft.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoice_item?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
|
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoice_item?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Invoice
|
* @return \Stripe\Invoice
|
||||||
|
|
@ -80,7 +80,7 @@ class InvoiceService extends AbstractService
|
||||||
* more.
|
* more.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], payment_intent?: string} $params
|
* @param null|array{expand?: string[], payment_intent?: string, payment_record?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Invoice
|
* @return \Stripe\Invoice
|
||||||
|
|
@ -139,7 +139,7 @@ class InvoiceService extends AbstractService
|
||||||
* invoice creation. <a href="https://docs.stripe.com/currencies/conversions">Learn
|
* invoice creation. <a href="https://docs.stripe.com/currencies/conversions">Learn
|
||||||
* more</a>
|
* more</a>
|
||||||
*
|
*
|
||||||
* @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoiceitem?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount?: int, unit_amount_decimal?: string})[], issuer?: array{account?: string, type: string}, on_behalf_of?: null|string, preview_mode?: string, schedule?: string, schedule_details?: array{billing_mode?: array{type: string}, end_behavior?: string, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string}, subscription?: string, subscription_details?: array{billing_cycle_anchor?: array|int|string, billing_mode?: array{type: string}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancel_now?: bool, default_tax_rates?: null|string[], items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], proration_behavior?: string, proration_date?: int, resume_at?: string, start_date?: int, trial_end?: array|int|string}} $params
|
* @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoiceitem?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount?: int, unit_amount_decimal?: string})[], issuer?: array{account?: string, type: string}, on_behalf_of?: null|string, preview_mode?: string, schedule?: string, schedule_details?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, end_behavior?: string, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string}, subscription?: string, subscription_details?: array{billing_cycle_anchor?: array|int|string, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancel_now?: bool, default_tax_rates?: null|string[], items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], proration_behavior?: string, proration_date?: int, resume_at?: string, start_date?: int, trial_end?: array|int|string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Invoice
|
* @return \Stripe\Invoice
|
||||||
|
|
@ -334,7 +334,7 @@ class InvoiceService extends AbstractService
|
||||||
*
|
*
|
||||||
* @param string $parentId
|
* @param string $parentId
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params
|
* @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\InvoiceLineItem
|
* @return \Stripe\InvoiceLineItem
|
||||||
|
|
@ -351,7 +351,7 @@ class InvoiceService extends AbstractService
|
||||||
* is still a draft.
|
* is still a draft.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
|
* @param null|array{expand?: string[], invoice_metadata?: null|array<string, string>, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]})[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Invoice
|
* @return \Stripe\Invoice
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*
|
||||||
|
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*/
|
||||||
|
class PaymentAttemptRecordService extends AbstractService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* List all the Payment Attempt Records attached to the specified Payment Record.
|
||||||
|
*
|
||||||
|
* @param null|array{expand?: string[], limit?: int, payment_record: string, starting_after?: string} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\Collection<\Stripe\PaymentAttemptRecord>
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function all($params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->requestCollection('get', '/v1/payment_attempt_records', $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a Payment Attempt Record with the given ID.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{expand?: string[]} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentAttemptRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function retrieve($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('get', $this->buildPath('/v1/payment_attempt_records/%s', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -48,7 +48,7 @@ class PaymentLinkService extends AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a payment link.
|
* Creates a payment link.
|
||||||
*
|
*
|
||||||
* @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity: int}[], metadata?: array<string, string>, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: array<string, string>, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array<string, string>, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params
|
* @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array<string, string>, name: string, tax_code?: string, unit_label?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity: int}[], metadata?: array<string, string>, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: array<string, string>, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array<string, string>, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentLink
|
* @return \Stripe\PaymentLink
|
||||||
|
|
@ -80,7 +80,7 @@ class PaymentLinkService extends AbstractService
|
||||||
* Updates a payment link.
|
* Updates a payment link.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentLink
|
* @return \Stripe\PaymentLink
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class PaymentMethodConfigurationService extends AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a payment method configuration.
|
* Creates a payment method configuration.
|
||||||
*
|
*
|
||||||
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, crypto?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, fr_meal_voucher_conecs?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mb_way?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentMethodConfiguration
|
* @return \Stripe\PaymentMethodConfiguration
|
||||||
|
|
@ -61,7 +61,7 @@ class PaymentMethodConfigurationService extends AbstractService
|
||||||
* Update payment method configuration.
|
* Update payment method configuration.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, crypto?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, fr_meal_voucher_conecs?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, kakao_pay?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, kr_card?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mb_way?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, naver_pay?: array{display_preference?: array{preference?: string}}, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, payco?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, samsung_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentMethodConfiguration
|
* @return \Stripe\PaymentMethodConfiguration
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class PaymentMethodService extends AbstractService
|
||||||
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
|
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
|
||||||
* method details ahead of a future payment.
|
* method details ahead of a future payment.
|
||||||
*
|
*
|
||||||
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, crypto?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
|
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, crypto?: array{}, custom?: array{type: string}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentMethod
|
* @return \Stripe\PaymentMethod
|
||||||
|
|
@ -126,7 +126,7 @@ class PaymentMethodService extends AbstractService
|
||||||
* to be updated.
|
* to be updated.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|array<string, string>, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
|
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], metadata?: null|array<string, string>, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PaymentMethod
|
* @return \Stripe\PaymentMethod
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// File generated from our OpenAPI spec
|
||||||
|
|
||||||
|
namespace Stripe\Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*
|
||||||
|
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||||
|
*/
|
||||||
|
class PaymentRecordService extends AbstractService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Report a new Payment Record. You may report a Payment Record as it is
|
||||||
|
* initialized and later report updates through the other report_* methods, or
|
||||||
|
* report Payment Records in a terminal state directly, through this method.
|
||||||
|
*
|
||||||
|
* @param null|array{amount_requested: array{currency: string, value: int}, customer_details?: array{customer?: string, email?: string, name?: string, phone?: string}, customer_presence?: string, description?: string, expand?: string[], failed?: array{failed_at: int}, guaranteed?: array{guaranteed_at: int}, initiated_at: int, metadata?: null|array<string, string>, outcome?: string, payment_method_details: array{billing_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, custom?: array{display_name?: string, type?: string}, payment_method?: string, type?: string}, processor_details?: array{custom?: array{payment_reference: string}, type: string}, shipping_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPayment($params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', '/v1/payment_records/report_payment', $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report a new payment attempt on the specified Payment Record. A new payment
|
||||||
|
* attempt can only be specified if all other payment attempts are canceled or
|
||||||
|
* failed.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{description?: string, expand?: string[], failed?: array{failed_at: int}, guaranteed?: array{guaranteed_at: int}, initiated_at: int, metadata?: null|array<string, string>, outcome?: string, payment_method_details?: array{billing_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, custom?: array{display_name?: string, type?: string}, payment_method?: string, type?: string}, shipping_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPaymentAttempt($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_payment_attempt', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report that the most recent payment attempt on the specified Payment Record was
|
||||||
|
* canceled.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{canceled_at: int, expand?: string[], metadata?: null|array<string, string>} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPaymentAttemptCanceled($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_payment_attempt_canceled', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report that the most recent payment attempt on the specified Payment Record
|
||||||
|
* failed or errored.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{expand?: string[], failed_at: int, metadata?: null|array<string, string>} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPaymentAttemptFailed($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_payment_attempt_failed', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report that the most recent payment attempt on the specified Payment Record was
|
||||||
|
* guaranteed.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{expand?: string[], guaranteed_at: int, metadata?: null|array<string, string>} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPaymentAttemptGuaranteed($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_payment_attempt_guaranteed', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report informational updates on the specified Payment Record.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{customer_details?: array{customer?: string, email?: string, name?: string, phone?: string}, description?: null|string, expand?: string[], metadata?: null|array<string, string>, shipping_details?: null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportPaymentAttemptInformational($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_payment_attempt_informational', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report that the most recent payment attempt on the specified Payment Record was
|
||||||
|
* refunded.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{amount?: array{currency: string, value: int}, expand?: string[], initiated_at?: int, metadata?: null|array<string, string>, outcome: string, processor_details: array{custom?: array{refund_reference: string}, type: string}, refunded: array{refunded_at: int}} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function reportRefund($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('post', $this->buildPath('/v1/payment_records/%s/report_refund', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a Payment Record with the given ID.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @param null|array{expand?: string[]} $params
|
||||||
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
|
*
|
||||||
|
* @return \Stripe\PaymentRecord
|
||||||
|
*
|
||||||
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
|
*/
|
||||||
|
public function retrieve($id, $params = null, $opts = null)
|
||||||
|
{
|
||||||
|
return $this->request('get', $this->buildPath('/v1/payment_records/%s', $id), $params, $opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -91,8 +91,8 @@ class PayoutService extends AbstractService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverses a payout by debiting the destination bank account. At this time, you
|
* Reverses a payout by debiting the destination bank account. At this time, you
|
||||||
* can only reverse payouts for connected accounts to US bank accounts. If the
|
* can only reverse payouts for connected accounts to US and Canadian bank
|
||||||
* payout is manual and in the <code>pending</code> status, use
|
* accounts. If the payout is manual and in the <code>pending</code> status, use
|
||||||
* <code>/v1/payouts/:id/cancel</code> instead.
|
* <code>/v1/payouts/:id/cancel</code> instead.
|
||||||
*
|
*
|
||||||
* By requesting a reversal through <code>/v1/payouts/:id/reverse</code>, you
|
* By requesting a reversal through <code>/v1/payouts/:id/reverse</code>, you
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ class PromotionCodeService extends AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A promotion code points to a coupon. You can optionally restrict the code to a
|
* A promotion code points to an underlying promotion. You can optionally restrict
|
||||||
* specific customer, redemption limit, and expiration date.
|
* the code to a specific customer, redemption limit, and expiration date.
|
||||||
*
|
*
|
||||||
* @param null|array{active?: bool, code?: string, coupon: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: array<string, string>, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params
|
* @param null|array{active?: bool, code?: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: array<string, string>, promotion: array{coupon?: string, type: string}, restrictions?: array{currency_options?: array<string, array{minimum_amount?: int}>, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\PromotionCode
|
* @return \Stripe\PromotionCode
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class QuoteService extends AbstractService
|
||||||
* <code>expires_at</code> can be set in the dashboard via the <a
|
* <code>expires_at</code> can be set in the dashboard via the <a
|
||||||
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
||||||
*
|
*
|
||||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Quote
|
* @return \Stripe\Quote
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class SetupIntentService extends AbstractService
|
||||||
* or the <code>canceled</code> status if the confirmation limit is reached.
|
* or the <code>canceled</code> status if the confirmation limit is reached.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{confirmation_token?: string, expand?: string[], mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, return_url?: string, use_stripe_sdk?: bool} $params
|
* @param null|array{confirmation_token?: string, expand?: string[], mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, return_url?: string, use_stripe_sdk?: bool} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\SetupIntent
|
* @return \Stripe\SetupIntent
|
||||||
|
|
@ -82,7 +82,7 @@ class SetupIntentService extends AbstractService
|
||||||
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
|
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
|
||||||
* permissions to charge the payment method later.
|
* permissions to charge the payment method later.
|
||||||
*
|
*
|
||||||
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: array<string, string>, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
|
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, excluded_payment_method_types?: string[], expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: array<string, string>, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\SetupIntent
|
* @return \Stripe\SetupIntent
|
||||||
|
|
@ -121,7 +121,7 @@ class SetupIntentService extends AbstractService
|
||||||
* Updates a SetupIntent object.
|
* Updates a SetupIntent object.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|array<string, string>, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
|
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array<string, string>, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\SetupIntent
|
* @return \Stripe\SetupIntent
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class SubscriptionScheduleService extends AbstractService
|
||||||
* Creates a new subscription schedule object. Each customer can have up to 500
|
* Creates a new subscription schedule object. Each customer can have up to 500
|
||||||
* active or scheduled subscriptions.
|
* active or scheduled subscriptions.
|
||||||
*
|
*
|
||||||
* @param null|array{billing_mode?: array{type: string}, customer?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
* @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\SubscriptionSchedule
|
* @return \Stripe\SubscriptionSchedule
|
||||||
|
|
@ -104,7 +104,7 @@ class SubscriptionScheduleService extends AbstractService
|
||||||
* Updates an existing subscription schedule.
|
* Updates an existing subscription schedule.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\SubscriptionSchedule
|
* @return \Stripe\SubscriptionSchedule
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ class SubscriptionService extends AbstractService
|
||||||
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
||||||
* billing configurations that change over time.
|
* billing configurations that change over time.
|
||||||
*
|
*
|
||||||
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{type: string}, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Subscription
|
* @return \Stripe\Subscription
|
||||||
|
|
@ -106,7 +106,7 @@ class SubscriptionService extends AbstractService
|
||||||
* Upgrade the billing_mode of an existing subscription.
|
* Upgrade the billing_mode of an existing subscription.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{billing_mode: array{type: string}, expand?: string[]} $params
|
* @param null|array{billing_mode: array{flexible?: array{proration_discounts?: string}, type: string}, expand?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Subscription
|
* @return \Stripe\Subscription
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -29,7 +29,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a new <code>Configuration</code> object.
|
* Creates a new <code>Configuration</code> object.
|
||||||
*
|
*
|
||||||
* @param null|array{bbpos_wisepos_e?: array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, tipping?: null|array{aed?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, bgn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, huf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, mxn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, ron?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
|
* @param null|array{bbpos_wisepad3?: array{splashscreen?: null|string}, bbpos_wisepos_e?: array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, tipping?: null|array{aed?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, bgn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gip?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, huf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, mxn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, ron?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Terminal\Configuration
|
* @return \Stripe\Terminal\Configuration
|
||||||
|
|
@ -77,7 +77,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||||
* Updates a new <code>Configuration</code> object.
|
* Updates a new <code>Configuration</code> object.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{bbpos_wisepos_e?: null|array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: null|array{end_hour: int, start_hour: int}, stripe_s700?: null|array{splashscreen?: null|string}, tipping?: null|array{aed?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, bgn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, huf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, mxn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, ron?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
|
* @param null|array{bbpos_wisepad3?: null|array{splashscreen?: null|string}, bbpos_wisepos_e?: null|array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: null|array{end_hour: int, start_hour: int}, stripe_s700?: null|array{splashscreen?: null|string}, tipping?: null|array{aed?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, bgn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gip?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, huf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, mxn?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, ron?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Terminal\Configuration
|
* @return \Stripe\Terminal\Configuration
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class LocationService extends \Stripe\Service\AbstractService
|
||||||
* address fields are required in each country, see the <a
|
* address fields are required in each country, see the <a
|
||||||
* href="/docs/terminal/fleet/locations">Manage locations</a> guide.
|
* href="/docs/terminal/fleet/locations">Manage locations</a> guide.
|
||||||
*
|
*
|
||||||
* @param null|array{address: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: string, display_name: string, expand?: string[], metadata?: null|array<string, string>} $params
|
* @param null|array{address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, configuration_overrides?: string, display_name?: string, display_name_kana?: string, display_name_kanji?: string, expand?: string[], metadata?: null|array<string, string>, phone?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Terminal\Location
|
* @return \Stripe\Terminal\Location
|
||||||
|
|
@ -80,7 +80,7 @@ class LocationService extends \Stripe\Service\AbstractService
|
||||||
* passed. Any parameters not provided will be left unchanged.
|
* passed. Any parameters not provided will be left unchanged.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: null|string, display_name?: null|string, expand?: string[], metadata?: null|array<string, string>} $params
|
* @param null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, configuration_overrides?: null|string, display_name?: null|string, display_name_kana?: null|string, display_name_kanji?: null|string, expand?: string[], metadata?: null|array<string, string>, phone?: null|string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Terminal\Location
|
* @return \Stripe\Terminal\Location
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels the current reader action.
|
* Cancels the current reader action. See <a
|
||||||
|
* href="/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation">Programmatic
|
||||||
|
* Cancellation</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[]} $params
|
* @param null|array{expand?: string[]} $params
|
||||||
|
|
@ -43,7 +45,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates an input collection flow on a Reader.
|
* Initiates an <a href="/docs/terminal/features/collect-inputs">input collection
|
||||||
|
* flow</a> on a Reader to display input forms and collect information from your
|
||||||
|
* customers.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], inputs: array{custom_text: array{description?: string, skip_button?: string, submit_button?: string, title: string}, required?: bool, selection?: array{choices: array{id: string, style?: string, text: string}[]}, toggles?: array{default_value?: string, description?: string, title?: string}[], type: string}[], metadata?: array<string, string>} $params
|
* @param null|array{expand?: string[], inputs: array{custom_text: array{description?: string, skip_button?: string, submit_button?: string, title: string}, required?: bool, selection?: array{choices: array{id: string, style?: string, text: string}[]}, toggles?: array{default_value?: string, description?: string, title?: string}[], type: string}[], metadata?: array<string, string>} $params
|
||||||
|
|
@ -60,7 +64,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates a payment flow on a Reader and updates the PaymentIntent with card
|
* Initiates a payment flow on a Reader and updates the PaymentIntent with card
|
||||||
* details before manual confirmation.
|
* details before manual confirmation. See <a
|
||||||
|
* href="/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod">Collecting
|
||||||
|
* a Payment method</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{collect_config?: array{allow_redisplay?: string, enable_customer_cancellation?: bool, skip_tipping?: bool, tipping?: array{amount_eligible?: int}}, expand?: string[], payment_intent: string} $params
|
* @param null|array{collect_config?: array{allow_redisplay?: string, enable_customer_cancellation?: bool, skip_tipping?: bool, tipping?: array{amount_eligible?: int}}, expand?: string[], payment_intent: string} $params
|
||||||
|
|
@ -76,7 +82,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finalizes a payment on a Reader.
|
* Finalizes a payment on a Reader. See <a
|
||||||
|
* href="/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent">Confirming
|
||||||
|
* a Payment</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{confirm_config?: array{return_url?: string}, expand?: string[], payment_intent: string} $params
|
* @param null|array{confirm_config?: array{return_url?: string}, expand?: string[], payment_intent: string} $params
|
||||||
|
|
@ -123,7 +131,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates a payment flow on a Reader.
|
* Initiates a payment flow on a Reader. See <a
|
||||||
|
* href="/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment">process
|
||||||
|
* the payment</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{expand?: string[], payment_intent: string, process_config?: array{allow_redisplay?: string, enable_customer_cancellation?: bool, return_url?: string, skip_tipping?: bool, tipping?: array{amount_eligible?: int}}} $params
|
* @param null|array{expand?: string[], payment_intent: string, process_config?: array{allow_redisplay?: string, enable_customer_cancellation?: bool, return_url?: string, skip_tipping?: bool, tipping?: array{amount_eligible?: int}}} $params
|
||||||
|
|
@ -139,7 +149,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates a setup intent flow on a Reader.
|
* Initiates a SetupIntent flow on a Reader. See <a
|
||||||
|
* href="/docs/terminal/features/saving-payment-details/save-directly">Save
|
||||||
|
* directly without charging</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{allow_redisplay: string, expand?: string[], process_config?: array{enable_customer_cancellation?: bool}, setup_intent: string} $params
|
* @param null|array{allow_redisplay: string, expand?: string[], process_config?: array{enable_customer_cancellation?: bool}, setup_intent: string} $params
|
||||||
|
|
@ -155,7 +167,9 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates a refund on a Reader.
|
* Initiates an in-person refund on a Reader. See <a
|
||||||
|
* href="/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment">Refund
|
||||||
|
* an Interac Payment</a> for more details.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{amount?: int, charge?: string, expand?: string[], metadata?: array<string, string>, payment_intent?: string, refund_application_fee?: bool, refund_payment_config?: array{enable_customer_cancellation?: bool}, reverse_transfer?: bool} $params
|
* @param null|array{amount?: int, charge?: string, expand?: string[], metadata?: array<string, string>, payment_intent?: string, refund_application_fee?: bool, refund_payment_config?: array{enable_customer_cancellation?: bool}, reverse_transfer?: bool} $params
|
||||||
|
|
@ -187,7 +201,8 @@ class ReaderService extends \Stripe\Service\AbstractService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets reader display to show cart details.
|
* Sets the reader display to show <a href="/docs/terminal/features/display">cart
|
||||||
|
* details</a>.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param null|array{cart?: array{currency: string, line_items: array{amount: int, description: string, quantity: int}[], tax?: int, total: int}, expand?: string[], type: string} $params
|
* @param null|array{cart?: array{currency: string, line_items: array{amount: int, description: string, quantity: int}[], tax?: int, total: int}, expand?: string[], type: string} $params
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class ConfirmationTokenService extends \Stripe\Service\AbstractService
|
||||||
/**
|
/**
|
||||||
* Creates a test mode Confirmation Token server side for your integration tests.
|
* Creates a test mode Confirmation Token server side for your integration tests.
|
||||||
*
|
*
|
||||||
* @param null|array{expand?: string[], payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{card?: array{installments?: array{plan: array{count?: int, interval?: string, type: string}}}}, return_url?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}} $params
|
* @param null|array{expand?: string[], payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{card?: array{installments?: array{plan: array{count?: int, interval?: string, type: string}}}}, return_url?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\ConfirmationToken
|
* @return \Stripe\ConfirmationToken
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService
|
||||||
/**
|
/**
|
||||||
* Create a test-mode authorization.
|
* Create a test-mode authorization.
|
||||||
*
|
*
|
||||||
* @param null|array{amount?: int, amount_details?: array{atm_fee?: int, cashback_amount?: int}, authorization_method?: string, card: string, currency?: string, expand?: string[], fleet?: array{cardholder_prompt_data?: array{driver_id?: string, odometer?: int, unspecified_id?: string, user_id?: string, vehicle_number?: string}, purchase_type?: string, reported_breakdown?: array{fuel?: array{gross_amount_decimal?: string}, non_fuel?: array{gross_amount_decimal?: string}, tax?: array{local_amount_decimal?: string, national_amount_decimal?: string}}, service_type?: string}, fuel?: array{industry_product_code?: string, quantity_decimal?: string, type?: string, unit?: string, unit_cost_decimal?: string}, is_amount_controllable?: bool, merchant_amount?: int, merchant_currency?: string, merchant_data?: array{category?: string, city?: string, country?: string, name?: string, network_id?: string, postal_code?: string, state?: string, terminal_id?: string, url?: string}, network_data?: array{acquiring_institution_id?: string}, verification_data?: array{address_line1_check?: string, address_postal_code_check?: string, authentication_exemption?: array{claimed_by: string, type: string}, cvc_check?: string, expiry_check?: string, three_d_secure?: array{result: string}}, wallet?: string} $params
|
* @param null|array{amount?: int, amount_details?: array{atm_fee?: int, cashback_amount?: int}, authorization_method?: string, card: string, currency?: string, expand?: string[], fleet?: array{cardholder_prompt_data?: array{driver_id?: string, odometer?: int, unspecified_id?: string, user_id?: string, vehicle_number?: string}, purchase_type?: string, reported_breakdown?: array{fuel?: array{gross_amount_decimal?: string}, non_fuel?: array{gross_amount_decimal?: string}, tax?: array{local_amount_decimal?: string, national_amount_decimal?: string}}, service_type?: string}, fraud_disputability_likelihood?: string, fuel?: array{industry_product_code?: string, quantity_decimal?: string, type?: string, unit?: string, unit_cost_decimal?: string}, is_amount_controllable?: bool, merchant_amount?: int, merchant_currency?: string, merchant_data?: array{category?: string, city?: string, country?: string, name?: string, network_id?: string, postal_code?: string, state?: string, terminal_id?: string, url?: string}, network_data?: array{acquiring_institution_id?: string}, risk_assessment?: array{card_testing_risk?: array{invalid_account_number_decline_rate_past_hour?: int, invalid_credentials_decline_rate_past_hour?: int, risk_level: string}, merchant_dispute_risk?: array{dispute_rate?: int, risk_level: string}}, verification_data?: array{address_line1_check?: string, address_postal_code_check?: string, authentication_exemption?: array{claimed_by: string, type: string}, cvc_check?: string, expiry_check?: string, three_d_secure?: array{result: string}}, wallet?: string} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Issuing\Authorization
|
* @return \Stripe\Issuing\Authorization
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class TokenService extends AbstractService
|
||||||
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
|
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
|
||||||
* is <code>application</code>, which includes Custom accounts.
|
* is <code>application</code>, which includes Custom accounts.
|
||||||
*
|
*
|
||||||
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\Token
|
* @return \Stripe\Token
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array{include?: string[], limit?: int} $params
|
* @param null|array{include?: string[], limit?: int} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\Collection<\Stripe\V2\EventDestination>
|
* @return \Stripe\V2\Collection<\Stripe\V2\Core\EventDestination>
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -32,7 +32,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array{description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array<string, string>, name: string, snapshot_api_version?: string, type: string, amazon_eventbridge?: array{aws_account_id: string, aws_region: string}, webhook_endpoint?: array{url: string}} $params
|
* @param null|array{description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array<string, string>, name: string, snapshot_api_version?: string, type: string, amazon_eventbridge?: array{aws_account_id: string, aws_region: string}, webhook_endpoint?: array{url: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,7 +48,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array $params
|
* @param null|array $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\DeletedObject
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,7 +64,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array $params
|
* @param null|array $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -80,7 +80,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array $params
|
* @param null|array $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -96,7 +96,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array $params
|
* @param null|array $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\Event
|
* @return \Stripe\V2\Core\Event
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -112,7 +112,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array{include?: string[]} $params
|
* @param null|array{include?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -128,7 +128,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array{description?: string, enabled_events?: string[], include?: string[], metadata?: array<string, null|string>, name?: string, webhook_endpoint?: array{url: string}} $params
|
* @param null|array{description?: string, enabled_events?: string[], include?: string[], metadata?: array<string, null|string>, name?: string, webhook_endpoint?: array{url: string}} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\EventDestination
|
* @return \Stripe\V2\Core\EventDestination
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ class EventService extends \Stripe\Service\AbstractService
|
||||||
/**
|
/**
|
||||||
* List events, going back up to 30 days.
|
* List events, going back up to 30 days.
|
||||||
*
|
*
|
||||||
* @param null|array{limit?: int, object_id: string} $params
|
* @param null|array{gt?: string, gte?: string, limit?: int, lt?: string, lte?: string, object_id?: string, types?: string[]} $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\Collection<\Stripe\V2\Event>
|
* @return \Stripe\V2\Collection<\Stripe\V2\Core\Event>
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
@ -33,7 +33,7 @@ class EventService extends \Stripe\Service\AbstractService
|
||||||
* @param null|array $params
|
* @param null|array $params
|
||||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||||
*
|
*
|
||||||
* @return \Stripe\V2\Event
|
* @return \Stripe\V2\Core\Event
|
||||||
*
|
*
|
||||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ namespace Stripe;
|
||||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||||
* @property null|Customer|string $customer <p>ID of the Customer this SetupIntent belongs to, if one exists.</p><p>If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.</p>
|
* @property null|Customer|string $customer <p>ID of the Customer this SetupIntent belongs to, if one exists.</p><p>If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.</p>
|
||||||
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||||
|
* @property null|string[] $excluded_payment_method_types Payment method types that are excluded from this SetupIntent.
|
||||||
* @property null|string[] $flow_directions <p>Indicates the directions of money movement for which this payment method is intended to be used.</p><p>Include <code>inbound</code> if you intend to use the payment method as the origin to pull funds from. Include <code>outbound</code> if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.</p>
|
* @property null|string[] $flow_directions <p>Indicates the directions of money movement for which this payment method is intended to be used.</p><p>Include <code>inbound</code> if you intend to use the payment method as the origin to pull funds from. Include <code>outbound</code> if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.</p>
|
||||||
* @property null|(object{advice_code?: string, charge?: string, code?: string, decline_code?: string, doc_url?: string, message?: string, network_advice_code?: string, network_decline_code?: string, param?: string, payment_intent?: PaymentIntent, payment_method?: PaymentMethod, payment_method_type?: string, request_log_url?: string, setup_intent?: SetupIntent, source?: Account|BankAccount|Card|Source, type: string}&StripeObject) $last_setup_error The error encountered in the previous SetupIntent confirmation.
|
* @property null|(object{advice_code?: string, charge?: string, code?: string, decline_code?: string, doc_url?: string, message?: string, network_advice_code?: string, network_decline_code?: string, param?: string, payment_intent?: PaymentIntent, payment_method?: PaymentMethod, payment_method_type?: string, request_log_url?: string, setup_intent?: SetupIntent, source?: Account|BankAccount|Card|Source, type: string}&StripeObject) $last_setup_error The error encountered in the previous SetupIntent confirmation.
|
||||||
* @property null|SetupAttempt|string $latest_attempt The most recent SetupAttempt for this SetupIntent.
|
* @property null|SetupAttempt|string $latest_attempt The most recent SetupAttempt for this SetupIntent.
|
||||||
|
|
@ -77,7 +78,7 @@ class SetupIntent extends ApiResource
|
||||||
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
|
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
|
||||||
* permissions to charge the payment method later.
|
* permissions to charge the payment method later.
|
||||||
*
|
*
|
||||||
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: array<string, string>, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
|
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, excluded_payment_method_types?: string[], expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: array<string, string>, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
|
||||||
* @param null|array|string $options
|
* @param null|array|string $options
|
||||||
*
|
*
|
||||||
* @return SetupIntent the created resource
|
* @return SetupIntent the created resource
|
||||||
|
|
@ -143,7 +144,7 @@ class SetupIntent extends ApiResource
|
||||||
* Updates a SetupIntent object.
|
* Updates a SetupIntent object.
|
||||||
*
|
*
|
||||||
* @param string $id the ID of the resource to update
|
* @param string $id the ID of the resource to update
|
||||||
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|array<string, string>, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
|
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array<string, string>, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: array<string, string>, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, klarna?: array{currency?: string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
|
||||||
* @param null|array|string $opts
|
* @param null|array|string $opts
|
||||||
*
|
*
|
||||||
* @return SetupIntent the updated resource
|
* @return SetupIntent the updated resource
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class Stripe
|
||||||
/** @var float Initial delay between retries, in seconds */
|
/** @var float Initial delay between retries, in seconds */
|
||||||
private static $initialNetworkRetryDelay = 0.5;
|
private static $initialNetworkRetryDelay = 0.5;
|
||||||
|
|
||||||
const VERSION = '17.6.0';
|
const VERSION = '18.1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string the API key used for requests
|
* @return string the API key used for requests
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ namespace Stripe;
|
||||||
* @property Service\ApplicationFeeService $applicationFees
|
* @property Service\ApplicationFeeService $applicationFees
|
||||||
* @property Service\Apps\AppsServiceFactory $apps
|
* @property Service\Apps\AppsServiceFactory $apps
|
||||||
* @property Service\BalanceService $balance
|
* @property Service\BalanceService $balance
|
||||||
|
* @property Service\BalanceSettingsService $balanceSettings
|
||||||
* @property Service\BalanceTransactionService $balanceTransactions
|
* @property Service\BalanceTransactionService $balanceTransactions
|
||||||
* @property Service\Billing\BillingServiceFactory $billing
|
* @property Service\Billing\BillingServiceFactory $billing
|
||||||
* @property Service\BillingPortal\BillingPortalServiceFactory $billingPortal
|
* @property Service\BillingPortal\BillingPortalServiceFactory $billingPortal
|
||||||
|
|
@ -42,11 +43,13 @@ namespace Stripe;
|
||||||
* @property Service\InvoiceService $invoices
|
* @property Service\InvoiceService $invoices
|
||||||
* @property Service\Issuing\IssuingServiceFactory $issuing
|
* @property Service\Issuing\IssuingServiceFactory $issuing
|
||||||
* @property Service\MandateService $mandates
|
* @property Service\MandateService $mandates
|
||||||
|
* @property Service\PaymentAttemptRecordService $paymentAttemptRecords
|
||||||
* @property Service\PaymentIntentService $paymentIntents
|
* @property Service\PaymentIntentService $paymentIntents
|
||||||
* @property Service\PaymentLinkService $paymentLinks
|
* @property Service\PaymentLinkService $paymentLinks
|
||||||
* @property Service\PaymentMethodConfigurationService $paymentMethodConfigurations
|
* @property Service\PaymentMethodConfigurationService $paymentMethodConfigurations
|
||||||
* @property Service\PaymentMethodDomainService $paymentMethodDomains
|
* @property Service\PaymentMethodDomainService $paymentMethodDomains
|
||||||
* @property Service\PaymentMethodService $paymentMethods
|
* @property Service\PaymentMethodService $paymentMethods
|
||||||
|
* @property Service\PaymentRecordService $paymentRecords
|
||||||
* @property Service\PayoutService $payouts
|
* @property Service\PayoutService $payouts
|
||||||
* @property Service\PlanService $plans
|
* @property Service\PlanService $plans
|
||||||
* @property Service\PriceService $prices
|
* @property Service\PriceService $prices
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Stripe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The StripeContext class provides an immutable container and convenience methods for interacting with the `Stripe-Context` header. All methods return a new instance of StripeContext.
|
||||||
|
* You can use it whenever you're initializing a `StripeClient` or sending `stripe_context` with a request. It's also found in the `EventNotification.context` property.
|
||||||
|
*/
|
||||||
|
class StripeContext
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
private $segments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new StripeContext with the given segments.
|
||||||
|
*
|
||||||
|
* @param string[] $segments
|
||||||
|
*/
|
||||||
|
public function __construct($segments = [])
|
||||||
|
{
|
||||||
|
$this->segments = $segments ?: [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new StripeContext with the given segment added to the end.
|
||||||
|
*
|
||||||
|
* @param string $segment the segment to add
|
||||||
|
*
|
||||||
|
* @return StripeContext a new StripeContext instance with the segment appended
|
||||||
|
*/
|
||||||
|
public function push($segment)
|
||||||
|
{
|
||||||
|
if (null === $segment) {
|
||||||
|
throw new \InvalidArgumentException('segment cannot be null');
|
||||||
|
}
|
||||||
|
|
||||||
|
$newSegments = \array_merge($this->segments, [$segment]);
|
||||||
|
|
||||||
|
return new StripeContext($newSegments);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new StripeContext with the last segment removed.
|
||||||
|
*
|
||||||
|
* @return StripeContext a new StripeContext instance with the last segment removed
|
||||||
|
*/
|
||||||
|
public function pop()
|
||||||
|
{
|
||||||
|
if (empty($this->segments)) {
|
||||||
|
throw new Exception\BadMethodCallException('Cannot pop from an empty context');
|
||||||
|
}
|
||||||
|
|
||||||
|
$newSegments = \array_slice($this->segments, 0, -1);
|
||||||
|
|
||||||
|
return new StripeContext($newSegments);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the context to a string by joining segments with '/'.
|
||||||
|
*
|
||||||
|
* @return string string representation of the context segments joined by '/'
|
||||||
|
*/
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return \implode('/', $this->segments);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse a context string into a StripeContext instance.
|
||||||
|
*
|
||||||
|
* @param string $contextStr string to parse (segments separated by '/')
|
||||||
|
*
|
||||||
|
* @return StripeContext StripeContext instance with segments from the string
|
||||||
|
*/
|
||||||
|
public static function parse($contextStr)
|
||||||
|
{
|
||||||
|
if (null === $contextStr || '' === $contextStr) {
|
||||||
|
return new StripeContext([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$segments = \explode('/', $contextStr);
|
||||||
|
|
||||||
|
return new StripeContext($segments);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the segments of the context.
|
||||||
|
*
|
||||||
|
* @return string[] the array of segments
|
||||||
|
*/
|
||||||
|
public function getSegments()
|
||||||
|
{
|
||||||
|
return $this->segments;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue