diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 401f47d7..9d35972a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -118,11 +118,14 @@ Per [SECURITY.md](SECURITY.md) — never in a public issue. **Database naming.** Every column is prefixed with its table's singular name: `tickets.ticket_id`, `tickets.ticket_subject`, `clients.client_name`. This makes JOIN results unambiguous and is why queries can `SELECT *` across joins safely. New tables must follow it. -**Schema changes require three edits in one PR:** - +**Schema changes require two edits in one PR:** + 1. `db.sql` — so fresh installs get the new schema. -2. `includes/database_version.php` — bump `LATEST_DATABASE_VERSION`. -3. `admin/database_updates.php` — add an `if (CURRENT_DATABASE_VERSION == 'x.y.z')` block that applies the change and steps the version, so existing installs migrate. Migrations are sequential and rolling-release; never edit a historical block. +2. `admin/database_updates/.php` — a new file named for the version it upgrades **to**, containing only the queries that apply the change. Migrations are sequential and rolling-release; never edit a historical file. + +That is the whole job. `LATEST_DATABASE_VERSION` is derived from the highest-numbered filename in `admin/database_updates/`, and the runner (`admin/database_updates.php`) steps `config_current_database_version` after each file succeeds — so there is no constant to bump and no version-bump query to write. Each migration file needs the standard `defined('FROM_DB_UPDATER') || die(...)` guard at the top; copy an existing file's header. + +A single update run applies every pending migration in order, stopping at the first failure with the version left at the last file that completed, so a re-run resumes at the one that broke. **After acting, log and notify.** State changes call `logAudit($type, $action, $description, $client_id, $entity_id)` for the audit trail. User-facing events may also call `appNotify()`. Fire `triggerCustomAction()` where a site might reasonably want a hook. Then call `flashAlert($message, $type)` and `redirect()` (defaults to the referer) rather than setting session keys or `header()` manually. **Function names (post-rename).** Helpers were renamed for clarity in 2026; the old names **no longer exist** — code calling them fatals. If you're rebasing an old PR or following an old tutorial, translate: `sanitizeInput` → `escapeSql`, `nullable_htmlentities` → `escapeHtml`, `logAction` → `logAudit`, `flash_alert` → `flashAlert`, `customAction` → `triggerCustomAction`, `encryptLoginEntry`/`decryptLoginEntry` → `encryptCredentialEntry`/`decryptCredentialEntry`, `strtoAZaz09` → `toAlphanumeric`, `fetchUpdates` → `checkForUpdates`. diff --git a/admin/database_updates.php b/admin/database_updates.php index f9a93e4e..b31be782 100644 --- a/admin/database_updates.php +++ b/admin/database_updates.php @@ -1,4411 +1,69 @@ .php - that + * is the whole job. The latest version is derived from the directory listing + * (see includes/database_version.php) and this runner handles the version + * bump, so there is no constant to update and no bump query to remember. */ // Check if our database versions are defined -// If undefined, the file is probably being accessed directly rather than called via post.php?update_db +// If undefined, the file is probably being accessed directly rather than called via post.php?update_db or update_cli.php if (!defined("LATEST_DATABASE_VERSION") || !defined("CURRENT_DATABASE_VERSION") || !isset($mysqli)) { echo "Cannot access this file directly."; exit(); } -// Check if we need an update -if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { +// Migration files include-guard against this constant +define("FROM_DB_UPDATER", true); - // We need updates! +// Outputs for the caller (post/update.php, update_cli.php) +$database_updates_applied = []; // Versions successfully applied this run +$database_updates_error = null; // "version: error message" if a migration failed - if (CURRENT_DATABASE_VERSION == '0.2.0') { - //Insert queries here required to update to DB version 0.2.1 - - mysqli_query($mysqli, "ALTER TABLE `vendors` - ADD `vendor_hours` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_website`, - ADD `vendor_sla` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_hours`, - ADD `vendor_code` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_sla`, - ADD `vendor_template_id` INT(11) DEFAULT 0 AFTER `vendor_archived_at` - "); - - mysqli_query($mysqli, "ALTER TABLE `vendors` - DROP `vendor_country`, - DROP `vendor_address`, - DROP `vendor_city`, - DROP `vendor_state`, - DROP `vendor_zip`, - DROP `vendor_global` - "); - - //Create New Vendor Templates Table - mysqli_query($mysqli, "CREATE TABLE `vendor_templates` (`vendor_template_id` int(11) AUTO_INCREMENT PRIMARY KEY, - `vendor_template_name` varchar(200) NOT NULL, - `vendor_template_description` varchar(200) NULL DEFAULT NULL, - `vendor_template_phone` varchar(200) NULL DEFAULT NULL, - `vendor_template_email` varchar(200) NULL DEFAULT NULL, - `vendor_template_website` varchar(200) NULL DEFAULT NULL, - `vendor_template_hours` varchar(200) NULL DEFAULT NULL, - `vendor_template_created_at` datetime DEFAULT CURRENT_TIMESTAMP, - `vendor_template_updated_at` datetime NULL ON UPDATE CURRENT_TIMESTAMP, - `vendor_template_archived_at` datetime NULL DEFAULT NULL, - `company_id` int(11) NOT NULL - )"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.1') { - // Insert queries here required to update to DB version 0.2.2 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_email_parse` INT(1) NOT NULL DEFAULT '0' AFTER `config_ticket_from_email`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_imap_host` VARCHAR(200) NULL DEFAULT NULL AFTER `config_mail_from_name`, ADD `config_imap_port` INT(5) NULL DEFAULT NULL AFTER `config_imap_host`, ADD `config_imap_encryption` VARCHAR(200) NULL DEFAULT NULL AFTER `config_imap_port`;"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.2') { - // Insert queries here required to update to DB version 0.2.3 - - // Add contact_important field to those who don't have it (installed before March 2022) - try { - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_important` tinyint(1) NOT NULL DEFAULT 0 AFTER contact_password_reset_token;"); - } catch (Exception $e) { - // Field already exists - that's fine - } - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.3') { - //Create New interfaces Table - mysqli_query($mysqli, "CREATE TABLE `interfaces` (`interface_id` int(11) AUTO_INCREMENT PRIMARY KEY, - `interface_number` int(11) NULL DEFAULT NULL, - `interface_description` varchar(200) NULL DEFAULT NULL, - `interface_connected_asset` varchar(200) NULL DEFAULT NULL, - `interface_ip` varchar(200) NULL DEFAULT NULL, - `interface_created_at` datetime DEFAULT CURRENT_TIMESTAMP, - `interface_updated_at` datetime NULL ON UPDATE CURRENT_TIMESTAMP, - `interface_archived_at` datetime NULL DEFAULT NULL, - `interface_connected_asset_id` int(11) NOT NULL DEFAULT 0, - `interface_network_id` int(11) NOT NULL DEFAULT 0, - `interface_asset_id` int(11) NOT NULL, - `company_id` int(11) NOT NULL - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.4'"); - - } - - if (CURRENT_DATABASE_VERSION == '0.2.4') { - mysqli_query($mysqli, "CREATE TABLE `contact_assets` (`contact_id` int(11) NOT NULL,`asset_id` int(11) NOT NULL, PRIMARY KEY (`contact_id`,`asset_id`))"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.5') { - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_status` TINYINT(1) DEFAULT 1 AFTER `user_password`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.6') { - // Insert queries here required to update to DB version 0.2.7 - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_token_expire` DATETIME NULL DEFAULT NULL AFTER `contact_password_reset_token`"); - - // Update config.php var with new version var for use with docker - file_put_contents("config.php", "\$repo_branch = 'master';" . PHP_EOL, FILE_APPEND); - - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.7') { - - mysqli_query($mysqli, "ALTER TABLE `vendors` ADD `vendor_template` TINYINT(1) DEFAULT 0 AFTER `vendor_notes`"); - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_template` TINYINT(1) DEFAULT 0 AFTER `software_notes`"); - mysqli_query($mysqli, "ALTER TABLE `vendors` DROP `vendor_template_id`"); - mysqli_query($mysqli, "DROP TABLE vendor_templates"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.8') { - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_theme` VARCHAR(200) DEFAULT 'blue' AFTER `config_module_enable_ticketing`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.2.9') { - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_client_general_notifications` INT(1) NOT NULL DEFAULT '1' AFTER `config_ticket_email_parse`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.0') { - mysqli_query($mysqli, "ALTER TABLE `notifications` ADD `notification_user_id` TINYINT(1) DEFAULT 0 AFTER `notification_client_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.1') { - - // Assets - - mysqli_query($mysqli, "UPDATE `assets` SET `asset_login_id` = 0 WHERE `asset_login_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` CHANGE `asset_login_id` `asset_login_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `assets` SET `asset_vendor_id` = 0 WHERE `asset_vendor_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` CHANGE `asset_vendor_id` `asset_vendor_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `assets` SET `asset_location_id` = 0 WHERE `asset_location_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` CHANGE `asset_location_id` `asset_location_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `assets` SET `asset_network_id` = 0 WHERE `asset_network_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` CHANGE `asset_network_id` `asset_network_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `assets` SET `asset_client_id` = 0 WHERE `asset_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` CHANGE `asset_client_id` `asset_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Certificates - - mysqli_query($mysqli, "UPDATE `certificates` SET `certificate_domain_id` = 0 WHERE `certificate_domain_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `certificates` CHANGE `certificate_domain_id` `certificate_domain_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `certificates` CHANGE `certificate_client_id` `certificate_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Clients - - mysqli_query($mysqli, "UPDATE `clients` SET `primary_location` = 0 WHERE `primary_location` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `clients` CHANGE `primary_location` `primary_location` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `clients` SET `primary_contact` = 0 WHERE `primary_contact` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `clients` CHANGE `primary_contact` `primary_contact` INT(11) NOT NULL DEFAULT 0"); - - // Contacts - - mysqli_query($mysqli, "UPDATE `contacts` SET `contact_location_id` = 0 WHERE `contact_location_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `contacts` CHANGE `contact_location_id` `contact_location_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `contacts` CHANGE `contact_client_id` `contact_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Documents - - mysqli_query($mysqli, "ALTER TABLE `documents` CHANGE `document_template` `document_template` TINYINT(1) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `documents` SET `document_folder_id` = 0 WHERE `document_folder_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `documents` CHANGE `document_folder_id` `document_folder_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `documents` CHANGE `document_client_id` `document_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Domains - - mysqli_query($mysqli, "UPDATE `domains` SET `domain_registrar` = 0 WHERE `domain_registrar` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `domains` CHANGE `domain_registrar` `domain_registrar` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `domains` SET `domain_webhost` = 0 WHERE `domain_webhost` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `domains` CHANGE `domain_webhost` `domain_webhost` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `domains` CHANGE `domain_client_id` `domain_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Events - - mysqli_query($mysqli, "UPDATE `events` SET `event_client_id` = 0 WHERE `event_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `events` CHANGE `event_client_id` `event_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `events` SET `event_location_id` = 0 WHERE `event_location_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `events` CHANGE `event_location_id` `event_location_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `events` CHANGE `event_calendar_id` `event_calendar_id` INT(11) NOT NULL DEFAULT 0"); - - // Expenses - - mysqli_query($mysqli, "UPDATE `expenses` SET `expense_vendor_id` = 0 WHERE `expense_vendor_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `expenses` CHANGE `expense_vendor_id` `expense_vendor_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `expenses` SET `expense_client_id` = 0 WHERE `expense_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `expenses` CHANGE `expense_client_id` `expense_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `expenses` SET `expense_category_id` = 0 WHERE `expense_category_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `expenses` CHANGE `expense_category_id` `expense_category_id` INT(11) NOT NULL DEFAULT 0"); - - // Files - - mysqli_query($mysqli, "ALTER TABLE `files` CHANGE `file_client_id` `file_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Folders - - mysqli_query($mysqli, "UPDATE `folders` SET `parent_folder` = 0 WHERE `parent_folder` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `folders` CHANGE `parent_folder` `parent_folder` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `folders` CHANGE `folder_client_id` `folder_client_id` INT(11) NOT NULL DEFAULT 0"); - - // History - - mysqli_query($mysqli, "UPDATE `history` SET `history_invoice_id` = 0 WHERE `history_invoice_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `history` CHANGE `history_invoice_id` `history_invoice_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `history` SET `history_recurring_id` = 0 WHERE `history_recurring_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `history` CHANGE `history_recurring_id` `history_recurring_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `history` SET `history_quote_id` = 0 WHERE `history_quote_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `history` CHANGE `history_quote_id` `history_quote_id` INT(11) NOT NULL DEFAULT 0"); - - // Invoices - - mysqli_query($mysqli, "UPDATE `invoices` SET `invoice_amount` = 0.00 WHERE `invoice_amount` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoices` CHANGE `invoice_amount` `invoice_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - // Invoice Items - - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_quantity` `item_quantity` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_price` `item_price` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_subtotal` `item_subtotal` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "UPDATE `invoice_items` SET `item_tax` = 0.00 WHERE `item_tax` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_tax` `item_tax` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_total` `item_total` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "UPDATE `invoice_items` SET `item_tax_id` = 0 WHERE `item_tax_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_tax_id` `item_tax_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `invoice_items` SET `item_quote_id` = 0 WHERE `item_quote_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_quote_id` `item_quote_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `invoice_items` SET `item_recurring_id` = 0 WHERE `item_recurring_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_recurring_id` `item_recurring_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `invoice_items` SET `item_invoice_id` = 0 WHERE `item_invoice_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` CHANGE `item_invoice_id` `item_invoice_id` INT(11) NOT NULL DEFAULT 0"); - - // Locations - - mysqli_query($mysqli, "UPDATE `locations` SET `location_contact_id` = 0 WHERE `location_contact_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `locations` CHANGE `location_contact_id` `location_contact_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `locations` SET `location_client_id` = 0 WHERE `location_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `locations` CHANGE `location_client_id` `location_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Logins - - mysqli_query($mysqli, "UPDATE `logins` SET `login_vendor_id` = 0 WHERE `login_vendor_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logins` CHANGE `login_vendor_id` `login_vendor_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `logins` SET `login_asset_id` = 0 WHERE `login_asset_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logins` CHANGE `login_asset_id` `login_asset_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `logins` SET `login_software_id` = 0 WHERE `login_software_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logins` CHANGE `login_software_id` `login_software_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `logins` SET `login_client_id` = 0 WHERE `login_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logins` CHANGE `login_client_id` `login_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Logs - - mysqli_query($mysqli, "UPDATE `logs` SET `log_client_id` = 0 WHERE `log_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logs` CHANGE `log_client_id` `log_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `logs` DROP `log_invoice_id`"); - mysqli_query($mysqli, "ALTER TABLE `logs` DROP `log_quote_id`"); - mysqli_query($mysqli, "ALTER TABLE `logs` DROP `log_recurring_id`"); - mysqli_query($mysqli, "ALTER TABLE `logs` DROP `log_entity_id`"); - - mysqli_query($mysqli, "UPDATE `logs` SET `log_user_id` = 0 WHERE `log_user_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `logs` CHANGE `log_user_id` `log_user_id` INT(11) NOT NULL DEFAULT 0"); - - // Networks - - mysqli_query($mysqli, "UPDATE `networks` SET `network_location_id` = 0 WHERE `network_location_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `networks` CHANGE `network_location_id` `network_location_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `networks` CHANGE `network_client_id` `network_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Notifications - - mysqli_query($mysqli, "UPDATE `notifications` SET `notification_client_id` = 0 WHERE `notification_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `notifications` CHANGE `notification_client_id` `notification_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `notifications` CHANGE `notification_user_id` `notification_user_id` INT(11) NOT NULL DEFAULT 0"); - - // Payments - - mysqli_query($mysqli, "UPDATE `payments` SET `payment_invoice_id` = 0 WHERE `payment_invoice_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `payments` CHANGE `payment_invoice_id` `payment_invoice_id` INT(11) NOT NULL DEFAULT 0"); - - // Products - - mysqli_query($mysqli, "UPDATE `products` SET `product_tax_id` = 0 WHERE `product_tax_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `products` CHANGE `product_tax_id` `product_tax_id` INT(11) NOT NULL DEFAULT 0"); - - // Quotes - - mysqli_query($mysqli, "UPDATE `quotes` SET `quote_amount` = 0.00 WHERE `quote_amount` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `quotes` CHANGE `quote_amount` `quote_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - // Recurring - - mysqli_query($mysqli, "UPDATE `recurring` SET `recurring_amount` = 0.00 WHERE `recurring_amount` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `recurring` CHANGE `recurring_amount` `recurring_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - // Revenues - - mysqli_query($mysqli, "UPDATE `revenues` SET `revenue_amount` = 0.00 WHERE `revenue_amount` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `revenues` CHANGE `revenue_amount` `revenue_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00"); - - mysqli_query($mysqli, "UPDATE `revenues` SET `revenue_category_id` = 0 WHERE `revenue_category_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `revenues` CHANGE `revenue_category_id` `revenue_category_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `revenues` SET `revenue_client_id` = 0 WHERE `revenue_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `revenues` CHANGE `revenue_client_id` `revenue_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Scheduled Tickets - - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` CHANGE `scheduled_ticket_created_by` `scheduled_ticket_created_by` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `scheduled_tickets` SET `scheduled_ticket_client_id` = 0 WHERE `scheduled_ticket_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` CHANGE `scheduled_ticket_client_id` `scheduled_ticket_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `scheduled_tickets` SET `scheduled_ticket_contact_id` = 0 WHERE `scheduled_ticket_contact_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` CHANGE `scheduled_ticket_contact_id` `scheduled_ticket_contact_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `scheduled_tickets` SET `scheduled_ticket_asset_id` = 0 WHERE `scheduled_ticket_asset_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` CHANGE `scheduled_ticket_asset_id` `scheduled_ticket_asset_id` INT(11) NOT NULL DEFAULT 0"); - - // Settings - - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_ticket_email_parse` `config_ticket_email_parse` TINYINT(1) NOT NULL DEFAULT 0"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_ticket_client_general_notifications` `config_ticket_client_general_notifications` TINYINT(1) NOT NULL DEFAULT 1"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_enable_cron` `config_enable_cron` TINYINT(1) NOT NULL DEFAULT 0"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_recurring_auto_send_invoice` `config_recurring_auto_send_invoice` TINYINT(1) NOT NULL DEFAULT 1"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_enable_alert_domain_expire` = 1 WHERE `config_enable_alert_domain_expire` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_enable_alert_domain_expire` `config_enable_alert_domain_expire` TINYINT(1) NOT NULL DEFAULT 1"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_send_invoice_reminders` = 1 WHERE `config_send_invoice_reminders` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_send_invoice_reminders` `config_send_invoice_reminders` TINYINT(1) NOT NULL DEFAULT 1"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_stripe_enable` = 0 WHERE `config_stripe_enable` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_stripe_enable` `config_stripe_enable` TINYINT(1) NOT NULL DEFAULT 0"); - - // Software - - mysqli_query($mysqli, "UPDATE `software` SET `software_template` = 0 WHERE `software_template` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `software` CHANGE `software_template` `software_template` TINYINT(1) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `software` SET `software_login_id` = 0 WHERE `software_login_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `software` CHANGE `software_login_id` `software_login_id` INT(11) NOT NULL DEFAULT 0"); - - // Tags - - mysqli_query($mysqli, "ALTER TABLE `tags` ADD `tag_archived_at` DATETIME NULL DEFAULT NULL AFTER `tag_updated_at`"); - - // Tickets - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_closed_by` = 0 WHERE `ticket_closed_by` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_closed_by` `ticket_closed_by` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_vendor_id` = 0 WHERE `ticket_vendor_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_vendor_id` `ticket_vendor_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_client_id` = 0 WHERE `ticket_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_client_id` `ticket_client_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_contact_id` = 0 WHERE `ticket_contact_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_contact_id` `ticket_contact_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_location_id` = 0 WHERE `ticket_location_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_location_id` `ticket_location_id` INT(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `tickets` SET `ticket_asset_id` = 0 WHERE `ticket_asset_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `tickets` CHANGE `ticket_asset_id` `ticket_asset_id` INT(11) NOT NULL DEFAULT 0"); - - //Trips - - mysqli_query($mysqli, "UPDATE `trips` SET `trip_client_id` = 0 WHERE `trip_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `trips` CHANGE `trip_client_id` `trip_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Users - - mysqli_query($mysqli, "ALTER TABLE `users` CHANGE `user_status` `user_status` TINYINT(1) NOT NULL DEFAULT 1"); - - // Vendors - - mysqli_query($mysqli, "ALTER TABLE `vendors` CHANGE `vendor_template` `vendor_template` TINYINT(1) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "UPDATE `vendors` SET `vendor_client_id` = 0 WHERE `vendor_client_id` IS NULL"); - mysqli_query($mysqli, "ALTER TABLE `vendors` CHANGE `vendor_client_id` `vendor_client_id` INT(11) NOT NULL DEFAULT 0"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.2') { - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_billing` TINYINT(1) DEFAULT 0 AFTER `contact_important`"); - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_technical` TINYINT(1) DEFAULT 0 AFTER `contact_billing`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.3') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_telemetry` TINYINT(1) DEFAULT 0 AFTER `config_theme`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.4') { - // Insert queries here required to update to DB version 0.3.5 - - //Get & upgrade user login encryption - $sql_logins = mysqli_query($mysqli, "SELECT login_id, login_username FROM logins WHERE login_username IS NOT NULL"); - foreach ($sql_logins as $row) { - $login_id = $row['login_id']; - $login_username = $row['login_username']; - $login_encrypted_username = encryptLoginEntry($row['login_username']); - mysqli_query($mysqli, "UPDATE logins SET login_username = '$login_encrypted_username' WHERE login_id = '$login_id'"); - } - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.5') { - $installation_id = randomString(32); - - // Update config.php var with new version var for use with docker - file_put_contents("config.php", "\n\$installation_id = '$installation_id';" . PHP_EOL, FILE_APPEND); - - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.6') { - // Insert queries here required to update to DB version 0.3.7 - mysqli_query($mysqli, "ALTER TABLE `shared_items` ADD `item_encrypted_username` VARCHAR(255) NULL DEFAULT NULL AFTER `item_related_id`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.7') { - - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_important` TINYINT(1) NOT NULL DEFAULT 0 AFTER `login_note`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.8') { - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_accessed_at` DATETIME NULL DEFAULT NULL AFTER `contact_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_accessed_at` DATETIME NULL DEFAULT NULL AFTER `location_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_accessed_at` DATETIME NULL DEFAULT NULL AFTER `asset_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_accessed_at` DATETIME NULL DEFAULT NULL AFTER `software_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_accessed_at` DATETIME NULL DEFAULT NULL AFTER `login_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_accessed_at` DATETIME NULL DEFAULT NULL AFTER `network_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `certificates` ADD `certificate_accessed_at` DATETIME NULL DEFAULT NULL AFTER `certificate_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_accessed_at` DATETIME NULL DEFAULT NULL AFTER `domain_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `services` ADD `service_accessed_at` DATETIME NULL DEFAULT NULL AFTER `service_updated_at`"); - mysqli_query($mysqli, "ALTER TABLE `vendors` ADD `vendor_accessed_at` DATETIME NULL DEFAULT NULL AFTER `vendor_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_accessed_at` DATETIME NULL DEFAULT NULL AFTER `file_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_accessed_at` DATETIME NULL DEFAULT NULL AFTER `document_archived_at`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.3.9') { - - mysqli_query($mysqli, "ALTER TABLE `vendors` ADD `vendor_template_id` INT(11) NOT NULL DEFAULT 0 AFTER `vendor_client_id`"); - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_template_id` INT(11) NOT NULL DEFAULT 0 AFTER `software_client_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.0') { - mysqli_query($mysqli, "ALTER TABLE `logs` ADD `log_entity_id` INT NOT NULL DEFAULT '0' AFTER `log_user_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.1') { - mysqli_query($mysqli, "ALTER TABLE settings ADD `config_stripe_account` TINYINT(1) NOT NULL DEFAULT '0' AFTER config_stripe_secret"); - //Insert queries here required to update to DB version 0.4.2 - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.2') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_timezone` VARCHAR(200) NOT NULL DEFAULT 'America/New_York' AFTER `config_telemetry`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.3') { - // Insert queries here required to update to DB version 0.4.4 - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `client_id` `client_tags_client_id` INT NOT NULL"); - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `tag_id` `client_tags_tag_id` INT NOT NULL"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.4') { - // Insert queries here required to update to DB version 0.4.5 - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `client_tags_client_id` `client_tag_client_id` INT NOT NULL"); - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `client_tags_tag_id` `client_tag_tag_id` INT NOT NULL"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.5') { - // Insert queries here required to update to DB version 0.4.6 - mysqli_query($mysqli, "ALTER TABLE `contacts` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `locations` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `software` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `logins` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `networks` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `certificates` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `domains` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `tickets` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `ticket_replies` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `services` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `vendors` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `calendars` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `events` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `files` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `documents` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `folders` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `invoices` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `recurring` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `quotes` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `history` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `payments` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `trips` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `clients` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `expenses` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `transfers` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `revenues` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `api_keys` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `taxes` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `categories` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `tags` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `accounts` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `interfaces` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `records` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `logs` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `notifications` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `products` DROP `company_id`"); - mysqli_query($mysqli, "ALTER TABLE `companies` DROP `company_archived_at`"); - mysqli_query($mysqli, "ALTER TABLE `user_settings` DROP `user_default_company`"); - mysqli_query($mysqli, "DROP TABLE `user_companies`"); - mysqli_query($mysqli, "DROP TABLE `user_keys`"); //Unused Table - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.6') { - - mysqli_query($mysqli, "ALTER TABLE `notifications` ADD `notification_entity_id` INT(11) DEFAULT 0 AFTER `notification_user_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.7') { - - mysqli_query($mysqli, "ALTER TABLE `clients` ADD `client_rate` DECIMAL(15,2) NULL DEFAULT NULL AFTER `client_referral`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.8') { - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_source` VARCHAR(255) NULL DEFAULT NULL AFTER `ticket_number`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.4.9') { - // Insert queries here required to update to DB version 0.5.0 - mysqli_query($mysqli, "ALTER TABLE `clients` ADD `client_tax_id_number` VARCHAR(255) NULL DEFAULT NULL AFTER `client_net_terms`"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.0') { - // Insert queries here required to update to DB version 0.5.1 - mysqli_query($mysqli, "CREATE TABLE `ticket_attachments` ( - `ticket_attachment_id` int(11) NOT NULL AUTO_INCREMENT, - `ticket_attachment_name` varchar(255) NOT NULL, - `ticket_attachment_reference_name` varchar(255) NOT NULL, - `ticket_attachment_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `ticket_attachment_ticket_id` int(11) NOT NULL, - `ticket_attachment_reply_id` int(11) DEFAULT NULL, - PRIMARY KEY (`ticket_attachment_id`) - )"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.1') { - //Insert queries here required to update to DB version 0.5.2 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_autoclose` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_ticket_client_general_notifications`"); - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_cron_key` VARCHAR(255) NULL DEFAULT NULL AFTER `config_enable_cron`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.2') { - //Insert queries here required to update to DB version 0.5.3 - //Custom Fields and Values - - mysqli_query($mysqli, "CREATE TABLE `custom_fields` ( - `custom_field_id` int(11) NOT NULL AUTO_INCREMENT, - `custom_field_table` varchar(255) NOT NULL, - `custom_field_label` varchar(255) NOT NULL, - `custom_field_type` varchar(255) NOT NULL DEFAULT 'text', - `custom_field_location` int(11) NOT NULL DEFAULT 0, - `custom_field_order` int(11) NOT NULL DEFAULT 999, - PRIMARY KEY (`custom_field_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `custom_values` ( - `custom_value_id` int(11) NOT NULL AUTO_INCREMENT, - `custom_value_value` text NOT NULL, - `custom_value_field` int(11) NOT NULL, - PRIMARY KEY (`custom_value_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `asset_custom` ( - `asset_custom_id` int(11) NOT NULL AUTO_INCREMENT, - `asset_custom_field_value` int(11) NOT NULL, - `asset_custom_field_id` int(11) NOT NULL, - `asset_custom_asset_id` int(11) NOT NULL, - PRIMARY KEY (`asset_custom_id`) - )"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.3') { - //Insert queries here required to update to DB version 0.5.4 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_autoclose_hours` INT(5) NOT NULL DEFAULT 72 AFTER `config_ticket_autoclose`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.4') { - //Insert queries here required to update to DB version 0.5.5 - mysqli_query($mysqli, "CREATE TABLE `projects` ( - `project_id` int(11) NOT NULL AUTO_INCREMENT, - `project_template` tinyint(1) NOT NULL DEFAULT 0, - `project_name` varchar(255) NOT NULL, - `project_description` text NULL DEFAULT NULL, - `project_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `project_updated_at` datetime NULL DEFAULT NULL on update CURRENT_TIMESTAMP, - `project_archived_at` datetime NULL DEFAULT NULL, - `project_client_id` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`project_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `tasks` ( - `task_id` int(11) NOT NULL AUTO_INCREMENT, - `task_template` tinyint(1) NOT NULL DEFAULT 0, - `task_name` varchar(255) NOT NULL, - `task_description` text NULL DEFAULT NULL, - `task_finish_date` date NULL DEFAULT NULL, - `task_status` varchar(255) NULL DEFAULT NULL, - `task_completed_at` datetime NULL DEFAULT NULL, - `task_completed_by` int(11) NULL DEFAULT NULL, - `task_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `task_updated_at` datetime NULL DEFAULT NULL on update CURRENT_TIMESTAMP, - `task_ticket_id` int(11) NULL DEFAULT NULL, - `task_project_id` int(11) NULL DEFAULT NULL, - PRIMARY KEY (`task_id`) - )"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.5') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_login_key_required` TINYINT(1) NOT NULL DEFAULT '0' AFTER `config_module_enable_accounting`, ADD `config_login_key_secret` VARCHAR(255) NULL DEFAULT NULL AFTER `config_login_key_required`; "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.6') { - - mysqli_query($mysqli, "CREATE TABLE `email_queue` ( - `email_id` int(11) NOT NULL AUTO_INCREMENT, - `email_recipient` varchar(255) NOT NULL, - `email_from` varchar(255) NOT NULL, - `email_from_name` varchar(255) NOT NULL, - `email_subject` varchar(255) NOT NULL, - `email_content` longtext NOT NULL, - `email_queued_at` datetime NOT NULL DEFAULT current_timestamp(), - `email_sent_at` datetime NULL DEFAULT NULL, - PRIMARY KEY (`email_id`) - )"); - - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_description` VARCHAR(255) NULL DEFAULT NULL AFTER `asset_name`"); - - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_description` VARCHAR(255) NULL DEFAULT NULL AFTER `login_name`"); - - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_pin` VARCHAR(255) NULL DEFAULT NULL AFTER `contact_photo`"); - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_client_portal_enable` TINYINT(1) NOT NULL DEFAULT '1' AFTER `config_module_enable_accounting`"); - - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_vendor_ticket_number` VARCHAR(255) NULL DEFAULT NULL AFTER `ticket_status`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.7') { - mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `email_status` TINYINT(1) NOT NULL DEFAULT '0' AFTER `email_id`"); - mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `email_recipient_name` VARCHAR(255) NULL DEFAULT NULL AFTER `email_recipient`"); - mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `email_failed_at` DATETIME NULL DEFAULT NULL AFTER `email_queued_at`"); - mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `email_attempts` TINYINT(1) NOT NULL DEFAULT '0' AFTER `email_failed_at`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.8') { - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_primary` TINYINT(1) NOT NULL DEFAULT 0 AFTER `contact_token_expire`"); - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_primary` TINYINT(1) NOT NULL DEFAULT 0 AFTER `location_photo`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.5.9') { - - // Copy primary_location and primary_contact to their new vars in their own respecting tables - $sql = mysqli_query($mysqli, "SELECT * FROM clients"); - while($row = mysqli_fetch_assoc($sql)) { - $primary_contact = $row['primary_contact']; - $primary_location = $row['primary_location']; - - if($primary_contact > 0){ - mysqli_query($mysqli, "UPDATE contacts SET contact_primary = 1, contact_important = 1 WHERE contact_id = $primary_contact"); - } - if($primary_location > 0){ - mysqli_query($mysqli, "UPDATE locations SET location_primary = 1 WHERE location_id = $primary_location"); - } - } - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.0') { - mysqli_query($mysqli, "ALTER TABLE `clients` DROP `primary_contact`"); - mysqli_query($mysqli, "ALTER TABLE `clients` DROP `primary_location`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.1') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD COLUMN `config_imap_username` VARCHAR(200) NULL DEFAULT NULL AFTER `config_imap_encryption`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD COLUMN `config_imap_password` VARCHAR(200) NULL DEFAULT NULL AFTER `config_imap_username`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.2') { - //Insert queries here required to update to DB version 0.6.3 - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_invoice_late_fee_enable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_invoice_from_email`"); - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_invoice_late_fee_percent` DECIMAL(5,2) NOT NULL DEFAULT 0 AFTER `config_invoice_late_fee_enable`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.3') { - mysqli_query($mysqli, "ALTER TABLE `quotes` ADD COLUMN `quote_expire` DATE NULL DEFAULT NULL AFTER `quote_date`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.4') { - //Insert queries here required to update to DB version 0.6.5 - - mysqli_query($mysqli, "CREATE TABLE `ticket_watchers` ( - `watcher_id` int(11) NOT NULL AUTO_INCREMENT, - `watcher_name` varchar(255) NULL DEFAULT NULL, - `watcher_email` varchar(255) NOT NULL, - `watcher_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `watcher_ticket_id` int(11) NOT NULL, - PRIMARY KEY (`watcher_id`) - )"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.5') { - //Insert queries here required to update to DB version 0.6.6 - mysqli_query($mysqli, "ALTER TABLE `ticket_watchers` DROP `watcher_created_at`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.6') { - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_start_page` VARCHAR(200) DEFAULT 'clients.php' AFTER `config_current_database_version`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.7') { - - mysqli_query($mysqli, "CREATE TABLE `recurring_expenses` ( - `recurring_expense_id` INT(11) NOT NULL AUTO_INCREMENT, - `recurring_expense_frequency` TINYINT(1) NOT NULL, - `recurring_expense_day` TINYINT DEFAULT NULL, - `recurring_expense_month` TINYINT DEFAULT NULL, - `recurring_expense_last_sent` DATE NULL DEFAULT NULL, - `recurring_expense_next_date` DATE NOT NULL, - `recurring_expense_status` TINYINT(1) NOT NULL DEFAULT 1, - `recurring_expense_description` TEXT DEFAULT NULL, - `recurring_expense_amount` DECIMAL(15,2) NOT NULL, - `recurring_expense_payment_method` VARCHAR(200) DEFAULT NULL, - `recurring_expense_payment_reference` VARCHAR(200) DEFAULT NULL, - `recurring_expense_currency_code` VARCHAR(200) NOT NULL, - `recurring_expense_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `recurring_expense_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `recurring_expense_archived_at` DATETIME DEFAULT NULL, - `recurring_expense_vendor_id` INT(11) NOT NULL, - `recurring_expense_client_id` INT(11) NOT NULL DEFAULT 0, - `recurring_expense_category_id` INT(11) NOT NULL, - `recurring_expense_account_id` INT(11) NOT NULL, - PRIMARY KEY (`recurring_expense_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.8') { - //Insert queries here required to update to DB version 0.6.9 - mysqli_query($mysqli, "ALTER TABLE `recurring_expenses` CHANGE `recurring_expense_payment_reference` `recurring_expense_reference` VARCHAR(255) DEFAULT NULL"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.6.9') { - - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_records_per_page` INT(11) NOT NULL DEFAULT 10 AFTER `user_role`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.0') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_login_message` TEXT DEFAULT NULL AFTER `config_client_portal_enable`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.1') { - mysqli_query($mysqli, "CREATE TABLE `budget` ( - `budget_id` INT(11) NOT NULL AUTO_INCREMENT, - `budget_month` TINYINT NOT NULL, - `budget_year` TINYINT NOT NULL, - `budget_amount` DECIMAL(15,2) NOT NULL, - `budget_description` VARCHAR(255) DEFAULT NULL, - `budget_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `budget_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `budget_category_id` INT(11) NOT NULL, - PRIMARY KEY (`budget_id`) - )"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.2') { - mysqli_query($mysqli, "ALTER TABLE `budget` CHANGE `budget_year` `budget_year` INT NOT NULL"); - mysqli_query($mysqli, "ALTER TABLE `budget` CHANGE `budget_amount` `budget_amount` DECIMAL(15,2) DEFAULT 0.00"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.3') { - //Insert queries here required to update to DB version 0.7.4 - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_folder_id` INT(11) NOT NULL DEFAULT 0 AFTER `file_accessed_at`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.4') { - //Insert queries here required to update to DB version 0.7.5 - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_hash` VARCHAR(200) DEFAULT NULL AFTER `file_ext`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.5') { - //Insert queries here required to update to DB version 0.7.6 - mysqli_query($mysqli, "ALTER TABLE `folders` ADD `folder_location` INT DEFAULT 0 AFTER `parent_folder`"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.6') { - //Insert queries here required to update to DB version 0.7.7 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_new_ticket_notification_email` VARCHAR(200) DEFAULT NULL AFTER `config_ticket_autoclose_hours`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.7') { - //Insert queries here required to update to DB version 0.7.8 - mysqli_query($mysqli, "ALTER TABLE `notifications` ADD `notification_action` VARCHAR(250) DEFAULT NULL AFTER `notification`"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.8') { - //Insert queries here required to update to DB version 0.7.9 - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_force_mfa` TINYINT(1) NOT NULL DEFAULT 0 AFTER `user_role`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.7.9') { - //Insert queries here required to update to DB version 0.8.0 - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_uri` VARCHAR(250) DEFAULT NULL AFTER `asset_mac`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.0'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.0') { - //Insert queries here required to update to DB version 0.8.1 - mysqli_query($mysqli, "ALTER TABLE `categories` ADD `category_icon` VARCHAR(200) DEFAULT NULL AFTER `category_color`"); - mysqli_query($mysqli, "ALTER TABLE `categories` ADD `category_parent` INT(11) DEFAULT 0 AFTER `category_icon`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.1') { - //Insert queries here required to update to DB version 0.8.2 - mysqli_query($mysqli, "CREATE TABLE `document_files` (`document_id` int(11) NOT NULL,`file_id` int(11) NOT NULL, PRIMARY KEY (`document_id`,`file_id`))"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.2'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.2') { - //Insert queries here required to update to DB version 0.8.3 - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_parent` INT(11) NOT NULL DEFAULT 0 AFTER `document_content_raw`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.3'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.3') { - //Insert queries here required to update to DB version 0.8.4 - - mysqli_query($mysqli, "UPDATE `documents` SET `document_parent` = `document_id`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.4'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.4') { - //Insert queries here required to update to DB version 0.8.5 - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_description` TEXT DEFAULT NULL AFTER `document_name`"); - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_created_by` INT(11) NOT NULL DEFAULT 0 AFTER `document_folder_id`"); - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_updated_by` INT(11) NOT NULL DEFAULT 0 AFTER `document_created_by`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.5') { - // Insert queries here required to update to DB version 0.8.6 (Adding login entry password change tracking) - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_password_changed_at` datetime DEFAULT current_timestamp() AFTER `login_accessed_at`"); - - // For the safest initial value, set login_password_changed_at to when the login entry was created (as there is no guarantee the password was changed just because the record was updated) - $sql_logins = mysqli_query($mysqli, "SELECT login_id, login_created_at FROM logins WHERE login_password IS NOT NULL AND login_archived_at IS NULL"); - foreach ($sql_logins as $row) { - $login_id = $row['login_id']; - $login_password_changed_at = $row['login_created_at']; - mysqli_query($mysqli, "UPDATE logins SET login_password_changed_at = '$login_password_changed_at' WHERE login_id = '$login_id'"); - } - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.6') { - // Insert queries here required to update to DB version 0.8.7 - mysqli_query($mysqli, "ALTER TABLE `accounts` ADD `account_type` int(6) DEFAULT NULL AFTER `account_notes`"); - mysqli_query($mysqli, "CREATE TABLE `account_types` (`account_type_id` int(11) NOT NULL AUTO_INCREMENT,`account_type_name` varchar(255) NOT NULL,`account_type_description` text DEFAULT NULL,`account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(),`account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),`account_type_archived_at` datetime DEFAULT NULL,PRIMARY KEY (`account_type_id`))"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.8.7') { - //Create Main Account Types - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Asset', account_type_id= '10', account_type_description = 'Assets are economic resources which are expected to benefit the business in the future.'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Liability', account_type_id= '20', account_type_description = 'Liabilities are obligations of the business entity. They are usually classified as current liabilities (due within one year or less) and long-term liabilities (due after one year).'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Equity', account_type_id= '30', account_type_description = 'Equity represents the owners stake in the business after liabilities have been deducted.'"); - //Create Secondary Account Types - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Current Asset', account_type_id= '11', account_type_description = 'Current assets are expected to be consumed within one year or less.'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Fixed Asset', account_type_id= '12', account_type_description = 'Fixed assets are expected to benefit the business for more than one year.'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Other Asset', account_type_id= '19', account_type_description = 'Other assets are assets that do not fit into any of the other asset categories.'"); - - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Current Liability', account_type_id= '21', account_type_description = 'Current liabilities are expected to be paid within one year or less.'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Long Term Liability', account_type_id= '22', account_type_description = 'Long term liabilities are expected to be paid after one year.'"); - mysqli_query($mysqli,"INSERT INTO account_types SET account_type_name = 'Other Liability', account_type_id= '29', account_type_description = 'Other liabilities are liabilities that do not fit into any of the other liability categories.'"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.8'"); - } - - - if (CURRENT_DATABASE_VERSION == '0.8.8') { - // Insert queries here required to update to DB version 0.8.9 - mysqli_query($mysqli, "ALTER TABLE `invoice_items` ADD `item_order` INT(11) NOT NULL DEFAULT 0 AFTER `item_total`"); - // Update existing invoices so that item_order is set to item_id - $sql_invoices = mysqli_query($mysqli, "SELECT invoice_id FROM invoices WHERE invoice_id IS NOT NULL"); - foreach ($sql_invoices as $row) { - $invoice_id = $row['invoice_id']; - $sql_invoice_items = mysqli_query($mysqli, "SELECT item_id FROM invoice_items WHERE item_invoice_id = '$invoice_id' ORDER BY item_id ASC"); - $item_order = 1; - foreach ($sql_invoice_items as $row) { - $item_id = $row['item_id']; - mysqli_query($mysqli, "UPDATE invoice_items SET item_order = '$item_order' WHERE item_id = '$item_id'"); - $item_order++; - //Log changes made to invoice - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Invoice', log_action = 'Modify', log_description = 'Updated item_order to item_id: $item_order'"); - - } - } - - // - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.9'"); - } - - - if (CURRENT_DATABASE_VERSION == '0.8.9') { - // Insert queries here required to update to DB version 0.9.0 - // Update existing quotes and recurrings so that item_order is set to item_id - $sql_quotes = mysqli_query($mysqli, "SELECT quote_id FROM quotes WHERE quote_id IS NOT NULL"); - $sql_recurrings = mysqli_query($mysqli, "SELECT recurring_id FROM recurring WHERE recurring_id IS NOT NULL"); - - foreach ($sql_quotes as $row) { - $quote_id = $row['quote_id']; - $sql_quote_items = mysqli_query($mysqli, "SELECT item_id FROM invoice_items WHERE item_quote_id = '$quote_id' ORDER BY item_id ASC"); - $item_order = 1; - foreach ($sql_quote_items as $row) { - $item_id = $row['item_id']; - mysqli_query($mysqli, "UPDATE invoice_items SET item_order = '$item_order' WHERE item_id = '$item_id'"); - $item_order++; - //Log changes made to quote - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Quote', log_action = 'Modify', log_description = 'Updated item_order to item_id: $item_order'"); - } - } - - foreach ($sql_recurrings as $row) { - $recurring_id = $row['recurring_id']; - $sql_recurring_items = mysqli_query($mysqli, "SELECT item_id FROM invoice_items WHERE item_recurring_id = '$recurring_id' ORDER BY item_id ASC"); - $item_order = 1; - foreach ($sql_recurring_items as $row) { - $item_id = $row['item_id']; - mysqli_query($mysqli, "UPDATE invoice_items SET item_order = '$item_order' WHERE item_id = '$item_id'"); - $item_order++; - //Log changes made to recurring - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Recurring', log_action = 'Modify', log_description = 'Updated item_order to item_id: $item_order'"); - } - } - - - // - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.0'"); - } - - - if (CURRENT_DATABASE_VERSION == '0.9.0') { - //add leads column to clients table - mysqli_query($mysqli, "ALTER TABLE `clients` ADD `client_lead` TINYINT(1) NOT NULL DEFAULT 0 AFTER `client_id`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.1'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.1') { - // Insert queries here required to update to DB version 0.9.2 - mysqli_query($mysqli, "ALTER TABLE `invoices` ADD `invoice_discount_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `invoice_due`"); - mysqli_query($mysqli, "ALTER TABLE `recurring` ADD `recurring_discount_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `recurring_status`"); - mysqli_query($mysqli, "ALTER TABLE `quotes` ADD `quote_discount_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `quote_status`"); - - // Then update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.2'"); - - } - - if (CURRENT_DATABASE_VERSION == '0.9.2') { - mysqli_query($mysqli, "ALTER TABLE `account_types` ADD `account_type_parent` INT(11) NOT NULL DEFAULT 1 AFTER `account_type_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.3'"); - - } - - if (CURRENT_DATABASE_VERSION == '0.9.3') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_default_hourly_rate` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `config_default_net_terms`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.4'"); - - } - - if (CURRENT_DATABASE_VERSION == '0.9.4') { - // Insert queries here required to update to DB version 0.9.5 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_client_pays_fees` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_stripe_account`"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.5'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.5') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_remember_me_token` VARCHAR(255) NULL DEFAULT NULL AFTER `user_role`"); - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.6'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.6') { - // Insert queries here required to update to DB version 0.9.7 - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_invoice_id` INT(11) NOT NULL DEFAULT 0 AFTER `ticket_asset_id`"); - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_billable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `ticket_status`"); - //set all invoice id - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.7'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.7') { - // Insert queries here required to update to DB version 0.9.8 - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_dashboard_financial_enable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `user_config_records_per_page`"); - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_dashboard_technical_enable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `user_config_dashboard_financial_enable`"); - //set all invoice id - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.8'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.8') { - //Insert queries here required to update to DB version 0.9.9 - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_notes` TEXT NULL DEFAULT NULL AFTER `domain_raw_whois`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'"); - } - - if (CURRENT_DATABASE_VERSION == '0.9.9') { - //Insert queries here required to update to DB version 1.0.0 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_destructive_deletes_enable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_timezone`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.0') { - //Insert queries here required to update to DB version 1.0.1 - mysqli_query($mysqli, "ALTER TABLE `assets` MODIFY `asset_uri` VARCHAR(500) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_uri_2` VARCHAR(500) DEFAULT NULL AFTER `asset_uri`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.1') { - //Insert queries here required to update to DB version 1.0.2 - mysqli_query($mysqli, "ALTER TABLE `logins` MODIFY `login_uri` VARCHAR(500) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_uri_2` VARCHAR(500) DEFAULT NULL AFTER `login_uri`"); - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_nat_ip` VARCHAR(200) DEFAULT NULL AFTER `asset_ip`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.2'"); - } - - - - if (CURRENT_DATABASE_VERSION == '1.0.2') { - //Insert queries here required to update to DB version 1.0.3 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_expense_vendor` INT(11) NOT NULL DEFAULT 0 AFTER `config_stripe_account`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_expense_category` INT(11) NOT NULL DEFAULT 0 AFTER `config_stripe_expense_vendor`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_percentage_fee` DECIMAL(4,4) NOT NULL DEFAULT 0.029 AFTER `config_stripe_expense_category`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_flat_fee` DECIMAL(15,2) NOT NULL DEFAULT 0.30 AFTER `config_stripe_percentage_fee`"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_stripe_account` `config_stripe_account` INT(11) NOT NULL DEFAULT 0"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.3') { - //Insert queries here required to update to DB version 1.0.4 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_enable` TINYINT(1) DEFAULT 0 AFTER `config_stripe_percentage_fee`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_provider` VARCHAR(250) DEFAULT NULL AFTER `config_ai_enable`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_url` VARCHAR(250) DEFAULT NULL AFTER `config_ai_provider`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_api_key` VARCHAR(250) DEFAULT NULL AFTER `config_ai_url`"); - - //Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.4'"); - } - - // Be sure to change database_version.php to reflect the version you are updating to here - // Please add this same comment block to the bottom of this file, and update the version number. - // Uncomment Below Lines, to add additional database updates - // - - if (CURRENT_DATABASE_VERSION == '1.0.4') { - //Insert queries here required to update to DB version 1.0.5 - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_schedule` DATETIME DEFAULT NULL AFTER `ticket_billable`"); - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_onsite` TINYINT(1) NOT NULL DEFAULT 0 AFTER `ticket_schedule`"); - mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `email_cal_str` VARCHAR(1024) DEFAULT NULL AFTER `email_content`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.5') { - //Insert queries here required to update to DB version 1.0.6 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_model` VARCHAR(250) DEFAULT NULL AFTER `config_ai_provider`"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.6') { - // Insert queries here required to update to DB version 1.0.7 - mysqli_query($mysqli, "CREATE TABLE `remember_tokens` (`remember_token_id` int(11) NOT NULL AUTO_INCREMENT,`remember_token_token` varchar(255) NOT NULL,`remember_token_user_id` int(11) NOT NULL,`remember_token_created_at` datetime NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`remember_token_id`))"); - - // Then, update the database to the next sequential version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.7') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` DROP `user_config_remember_me_token`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.8') { - // Removed this as login_asset_id is present in the logins table and allow 1 asset to have many logins. - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_login_id`"); - // Dropped this unused Table as we don't need many to many relationship between assets and logins - mysqli_query($mysqli, "DROP TABLE asset_logins"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.0.9') { - mysqli_query($mysqli, "ALTER TABLE `transfers` ADD `transfer_method` VARCHAR(200) DEFAULT NULL AFTER `transfer_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.0') { - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_description` TEXT DEFAULT NULL AFTER `file_name`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_important` TINYINT(1) NOT NULL DEFAULT '0' AFTER `file_hash`"); - - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_important` TINYINT(1) NOT NULL DEFAULT '0' AFTER `document_content_raw`"); - - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_important` TINYINT(1) NOT NULL DEFAULT '0' AFTER `asset_notes`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.1') { - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` ADD `scheduled_ticket_assigned_to` INT(11) NOT NULL DEFAULT '0' AFTER `scheduled_ticket_created_by`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.2') { - // Add DB support for multiple contacts under a vendor - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_vendor_id` INT(11) NOT NULL DEFAULT '0' AFTER `contact_location_id`"); - - // Add DB Support to Associate files to an asset example pictures, config backups etc - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_asset_id` INT(11) NOT NULL DEFAULT '0' AFTER `file_folder_id`"); - - // Add DB Support for missing Short Description fields - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_description` TEXT DEFAULT NULL AFTER `location_name`"); - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_description` TEXT DEFAULT NULL AFTER `software_name`"); - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_description` TEXT DEFAULT NULL AFTER `network_name`"); - mysqli_query($mysqli, "ALTER TABLE `certificates` ADD `certificate_description` TEXT DEFAULT NULL AFTER `certificate_name`"); - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_description` TEXT DEFAULT NULL AFTER `domain_name`"); - - // Add DB Support for Location for Events - mysqli_query($mysqli, "ALTER TABLE `events` ADD `event_location` TEXT DEFAULT NULL AFTER `event_title`"); - - // Add Event Attendees Table to allow multiple Attendees per event - mysqli_query($mysqli, "CREATE TABLE `event_attendees` ( - `attendee_id` INT(11) NOT NULL AUTO_INCREMENT, - `attendee_name` VARCHAR(200) DEFAULT NULL, - `attendee_email` VARCHAR(200) DEFAULT NULL, - `attendee_invitation_status` TINYINT(1) NOT NULL DEFAULT 0, - `attendee_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `attendee_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `attendee_archived_at` DATETIME DEFAULT NULL, - `attendee_contact_id` INT(11) NOT NULL DEFAULT 0, - `attendee_event_id` INT(11) NOT NULL, - PRIMARY KEY (`attendee_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.3') { - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_subnet` VARCHAR(200) DEFAULT NULL AFTER `network`"); - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_primary_dns` VARCHAR(200) DEFAULT NULL AFTER `network_gateway`"); - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_secondary_dns` VARCHAR(200) DEFAULT NULL AFTER `network_primary_dns`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.4') { - - // Add Project Templates - mysqli_query($mysqli, "CREATE TABLE `project_templates` ( - `project_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `project_template_name` VARCHAR(200) NOT NULL, - `project_template_description` TEXT DEFAULT NULL, - `project_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `project_template_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `project_template_archived_at` DATETIME DEFAULT NULL, - PRIMARY KEY (`project_template_id`) - )"); - - // Add Ticket Templates - mysqli_query($mysqli, "CREATE TABLE `ticket_templates` ( - `ticket_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `ticket_template_name` VARCHAR(200) NOT NULL, - `ticket_template_description` TEXT DEFAULT NULL, - `ticket_template_subject` VARCHAR(200) DEFAULT NULL, - `ticket_template_details` LONGTEXT DEFAULT NULL, - `ticket_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `ticket_template_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `ticket_template_archived_at` DATETIME DEFAULT NULL, - `ticket_template_project_template_id` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`ticket_template_id`) - )"); - - // Add Task Templates - mysqli_query($mysqli, "CREATE TABLE `task_templates` ( - `task_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `task_template_name` VARCHAR(200) NOT NULL, - `task_template_description` TEXT DEFAULT NULL, - `task_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `task_template_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `task_template_archived_at` DATETIME DEFAULT NULL, - `task_template_ticket_template_id` INT(11) NOT NULL, - PRIMARY KEY (`task_template_id`) - )"); - - mysqli_query($mysqli, "ALTER TABLE `projects` ADD `project_completed_at` DATETIME DEFAULT NULL AFTER `project_updated_at`"); - - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_project_id` INT(11) NOT NULL DEFAULT 0 AFTER `ticket_invoice_id`"); - - mysqli_query($mysqli, "ALTER TABLE `tasks` DROP `task_template`"); - mysqli_query($mysqli, "ALTER TABLE `tasks` DROP `task_finish_date`"); - mysqli_query($mysqli, "ALTER TABLE `tasks` DROP `task_project_id`"); - - mysqli_query($mysqli, "ALTER TABLE `projects` DROP `project_template`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.5') { - - // Add new ticket_statuses table - mysqli_query($mysqli, - "CREATE TABLE `ticket_statuses` ( - `ticket_status_id` INT(11) NOT NULL AUTO_INCREMENT, - `ticket_status_name` VARCHAR(200) NOT NULL, - `ticket_status_color` VARCHAR(200) NOT NULL, - `ticket_status_active` TINYINT(1) NOT NULL DEFAULT '1', - PRIMARY KEY (`ticket_status_id`) - )"); - - // Pre-seed default system/built-in ticket statuses - mysqli_query($mysqli, "INSERT INTO ticket_statuses SET ticket_status_name = 'New', ticket_status_color = 'danger'"); // Default ID for new tickets is 1 - mysqli_query($mysqli, "INSERT INTO ticket_statuses SET ticket_status_name = 'Open', ticket_status_color = 'primary'"); // 2 - mysqli_query($mysqli, "INSERT INTO ticket_statuses SET ticket_status_name = 'On Hold', ticket_status_color = 'success'"); // 3 - mysqli_query($mysqli, "INSERT INTO ticket_statuses SET ticket_status_name = 'Auto Close', ticket_status_color = 'dark'"); // 4 - mysqli_query($mysqli, "INSERT INTO ticket_statuses SET ticket_status_name = 'Closed', ticket_status_color = 'dark'"); // 5 - - // Update existing tickets to use new values - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 1 WHERE ticket_status = 'New'"); // New - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 2 WHERE ticket_status = 'Open'"); // Open - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 3 WHERE ticket_status = 'On Hold'"); // On Hold - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 4 WHERE ticket_status = 'Auto Close'"); // Auto Close - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 5 WHERE ticket_closed_at IS NOT NULL"); // Closed - - // Fix Bulk Ticket Closure not having a closed_at Time - mysqli_query($mysqli, "UPDATE tickets SET ticket_closed_at = NOW(), ticket_status = 5 WHERE ticket_status = 'Closed' AND ticket_closed_at IS NULL"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.6') { - - // Update existing tickets that did not use the defined statuses to Open - //mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 2 WHERE ticket_status NOT IN ('New', 'Open', 'On Hold', 'Auto Close') AND ticket_closed_at IS NULL"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.7') { - - mysqli_query($mysqli, "ALTER TABLE `projects` ADD `project_due` DATE DEFAULT NULL AFTER `project_description`"); - mysqli_query($mysqli, "ALTER TABLE `tasks` ADD `task_order` INT(11) NOT NULL DEFAULT 0 AFTER `task_status`"); - mysqli_query($mysqli, "ALTER TABLE `task_templates` ADD `task_template_order` INT(11) NOT NULL DEFAULT 0 AFTER `task_template_description`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.8') { - // Update Ticket Status color to use colors to allow more predefined colors - mysqli_query($mysqli, "UPDATE ticket_statuses SET ticket_status_color = '#dc3545' WHERE ticket_status_id = 1"); // New - mysqli_query($mysqli, "UPDATE ticket_statuses SET ticket_status_color = '#007bff' WHERE ticket_status_id = 2"); // Open - mysqli_query($mysqli, "UPDATE ticket_statuses SET ticket_status_color = '#28a745' WHERE ticket_status_id = 3"); // On Hold - mysqli_query($mysqli, "UPDATE ticket_statuses SET ticket_status_color = '#343a40' WHERE ticket_status_id = 4"); // Auto Close - mysqli_query($mysqli, "UPDATE ticket_statuses SET ticket_status_color = '#343a40' WHERE ticket_status_id = 5"); // Closed - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.1.9') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_login_remember_me_expire` INT(11) NOT NULL DEFAULT 3 AFTER `config_login_key_secret`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.0') { - mysqli_query($mysqli, "ALTER TABLE `ticket_templates` ADD `ticket_template_order` INT(11) NOT NULL DEFAULT 0 AFTER `ticket_template_details`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.1') { - - // Ticket Templates can have many project templates and Project Template can have have many ticket template, so instead create a many to many table relationship - mysqli_query($mysqli, "ALTER TABLE `ticket_templates` DROP `ticket_template_order`"); - mysqli_query($mysqli, "ALTER TABLE `ticket_templates` DROP `ticket_template_project_template_id`"); - - mysqli_query($mysqli, - "CREATE TABLE `project_template_ticket_templates` ( - `ticket_template_id` INT(11) NOT NULL, - `project_template_id` INT(11) NOT NULL, - `ticket_template_order` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`ticket_template_id`,`project_template_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.2') { - - mysqli_query($mysqli, "ALTER TABLE `tasks` DROP `task_description`"); - mysqli_query($mysqli, "ALTER TABLE `task_templates` DROP `task_template_description`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.3') { - - mysqli_query($mysqli, "ALTER TABLE `projects` ADD `project_manager` INT(11) NOT NULL DEFAULT 0 AFTER `project_due`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.4') { - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_project_prefix` VARCHAR(200) NOT NULL DEFAULT 'PRJ-' AFTER `config_default_hourly_rate`"); - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_project_next_number` INT(11) NOT NULL DEFAULT 1 AFTER `config_project_prefix`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.5') { - - mysqli_query($mysqli, "ALTER TABLE `projects` ADD `project_prefix` VARCHAR(200) DEFAULT NULL AFTER `project_id`"); - mysqli_query($mysqli, "ALTER TABLE `projects` ADD `project_number` INT(11) NOT NULL DEFAULT 1 AFTER `project_prefix`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.6') { - - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_dnshost` INT(11) NOT NULL DEFAULT 0 AFTER `domain_webhost`"); - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_mailhost` INT(11) NOT NULL DEFAULT 0 AFTER `domain_dnshost`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.7') { - - mysqli_query($mysqli, "ALTER TABLE `recurring` ADD `recurring_invoice_email_notify` TINYINT(1) NOT NULL DEFAULT 1 AFTER `recurring_note`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.8') { - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_phone_mask` TINYINT(1) NOT NULL DEFAULT 1 AFTER `config_destructive_deletes_enable`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.2.9') { - - mysqli_query($mysqli, "CREATE TABLE `user_permissions` (`user_id` int(11) NOT NULL,`client_id` int(11) NOT NULL, PRIMARY KEY (`user_id`,`client_id`))"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.0') { - - mysqli_query($mysqli, "CREATE TABLE `user_roles` ( - `user_role_id` INT(11) NOT NULL AUTO_INCREMENT, - `user_role_name` VARCHAR(200) NOT NULL, - `user_role_description` VARCHAR(200) NULL DEFAULT NULL, - `user_role_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `user_role_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `user_role_archived_at` DATETIME NULL, - PRIMARY KEY (`user_role_id`) - )"); - - mysqli_query($mysqli, "INSERT INTO `user_roles` SET user_role_id = 1, user_role_name = 'Accountant', user_role_description = 'Built-in - Limited access to financial-focused modules'"); - mysqli_query($mysqli, "INSERT INTO `user_roles` SET user_role_id = 2, user_role_name = 'Technician', user_role_description = 'Built-in - Limited access to technical-focused modules'"); - mysqli_query($mysqli, "INSERT INTO `user_roles` SET user_role_id = 3, user_role_name = 'Administrator', user_role_description = 'Built-in - Full administrative access to all modules (including user management)'"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.1') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_calendar_first_day` TINYINT(1) NOT NULL DEFAULT 0 AFTER `user_config_dashboard_technical_enable`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.2') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_default_billable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_ticket_new_ticket_notification_email`"); - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` ADD `scheduled_ticket_billable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `scheduled_ticket_frequency`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.3') { - // // Insert queries here required to update to DB version 1.3.3 - // // Then, update the database to the next sequential version - mysqli_query($mysqli, "CREATE TABLE `location_tags` (`location_id` int(11) NOT NULL,`tag_id` int(11) NOT NULL, PRIMARY KEY (`location_id`,`tag_id`))"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.4') { - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `client_tag_client_id` `client_id` INT(11) NOT NULL"); - mysqli_query($mysqli, "ALTER TABLE `client_tags` CHANGE `client_tag_tag_id` `tag_id` INT(11) NOT NULL"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.5') { - mysqli_query($mysqli, "CREATE TABLE `contact_tags` (`contact_id` int(11) NOT NULL,`tag_id` int(11) NOT NULL, PRIMARY KEY (`contact_id`,`tag_id`))"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.6') { - mysqli_query($mysqli, "ALTER TABLE `clients` ADD `client_abbreviation` VARCHAR(10) DEFAULT NULL AFTER `client_tax_id_number`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.7') { - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_ipv6` VARCHAR(200) DEFAULT NULL AFTER `asset_ip`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.3.8') { - mysqli_query($mysqli, "DROP TABLE `interfaces`"); - - mysqli_query($mysqli, "CREATE TABLE `asset_interfaces` ( - `interface_id` INT(11) NOT NULL AUTO_INCREMENT, - `interface_name` VARCHAR(200) NOT NULL, - `interface_mac` VARCHAR(200) DEFAULT NULL, - `interface_ip` VARCHAR(200) DEFAULT NULL, - `interface_nat_ip` VARCHAR(200) DEFAULT NULL, - `interface_ipv6` VARCHAR(200) DEFAULT NULL, - `interface_port` VARCHAR(200) DEFAULT NULL, - `interface_notes` TEXT DEFAULT NULL, - `interface_primary` TINYINT(1) DEFAULT 0, - `interface_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `interface_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `interface_archived_at` DATETIME NULL, - `interface_network_id` INT(11) DEFAULT NULL, - `interface_asset_id` INT(11) NOT NULL, - PRIMARY KEY (`interface_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.3.9'"); - - } - - if (CURRENT_DATABASE_VERSION == '1.3.9') { - // Migrate all Network Info from Assets to Interface Table and make it primary interface - $sql = mysqli_query($mysqli, "SELECT * FROM assets"); - while ($row = mysqli_fetch_assoc($sql)) { - $asset_id = intval($row['asset_id']); - $mac = escapeSql($row['asset_mac']); - $ip = escapeSql($row['asset_ip']); - $nat_ip = escapeSql($row['asset_nat_ip']); - $ipv6 = escapeSql($row['asset_ipv6']); - $network = intval($row['asset_network_id']); - - mysqli_query($mysqli, "INSERT INTO `asset_interfaces` SET interface_name = 'Primary', interface_mac = '$mac', interface_ip = '$ip', interface_nat_ip = '$nat_ip', interface_ipv6 = '$ipv6', interface_port = 'eth0', interface_primary = 1, interface_network_id = $network, interface_asset_id = $asset_id"); - } - - // Drop Fields from assets as they moved to asset_interfaces - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_ip`"); - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_ipv6`"); - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_nat_ip`"); - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_mac`"); - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_network_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.0'"); - - } - - if (CURRENT_DATABASE_VERSION == '1.4.0') { - - mysqli_query($mysqli, "CREATE TABLE `racks` ( - `rack_id` INT(11) NOT NULL AUTO_INCREMENT, - `rack_name` VARCHAR(200) NOT NULL, - `rack_description` TEXT DEFAULT NULL, - `rack_model` VARCHAR(200) DEFAULT NULL, - `rack_depth` VARCHAR(50) DEFAULT NULL, - `rack_type` VARCHAR(50) DEFAULT NULL, - `rack_units` INT(11) NOT NULL, - `rack_photo` VARCHAR(200) DEFAULT NULL, - `rack_physical_location` VARCHAR(200) DEFAULT NULL, - `rack_notes` TEXT DEFAULT NULL, - `rack_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `rack_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `rack_archived_at` DATETIME NULL, - `rack_location_id` INT(11) DEFAULT NULL, - `rack_client_id` INT(11) NOT NULL, - PRIMARY KEY (`rack_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `rack_units` ( - `unit_id` INT(11) NOT NULL AUTO_INCREMENT, - `unit_start_number` INT(11) NOT NULL, - `unit_end_number` INT(11) NOT NULL, - `unit_device` VARCHAR(200) DEFAULT NULL, - `unit_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `unit_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `unit_archived_at` DATETIME NULL, - `unit_asset_id` INT(11) DEFAULT NULL, - `unit_rack_id` INT(11) NOT NULL, - PRIMARY KEY (`unit_id`), - FOREIGN KEY (`unit_rack_id`) REFERENCES `racks`(`rack_id`) ON DELETE CASCADE - )"); - - mysqli_query($mysqli, "CREATE TABLE `patch_panels` ( - `patch_panel_id` INT(11) NOT NULL AUTO_INCREMENT, - `patch_panel_name` VARCHAR(200) NOT NULL, - `patch_panel_description` TEXT DEFAULT NULL, - `patch_panel_type` VARCHAR(200) DEFAULT NULL, - `patch_panel_ports` INT(11) NOT NULL, - `patch_panel_physical_location` VARCHAR(200) DEFAULT NULL, - `patch_panel_notes` TEXT DEFAULT NULL, - `patch_panel_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `patch_panel_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `patch_panel_archived_at` DATETIME NULL, - `patch_panel_location_id` INT(11) DEFAULT NULL, - `patch_panel_rack_id` INT(11) DEFAULT NULL, - `patch_panel_client_id` INT(11) NOT NULL, - PRIMARY KEY (`patch_panel_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `patch_panel_ports` ( - `port_id` INT(11) NOT NULL AUTO_INCREMENT, - `port_number` INT(11) NOT NULL, - `port_name` VARCHAR(200) DEFAULT NULL, - `port_description` TEXT DEFAULT NULL, - `port_type` VARCHAR(200) DEFAULT NULL, - `port_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `port_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `port_archived_at` DATETIME NULL, - `port_asset_id` INT(11) DEFAULT NULL, - `port_patch_panel_id` INT(11) NOT NULL, - PRIMARY KEY (`port_id`), - FOREIGN KEY (`port_patch_panel_id`) REFERENCES `patch_panels`(`patch_panel_id`) ON DELETE CASCADE - )"); - - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_photo` VARCHAR(200) DEFAULT NULL AFTER `asset_install_date`"); - - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_physical_location` VARCHAR(200) DEFAULT NULL AFTER `asset_photo`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.1') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_log_retention` INT(11) NOT NULL DEFAULT '90' AFTER `config_login_remember_me_expire`;"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_log_retention` = '2555' WHERE company_id = 1;"); // Set to 7 years for existing installs - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.2') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_email_parse_unknown_senders` INT(1) NOT NULL DEFAULT '0' AFTER `config_ticket_email_parse`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.3') { - - // Add ticket URL key column - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_url_key` VARCHAR(200) DEFAULT NULL AFTER `ticket_feedback`"); - // Populate pre-existing columns for open tickets - $sql_tickets_1 = mysqli_query($mysqli, "SELECT ticket_id FROM tickets WHERE tickets.ticket_closed_at IS NULL"); - foreach ($sql_tickets_1 as $row) { - $ticket_id = intval($row['ticket_id']); - $url_key = randomString(156); - mysqli_query($mysqli, "UPDATE tickets SET ticket_url_key = '$url_key' WHERE ticket_id = '$ticket_id'"); - } - - // Add ticket resolved at column - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_resolved_at` DATETIME DEFAULT NULL AFTER `ticket_updated_at`"); - // Populate pre-existing columns for closed tickets - $sql_tickets_2 = mysqli_query($mysqli, "SELECT ticket_id, ticket_updated_at, ticket_closed_at FROM tickets WHERE tickets.ticket_closed_at IS NOT NULL"); - foreach ($sql_tickets_2 as $row) { - $ticket_id = intval($row['ticket_id']); - $ticket_updated_at = escapeSql($row['ticket_updated_at']); // To keep old updated_at time - $ticket_closed_at = escapeSql($row['ticket_closed_at']); - mysqli_query($mysqli, "UPDATE tickets SET ticket_resolved_at = '$ticket_closed_at', ticket_updated_at = '$ticket_updated_at' WHERE ticket_id = '$ticket_id'"); - } - - // Change ticket status 'Auto close' to 'Resolved' - mysqli_query($mysqli, "UPDATE `ticket_statuses` SET `ticket_status_name` = 'Resolved' WHERE `ticket_statuses`.`ticket_status_id` = 4"); - - // Auto-close is no longer optional - mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_ticket_autoclose`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_ticket_autoclose_hours` = '72'"); - - // DB Version - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.4'"); - - } - - if (CURRENT_DATABASE_VERSION == '1.4.4') { - mysqli_query($mysqli, "ALTER TABLE `api_keys` ADD `api_key_decrypt_hash` VARCHAR(200) NOT NULL AFTER `api_key_secret`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.5') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_whitelabel_enabled` INT(11) NOT NULL DEFAULT '0' AFTER `config_phone_mask`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_whitelabel_key` TEXT NULL DEFAULT NULL AFTER `config_whitelabel_enabled`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.6') { - mysqli_query($mysqli, "CREATE TABLE `custom_links` ( - `custom_link_id` INT(11) NOT NULL AUTO_INCREMENT, - `custom_link_name` VARCHAR(200) NOT NULL, - `custom_link_description` TEXT DEFAULT NULL, - `custom_link_uri` VARCHAR(500) NOT NULL, - `custom_link_icon` VARCHAR(200) DEFAULT NULL, - `custom_link_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `custom_link_updated_at` DATETIME ON UPDATE CURRENT_TIMESTAMP NULL, - `custom_link_archived_at` DATETIME NULL, - PRIMARY KEY (`custom_link_id`) - )"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.7') { - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_client_visible` INT(11) NOT NULL DEFAULT '1' AFTER `document_parent`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.8') { - mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_stripe_client_pays_fees`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.4.9') { - - // Add new "is admin" identifier on user roles - mysqli_query($mysqli, "ALTER TABLE `user_roles` ADD `user_role_is_admin` INT(11) NOT NULL DEFAULT '0' AFTER `user_role_description`"); - mysqli_query($mysqli, "UPDATE `user_roles` SET `user_role_is_admin` = '1' WHERE `user_role_id` = 3"); - - // Add modules - mysqli_query($mysqli, "CREATE TABLE `modules` ( - `module_id` INT(11) NOT NULL AUTO_INCREMENT, - `module_name` VARCHAR(200) NOT NULL, - `module_description` VARCHAR(200) NULL, - PRIMARY KEY (`module_id`) - )"); - - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_client', module_description = 'General client & contact management'"); - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_support', module_description = 'Access to ticketing, assets and documentation'"); - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_credential', module_description = 'Access to client credentials - usernames, passwords and 2FA codes'"); - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_sales', module_description = 'Access to quotes, invoices and products'"); - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_financial', module_description = 'Access to payments, accounts, expenses and budgets'"); - mysqli_query($mysqli, "INSERT INTO modules SET module_name = 'module_reporting', module_description = 'Access to all reports'"); - - // Add table for storing role<->module permissions - mysqli_query($mysqli, "CREATE TABLE `user_role_permissions` ( - `user_role_id` INT(11) NOT NULL, - `module_id` INT(11) NOT NULL, - `user_role_permission_level` INT(11) NOT NULL - )"); - - // Add default permissions for accountant role - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 1, module_id = 1, user_role_permission_level = 1"); // Read clients - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 1, module_id = 2, user_role_permission_level = 1"); // Read support - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 1, module_id = 4, user_role_permission_level = 1"); // Read sales - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 1, module_id = 5, user_role_permission_level = 2"); // Modify financial - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 1, module_id = 6, user_role_permission_level = 1"); // Read reports - - // Add default permissions for tech role - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 2, module_id = 1, user_role_permission_level = 2"); // Modify clients - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 2, module_id = 2, user_role_permission_level = 2"); // Modify support - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 2, module_id = 3, user_role_permission_level = 2"); // Modify credentials - mysqli_query($mysqli, "INSERT INTO user_role_permissions SET user_role_id = 2, module_id = 4, user_role_permission_level = 2"); // Modify sales - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.0') { - - mysqli_query($mysqli, "DROP TABLE `account_types`"); - - mysqli_query($mysqli, "ALTER TABLE `accounts` ADD `account_description` VARCHAR(250) DEFAULT NULL AFTER `account_name`"); - - mysqli_query($mysqli, "ALTER TABLE `user_roles` MODIFY `user_role_is_admin` TINYINT(1) NOT NULL DEFAULT '0'"); - - mysqli_query($mysqli, "ALTER TABLE `shared_items` ADD `item_recipient` VARCHAR(250) DEFAULT NULL AFTER `item_note`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.1') { - - mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_location` INT(11) NOT NULL DEFAULT 1 AFTER `custom_link_icon`"); - mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_new_tab` TINYINT(1) NOT NULL DEFAULT 0 AFTER `custom_link_uri`"); - mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_order` INT(11) NOT NULL DEFAULT 0 AFTER `custom_link_location`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.2') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_invoice_paid_notification_email` VARCHAR(200) DEFAULT NULL AFTER `config_invoice_late_fee_percent`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.3') { - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_type` TINYINT(1) NOT NULL DEFAULT 1 AFTER `user_password`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.4') { - mysqli_query($mysqli, "ALTER TABLE `user_roles` ADD `user_role_type` TINYINT(1) NOT NULL DEFAULT 1 AFTER `user_role_description`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.5') { - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_user_id` INT(11) NOT NULL DEFAULT 0 AFTER `contact_vendor_id`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.6') { - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_auth_method` VARCHAR(200) NOT NULL DEFAULT 'local' AFTER `user_password`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.7') { - // Create Users for contacts that have logins enabled and that are not archived - $contacts_sql = mysqli_query($mysqli, "SELECT * FROM `contacts` WHERE contact_archived_at IS NULL AND (contact_auth_method = 'local' OR contact_auth_method = 'azure')"); - while($row = mysqli_fetch_assoc($contacts_sql)) { - $contact_id = intval($row['contact_id']); - $contact_name = mysqli_real_escape_string($mysqli, $row['contact_name']); - $contact_email = mysqli_real_escape_string($mysqli, $row['contact_email']); - $contact_password_hash = mysqli_real_escape_string($mysqli, $row['contact_password_hash']); - $contact_auth_method = mysqli_real_escape_string($mysqli, $row['contact_auth_method']); - - mysqli_query($mysqli, "INSERT INTO users SET user_name = '$contact_name', user_email = '$contact_email', user_password = '$contact_password_hash', user_auth_method = '$contact_auth_method', user_type = 2"); - - $user_id = mysqli_insert_id($mysqli); - - mysqli_query($mysqli, "UPDATE `contacts` SET `contact_user_id` = $user_id WHERE contact_id = $contact_id"); - } - - // Drop Login Related fields from contacts tables as everyone who has a login has been moved over - mysqli_query($mysqli, "ALTER TABLE `contacts` DROP `contact_auth_method`, DROP `contact_password_hash`, DROP `contact_password_reset_token`, DROP `contact_token_expire`"); - - // Add Password Reset Tokens to users tables - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_password_reset_token` VARCHAR(200) NULL DEFAULT NULL AFTER `user_token`"); - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_password_reset_token_expire` DATETIME NULL DEFAULT NULL AFTER `user_password_reset_token`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.8') { - // Add task completetion estimate time to tasks and task templates - mysqli_query($mysqli, "ALTER TABLE `tasks` ADD `task_completion_estimate` INT(11) NOT NULL DEFAULT 0 AFTER `task_order`"); - mysqli_query($mysqli, "ALTER TABLE `task_templates` ADD `task_template_completion_estimate` INT(11) NOT NULL DEFAULT 0 AFTER `task_template_order`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.5.9') { - - // Check if the column already exists - $result = mysqli_query($mysqli, "SHOW COLUMNS FROM `logins` LIKE 'login_folder_id'"); - if (mysqli_num_rows($result) == 0) { - mysqli_query($mysqli, "ALTER TABLE `logins` ADD `login_folder_id` INT(11) NOT NULL DEFAULT 0 AFTER `login_password_changed_at`"); - } else { - // The column already exists - echo "Column 'login_folder_id' already exists in the 'logins' table."; - } - - mysqli_query($mysqli, "ALTER TABLE `logins` MODIFY `login_username` VARCHAR(500) DEFAULT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `logins` MODIFY `login_description` VARCHAR(500) DEFAULT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `tickets` MODIFY `ticket_subject` VARCHAR(500) NOT NULL"); - - // Fix some some staggering ticket statuses that were still using a string and not a number - // forum.itflow.org/d/1248-bug-unable-to-update-database - // Update existing tickets to use new values - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 1 WHERE ticket_status = 'New'"); // New - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 2 WHERE ticket_status = 'Open'"); // Open - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 3 WHERE ticket_status = 'On Hold'"); // On Hold - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 4 WHERE ticket_status = 'Auto Close'"); // Auto Close - mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 5 WHERE ticket_status = 'Closed'"); // Closed - - mysqli_query($mysqli, "ALTER TABLE `tickets` MODIFY `ticket_status` INT(11) NOT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `ticket_templates` MODIFY `ticket_template_subject` VARCHAR(500) DEFAULT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `scheduled_tickets` MODIFY `scheduled_ticket_subject` VARCHAR(500) NOT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `logs` MODIFY `log_description` VARCHAR(1000) NOT NULL"); - - mysqli_query($mysqli, "ALTER TABLE `notifications` MODIFY `notification` VARCHAR(1000) NOT NULL"); - - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.0') { - - mysqli_query($mysqli, "CREATE TABLE `asset_history` ( - `asset_history_id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_history_status` VARCHAR(200) NOT NULL, - `asset_history_description` VARCHAR(255) NOT NULL, - `asset_history_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `asset_history_asset_id` INT(11) NOT NULL, - PRIMARY KEY (`asset_history_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.1') { - - mysqli_query($mysqli, "CREATE TABLE `login_tags` (`login_id` int(11) NOT NULL,`tag_id` int(11) NOT NULL, PRIMARY KEY (`login_id`,`tag_id`))"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.2') { - - mysqli_query($mysqli, "ALTER TABLE `files` MODIFY `file_description` VARCHAR(250) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `files` MODIFY `file_ext` VARCHAR(10) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_created_by` INT(11) NOT NULL DEFAULT 0 AFTER `file_accessed_at`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_size` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `file_ext`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_mime_type` VARCHAR(100) DEFAULT NULL AFTER `file_hash`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.3') { - - // Find Files and update the Mime Type and File Size - - function scanDirectory($dir, $mysqli) { - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS), - RecursiveIteratorIterator::SELF_FIRST - ); - - foreach ($iterator as $file) { - if ($file->isFile()) { - $file_path = $file->getPathname(); - $file_name = $file->getFilename(); - // Process the file - processFile($file_path, $file_name, $mysqli); - } - } - } - - function processFile($file_path, $file_name, $mysqli) { - // Get the file size - $file_size = filesize($file_path); - // Get the MIME type - $file_mime_type = mime_content_type($file_path); - - // Prepare a statement to check if the file exists in the database - $stmt_select = mysqli_prepare($mysqli, "SELECT file_id FROM files WHERE file_reference_name = ?"); - mysqli_stmt_bind_param($stmt_select, 's', $file_name); - mysqli_stmt_execute($stmt_select); - mysqli_stmt_store_result($stmt_select); - - if (mysqli_stmt_num_rows($stmt_select) > 0) { - // File exists in the database, proceed to update - $stmt_update = mysqli_prepare($mysqli, "UPDATE files SET file_mime_type = ?, file_size = ? WHERE file_reference_name = ?"); - mysqli_stmt_bind_param($stmt_update, 'sis', $file_mime_type, $file_size, $file_name); - - if (mysqli_stmt_execute($stmt_update)) { - echo "Updated: $file_name\n"; - } else { - echo "Error updating $file_name: " . mysqli_stmt_error($stmt_update) . "\n"; - } - mysqli_stmt_close($stmt_update); - } else { - echo "No database entry found for: $file_name\n"; - } - mysqli_stmt_close($stmt_select); - } - - // Define the uploads directory (modify the path if necessary) - $uploads_dir = __DIR__ . '/uploads'; - - // Start scanning from the uploads directory - scanDirectory($uploads_dir, $mysqli); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.4') { - - mysqli_query($mysqli, "CREATE TABLE `ticket_history` ( - `ticket_history_id` INT(11) NOT NULL AUTO_INCREMENT, - `ticket_history_status` VARCHAR(200) NOT NULL, - `ticket_history_description` VARCHAR(255) NOT NULL, - `ticket_history_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `ticket_history_ticket_id` INT(11) NOT NULL, - PRIMARY KEY (`ticket_history_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.5') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_quote_notification_email` VARCHAR(200) DEFAULT NULL AFTER `config_quote_from_email`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.6') { - - mysqli_query($mysqli, "CREATE TABLE `contact_notes` ( - `contact_note_id` INT(11) NOT NULL AUTO_INCREMENT, - `contact_note_type` VARCHAR(200) NOT NULL, - `contact_note` TEXT NULL DEFAULT NULL, - `contact_note_created_by` INT(11) NOT NULL, - `contact_note_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - `contact_note_updated_at` DATETIME NULL DEFAULT NULL on update CURRENT_TIMESTAMP, - `contact_note_archived_at` DATETIME NULL DEFAULT NULL, - `contact_note_contact_id` INT(11) NOT NULL, - PRIMARY KEY (`contact_note_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `client_notes` ( - `client_note_id` INT(11) NOT NULL AUTO_INCREMENT, - `client_note_type` VARCHAR(200) NOT NULL, - `client_note` TEXT NULL DEFAULT NULL, - `client_note_created_by` INT(11) NOT NULL, - `client_note_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - `client_note_updated_at` DATETIME NULL DEFAULT NULL on update CURRENT_TIMESTAMP, - `client_note_archived_at` DATETIME NULL DEFAULT NULL, - `client_note_client_id` INT(11) NOT NULL, - PRIMARY KEY (`client_note_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `asset_notes` ( - `asset_note_id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_note_type` VARCHAR(200) NOT NULL, - `asset_note` TEXT NULL DEFAULT NULL, - `asset_note_created_by` INT(11) NOT NULL, - `asset_note_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - `asset_note_updated_at` DATETIME NULL DEFAULT NULL on update CURRENT_TIMESTAMP, - `asset_note_archived_at` DATETIME NULL DEFAULT NULL, - `asset_note_asset_id` INT(11) NOT NULL, - PRIMARY KEY (`asset_note_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.7') { - - mysqli_query($mysqli, "CREATE TABLE `error_logs` ( - `error_log_id` INT(11) NOT NULL AUTO_INCREMENT, - `error_log_type` VARCHAR(200) NOT NULL, - `error_log_details` VARCHAR(1000) NULL DEFAULT NULL, - `error_log_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`error_log_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `auth_logs` ( - `auth_log_id` INT(11) NOT NULL AUTO_INCREMENT, - `auth_log_status` TINYINT(1) NOT NULL, - `auth_log_details` VARCHAR(200) NULL DEFAULT NULL, - `auth_log_ip` VARCHAR(200) NULL DEFAULT NULL, - `auth_log_user_agent` VARCHAR(250) NULL DEFAULT NULL, - `auth_log_user_id` INT(11) NOT NULL DEFAULT 0, - `auth_log_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`auth_log_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.8') { - - // Create New Vendor Templates Table this eventual be used to seperate templates out of the vendors table - mysqli_query($mysqli, "CREATE TABLE `vendor_templates` (`vendor_template_id` int(11) AUTO_INCREMENT PRIMARY KEY, - `vendor_template_name` varchar(200) NOT NULL, - `vendor_template_description` varchar(200) NULL DEFAULT NULL, - `vendor_template_phone` varchar(200) NULL DEFAULT NULL, - `vendor_template_email` varchar(200) NULL DEFAULT NULL, - `vendor_template_website` varchar(200) NULL DEFAULT NULL, - `vendor_template_hours` varchar(200) NULL DEFAULT NULL, - `vendor_template_created_at` datetime DEFAULT CURRENT_TIMESTAMP, - `vendor_template_updated_at` datetime NULL ON UPDATE CURRENT_TIMESTAMP, - `vendor_template_archived_at` datetime NULL DEFAULT NULL - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.6.9') { - - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_has_thumbnail` TINYINT(1) NOT NULL DEFAULT 0 AFTER `file_mime_type`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_has_preview` TINYINT(1) NOT NULL DEFAULT 0 AFTER `file_has_thumbnail`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.0') { - - mysqli_query($mysqli, "DROP TABLE `vendor_templates`"); - - mysqli_query($mysqli, "CREATE TABLE `vendor_contacts` ( - `vendor_contact_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - `vendor_contact_name` VARCHAR(200) NOT NULL, - `vendor_contact_title` VARCHAR(200) DEFAULT NULL, - `vendor_contact_department` VARCHAR(200) DEFAULT NULL, - `vendor_contact_email` VARCHAR(200) DEFAULT NULL, - `vendor_contact_phone` VARCHAR(200) DEFAULT NULL, - `vendor_contact_extension` VARCHAR(200) DEFAULT NULL, - `vendor_contact_mobile` VARCHAR(200) DEFAULT NULL, - `vendor_contact_notes` TEXT DEFAULT NULL, - `vendor_contact_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `vendor_contact_updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(), - `vendor_contact_archived_at` DATETIME DEFAULT NULL, - `vendor_contact_vendor_id` INT(11) NOT NULL DEFAULT 0 - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.1') { - - mysqli_query($mysqli, "DROP TABLE `error_logs`"); - - mysqli_query($mysqli, "CREATE TABLE `app_logs` ( - `app_log_id` INT(11) NOT NULL AUTO_INCREMENT, - `app_log_category` VARCHAR(200) NULL DEFAULT NULL, - `app_log_type` ENUM('info', 'warning', 'error', 'debug') NOT NULL DEFAULT 'info', - `app_log_details` VARCHAR(1000) NULL DEFAULT NULL, - `app_log_created_at` DATETIME NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`app_log_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.2') { - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_fax` VARCHAR(200) DEFAULT NULL AFTER `location_phone`"); - - mysqli_query($mysqli, "DROP TABLE `vendor_contacts`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.3') { - - // Add Recurring Payments - mysqli_query($mysqli, "CREATE TABLE `recurring_payments` ( - `recurring_payment_id` INT(11) NOT NULL AUTO_INCREMENT, - `recurring_payment_amount` DECIMAL(15,2) NOT NULL, - `recurring_payment_currency_code` VARCHAR(10) NOT NULL, - `recurring_payment_method` VARCHAR(200) NOT NULL, - `recurring_payment_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `recurring_payment_updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `recurring_payment_archived_at` DATETIME DEFAULT NULL, - `recurring_payment_account_id` INT(11) NOT NULL, - `recurring_payment_recurring_expense_id` INT(11) NOT NULL DEFAULT 0, - `recurring_payment_recurring_invoice_id` INT(11) NOT NULL, - PRIMARY KEY (`recurring_payment_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.4') { - - // Remove Recurring Payment Amount as it will use the Recurring Invoice Amount and is unessessary - mysqli_query($mysqli, "ALTER TABLE `recurring_payments` DROP `recurring_payment_amount`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.5') { - mysqli_query($mysqli, "CREATE TABLE `client_stripe` (`client_id` INT(11) NOT NULL, `stripe_id` VARCHAR(255) NOT NULL, `stripe_pm` varchar(255) NULL) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.6') { - // Create a field to show connected interface of a foreign asset - mysqli_query($mysqli, "ALTER TABLE `asset_interfaces` ADD `interface_connected_asset_interface` INT(11) NOT NULL DEFAULT 0 AFTER `interface_network_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.7') { - // Domain history - mysqli_query($mysqli, "CREATE TABLE `domain_history` (`domain_history_id` INT(11) NOT NULL AUTO_INCREMENT , `domain_history_column` VARCHAR(200) NOT NULL , `domain_history_old_value` TEXT NOT NULL , `domain_history_new_value` TEXT NOT NULL , `domain_history_domain_id` INT(11) NOT NULL , `domain_history_modified_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`domain_history_id`)) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.8') { - - // Use a seperate table for Interface connections / links. This will make it easier to manage. - $createInterfaceLinksTable = " - CREATE TABLE IF NOT EXISTS `asset_interface_links` ( - `interface_link_id` INT AUTO_INCREMENT PRIMARY KEY, - `interface_a_id` INT NOT NULL, - `interface_b_id` INT NOT NULL, - `interface_link_type` VARCHAR(100) NULL, - `interface_link_status` VARCHAR(50) NULL, - `interface_link_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `interface_link_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - - CONSTRAINT `fk_interface_a` - FOREIGN KEY (`interface_a_id`) - REFERENCES `asset_interfaces` (`interface_id`) - ON DELETE CASCADE - ON UPDATE CASCADE, - - CONSTRAINT `fk_interface_b` - FOREIGN KEY (`interface_b_id`) - REFERENCES `asset_interfaces` (`interface_id`) - ON DELETE CASCADE - ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - "; - mysqli_query($mysqli, $createInterfaceLinksTable) or die(mysqli_error($mysqli)); - - // Drop the old column from asset_interfaces if it exists - $dropConnectedColumn = " - ALTER TABLE `asset_interfaces` - DROP COLUMN IF EXISTS `interface_connected_asset_interface` - "; - mysqli_query($mysqli, $dropConnectedColumn) or die(mysqli_error($mysqli)); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.7.9') { - - mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_cron_key`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.0') { - - mysqli_query($mysqli, "ALTER TABLE `ticket_statuses` ADD `ticket_status_order` int(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_order` int(11) NOT NULL DEFAULT 0"); - - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_default_view` tinyint(1) NOT NULL DEFAULT 0"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_ordering` tinyint(1) NOT NULL DEFAULT 0"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_moving_columns` tinyint(1) NOT NULL DEFAULT 1"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.1') { - mysqli_query($mysqli, "ALTER TABLE `asset_interfaces` CHANGE `interface_port` `interface_description` VARCHAR(200) DEFAULT NULL AFTER `interface_name`"); - - mysqli_query($mysqli, "ALTER TABLE `asset_interfaces` ADD `interface_type` VARCHAR(50) DEFAULT NULL AFTER `interface_description`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.2') { - mysqli_query($mysqli, "CREATE TABLE `quote_files` ( - `quote_id` INT(11) NOT NULL, - `file_id` INT(11) NOT NULL, - PRIMARY KEY (`quote_id`, `file_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.3') { - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_purchase_reference` VARCHAR(200) DEFAULT NULL AFTER `asset_status`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.4') { - mysqli_query($mysqli, "ALTER TABLE `logins` DROP `login_software_id`"); - mysqli_query($mysqli, "ALTER TABLE `logins` DROP `login_vendor_id`"); - mysqli_query($mysqli, "ALTER TABLE `software` DROP `software_login_id`"); - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_vendor_id` INT(11) DEFAULT 0 AFTER `software_accessed_at`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.5') { - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_purchase_reference` VARCHAR(200) DEFAULT NULL AFTER `software_seats`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.6') { - mysqli_query($mysqli, " - CREATE TABLE `certificate_history` (`certificate_history_id` INT(11) NOT NULL AUTO_INCREMENT, - `certificate_history_column` VARCHAR(200) NOT NULL, - `certificate_history_old_value` TEXT NOT NULL, - `certificate_history_new_value` TEXT NOT NULL, - `certificate_history_certificate_id` INT(11) NOT NULL, - `certificate_history_modified_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`certificate_history_id`)) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.7') { - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_first_response_at` DATETIME NULL DEFAULT NULL AFTER `ticket_archived_at`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.8') { - mysqli_query($mysqli, "ALTER TABLE `invoices` ADD `invoice_recurring_invoice_id` INT(11) NOT NULL DEFAULT 0 AFTER `invoice_category_id`"); - mysqli_query($mysqli, "ALTER TABLE `invoice_items` ADD `item_product_id` INT(11) NOT NULL DEFAULT 0 AFTER `item_tax_id`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.8.9') { - mysqli_query($mysqli, "ALTER TABLE `users` ADD `user_role_id` INT(11) DEFAULT 0 AFTER `user_archived_at`"); - - // Copy user role from user settings table to the users table - mysqli_query($mysqli," - UPDATE `users` - JOIN `user_settings` ON users.user_id = user_settings.user_id - SET users.user_role_id = user_settings.user_role - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.0'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.0') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` DROP `user_role`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.1'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.1') { - - mysqli_query($mysqli, - "ALTER TABLE `user_roles` - CHANGE COLUMN `user_role_id` `role_id` INT(11) NOT NULL AUTO_INCREMENT, - CHANGE COLUMN `user_role_name` `role_name` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `user_role_description` `role_description` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `user_role_type` `role_type` TINYINT(1) NOT NULL DEFAULT 1, - CHANGE COLUMN `user_role_is_admin` `role_is_admin` TINYINT(1) NOT NULL DEFAULT 0, - CHANGE COLUMN `user_role_created_at` `role_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - CHANGE COLUMN `user_role_updated_at` `role_updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(), - CHANGE COLUMN `user_role_archived_at` `role_archived_at` DATETIME NULL DEFAULT NULL - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.2'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.2') { - - mysqli_query($mysqli, "RENAME TABLE `user_permissions` TO `user_client_permissions`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.3'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.3') { - - // Now create the table with foreign keys - mysqli_query($mysqli, " - CREATE TABLE `ticket_assets` ( - `ticket_id` INT(11) NOT NULL, - `asset_id` INT(11) NOT NULL, - PRIMARY KEY (`ticket_id`, `asset_id`), - FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE, - FOREIGN KEY (`ticket_id`) REFERENCES `tickets`(`ticket_id`) ON DELETE CASCADE - ) - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.4'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.4') { - mysqli_query($mysqli, "RENAME TABLE `scheduled_tickets` TO `recurring_tickets`"); - - mysqli_query($mysqli, - "ALTER TABLE `recurring_tickets` - CHANGE COLUMN `scheduled_ticket_id` `recurring_ticket_id` INT(11) NOT NULL AUTO_INCREMENT, - CHANGE COLUMN `scheduled_ticket_category` `recurring_ticket_category` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `scheduled_ticket_subject` `recurring_ticket_subject` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `scheduled_ticket_details` `recurring_ticket_details` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `scheduled_ticket_priority` `recurring_ticket_priority` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `scheduled_ticket_frequency` `recurring_ticket_frequency` VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `scheduled_ticket_billable` `recurring_ticket_billable` TINYINT(1) NOT NULL DEFAULT 0, - CHANGE COLUMN `scheduled_ticket_start_date` `recurring_ticket_start_date` DATE NOT NULL, - CHANGE COLUMN `scheduled_ticket_next_run` `recurring_ticket_next_run` DATE NOT NULL, - CHANGE COLUMN `scheduled_ticket_created_at` `recurring_ticket_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - CHANGE COLUMN `scheduled_ticket_updated_at` `recurring_ticket_updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(), - CHANGE COLUMN `scheduled_ticket_created_by` `recurring_ticket_created_by` INT(11) NOT NULL DEFAULT 0, - CHANGE COLUMN `scheduled_ticket_assigned_to` `recurring_ticket_assigned_to` INT(11) NOT NULL DEFAULT 0, - CHANGE COLUMN `scheduled_ticket_client_id` `recurring_ticket_client_id` INT(11) NOT NULL DEFAULT 0, - CHANGE COLUMN `scheduled_ticket_contact_id` `recurring_ticket_contact_id` INT(11) NOT NULL DEFAULT 0, - CHANGE COLUMN `scheduled_ticket_asset_id` `recurring_ticket_asset_id` INT(11) NOT NULL DEFAULT 0 - " - ); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.5'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.5') { - - // create the table with foreign keys - mysqli_query($mysqli, " - CREATE TABLE `recurring_ticket_assets` ( - `recurring_ticket_id` INT(11) NOT NULL, - `asset_id` INT(11) NOT NULL, - PRIMARY KEY (`recurring_ticket_id`, `asset_id`), - FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE, - FOREIGN KEY (`recurring_ticket_id`) REFERENCES `recurring_tickets`(`recurring_ticket_id`) ON DELETE CASCADE - ) - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.6'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.6') { - mysqli_query($mysqli, "RENAME TABLE `recurring` TO `recurring_invoices`"); - - mysqli_query($mysqli, " - ALTER TABLE `recurring_invoices` - CHANGE COLUMN `recurring_id` `recurring_invoice_id` INT(11) NOT NULL AUTO_INCREMENT, - CHANGE COLUMN `recurring_prefix` `recurring_invoice_prefix` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `recurring_number` `recurring_invoice_number` INT(11) NOT NULL, - CHANGE COLUMN `recurring_scope` `recurring_invoice_scope` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `recurring_frequency` `recurring_invoice_frequency` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `recurring_last_sent` `recurring_invoice_last_sent` DATE NULL DEFAULT NULL, - CHANGE COLUMN `recurring_next_date` `recurring_invoice_next_date` DATE NOT NULL, - CHANGE COLUMN `recurring_status` `recurring_invoice_status` INT(1) NOT NULL, - CHANGE COLUMN `recurring_discount_amount` `recurring_invoice_discount_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00, - CHANGE COLUMN `recurring_amount` `recurring_invoice_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00, - CHANGE COLUMN `recurring_currency_code` `recurring_invoice_currency_code` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `recurring_note` `recurring_invoice_note` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `recurring_created_at` `recurring_invoice_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - CHANGE COLUMN `recurring_updated_at` `recurring_invoice_updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(), - CHANGE COLUMN `recurring_archived_at` `recurring_invoice_archived_at` DATETIME NULL DEFAULT NULL, - CHANGE COLUMN `recurring_category_id` `recurring_invoice_category_id` INT(11) NOT NULL, - CHANGE COLUMN `recurring_client_id` `recurring_invoice_client_id` INT(11) NOT NULL - "); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.7'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.7') { - - mysqli_query($mysqli, " - ALTER TABLE `settings` - CHANGE COLUMN `config_recurring_prefix` `config_recurring_invoice_prefix` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `config_recurring_next_number` `config_recurring_invoice_next_number` INT(11) NOT NULL DEFAULT 1 - "); - - mysqli_query($mysqli, " - ALTER TABLE `history` - CHANGE COLUMN `history_recurring_id` `history_recurring_invoice_id` INT(11) NOT NULL DEFAULT 0 - "); - - mysqli_query($mysqli, " - ALTER TABLE `invoice_items` - CHANGE COLUMN `item_recurring_id` `item_recurring_invoice_id` INT(11) NOT NULL DEFAULT 0 - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.8'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.8') { - // Reference a Recurring Ticket that generated ticket - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_recurring_ticket_id` INT(11) DEFAULT 0 AFTER `ticket_project_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.9'"); - } - - if (CURRENT_DATABASE_VERSION == '1.9.9') { - mysqli_query($mysqli, "RENAME TABLE `logins` TO `credentials`"); - mysqli_query($mysqli, " - ALTER TABLE `credentials` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL AUTO_INCREMENT, - CHANGE COLUMN `login_name` `credential_name` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - CHANGE COLUMN `login_description` `credential_description` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_category` `credential_category` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_uri` `credential_uri` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_uri_2` `credential_uri_2` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_username` `credential_username` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_password` `credential_password` VARBINARY(200) NULL DEFAULT NULL, - CHANGE COLUMN `login_otp_secret` `credential_otp_secret` VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_note` `credential_note` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - CHANGE COLUMN `login_important` `credential_important` TINYINT(1) NOT NULL DEFAULT '0', - CHANGE COLUMN `login_created_at` `credential_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - CHANGE COLUMN `login_updated_at` `credential_updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(), - CHANGE COLUMN `login_archived_at` `credential_archived_at` DATETIME NULL DEFAULT NULL, - CHANGE COLUMN `login_accessed_at` `credential_accessed_at` DATETIME NULL DEFAULT NULL, - CHANGE COLUMN `login_password_changed_at` `credential_password_changed_at` DATETIME NULL DEFAULT CURRENT_TIMESTAMP(), - CHANGE COLUMN `login_folder_id` `credential_folder_id` INT(11) NOT NULL DEFAULT '0', - CHANGE COLUMN `login_contact_id` `credential_contact_id` INT(11) NOT NULL DEFAULT '0', - CHANGE COLUMN `login_asset_id` `credential_asset_id` INT(11) NOT NULL DEFAULT '0', - CHANGE COLUMN `login_client_id` `credential_client_id` INT(11) NOT NULL DEFAULT '0' - "); - - // Rename table contact_logins to contact_credentials - mysqli_query($mysqli, "RENAME TABLE `contact_logins` TO `contact_credentials`"); - - // Alter contact_credentials table and change login_id to credential_id - mysqli_query($mysqli, " - ALTER TABLE `contact_credentials` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL - "); - - // Clean up orphaned contact_id rows in contact_credentials - mysqli_query($mysqli, " - DELETE FROM `contact_credentials` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - // Clean up orphaned credential_id rows in contact_credentials - mysqli_query($mysqli, " - DELETE FROM `contact_credentials` - WHERE `credential_id` NOT IN (SELECT `credential_id` FROM `credentials`); - "); - - // Add foreign keys to contact_credentials - mysqli_query($mysqli, " - ALTER TABLE `contact_credentials` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE - "); - - // Rename table service_logins to service_credentials - mysqli_query($mysqli, "RENAME TABLE `service_logins` TO `service_credentials`"); - - // Alter service_credentials table and change login_id to credential_id - mysqli_query($mysqli, " - ALTER TABLE `service_credentials` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL - "); - - // Clean up orphaned service_id rows in service_credentials - mysqli_query($mysqli, " - DELETE FROM `service_credentials` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - - // Clean up orphaned credential_id rows in service_credentials - mysqli_query($mysqli, " - DELETE FROM `service_credentials` - WHERE `credential_id` NOT IN (SELECT `credential_id` FROM `credentials`); - "); - - // Add foreign keys to service_credentials - mysqli_query($mysqli, " - ALTER TABLE `service_credentials` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE - "); - - // Rename table software_logins to software_credentials - mysqli_query($mysqli, "RENAME TABLE `software_logins` TO `software_credentials`"); - - // Alter software_credentials table and change login_id to credential_id - mysqli_query($mysqli, " - ALTER TABLE `software_credentials` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL - "); - - // Clean up orphaned software_id rows in software_credentials - mysqli_query($mysqli, " - DELETE FROM `software_credentials` - WHERE `software_id` NOT IN (SELECT `software_id` FROM `software`); - "); - - // Clean up orphaned credential_id rows in software_credentials - mysqli_query($mysqli, " - DELETE FROM `software_credentials` - WHERE `credential_id` NOT IN (SELECT `credential_id` FROM `credentials`); - "); - - // Add foreign keys to software_credentials - mysqli_query($mysqli, " - ALTER TABLE `software_credentials` - ADD FOREIGN KEY (`software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE - "); - - // Rename table vendor_logins to vendor_credentials - mysqli_query($mysqli, "RENAME TABLE `vendor_logins` TO `vendor_credentials`"); - - // Alter vendor_credentials table and change login_id to credential_id - mysqli_query($mysqli, " - ALTER TABLE `vendor_credentials` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL - "); - - // Clean up orphaned vendor_id rows in vendor_credentials - mysqli_query($mysqli, " - DELETE FROM `vendor_credentials` - WHERE `vendor_id` NOT IN (SELECT `vendor_id` FROM `vendors`); - "); - - // Clean up orphaned credential_id rows in vendor_credentials - mysqli_query($mysqli, " - DELETE FROM `vendor_credentials` - WHERE `credential_id` NOT IN (SELECT `credential_id` FROM `credentials`); - "); - - // Add foreign keys to vendor_credentials - mysqli_query($mysqli, " - ALTER TABLE `vendor_credentials` - ADD FOREIGN KEY (`vendor_id`) REFERENCES `vendors`(`vendor_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE - "); - - // Rename table login_tags to credential_tags - mysqli_query($mysqli, "RENAME TABLE `login_tags` TO `credential_tags`"); - - // Alter credential_tags table and change login_id to credential_id - mysqli_query($mysqli, " - ALTER TABLE `credential_tags` - CHANGE COLUMN `login_id` `credential_id` INT(11) NOT NULL - "); - - // Clean up orphaned tag_id rows in credential_tags - mysqli_query($mysqli, " - DELETE FROM `credential_tags` - WHERE `tag_id` NOT IN (SELECT `tag_id` FROM `tags`); - "); - - // Clean up orphaned credential_id rows in credential_tags - mysqli_query($mysqli, " - DELETE FROM `credential_tags` - WHERE `credential_id` NOT IN (SELECT `credential_id` FROM `credentials`); - "); - - // Add foreign keys to credential_tags - mysqli_query($mysqli, " - ALTER TABLE `credential_tags` - ADD FOREIGN KEY (`tag_id`) REFERENCES `tags`(`tag_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE - "); - - // Create asset_credentials table with foreign keys - mysqli_query($mysqli, " - CREATE TABLE `asset_credentials` ( - `credential_id` INT(11) NOT NULL, - `asset_id` INT(11) NOT NULL, - PRIMARY KEY (`credential_id`, `asset_id`), - FOREIGN KEY (`credential_id`) REFERENCES `credentials`(`credential_id`) ON DELETE CASCADE, - FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - ) - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.0'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.0') { - - //Dropping patch panel as a patch panel can be documented as an asset with interfaces. - mysqli_query($mysqli, "DROP TABLE `patch_panel_ports`"); - mysqli_query($mysqli, "DROP TABLE `patch_panels`"); - - mysqli_query($mysqli, "RENAME TABLE `events` TO `calendar_events`"); - mysqli_query($mysqli, "RENAME TABLE `event_attendees` TO `calendar_event_attendees`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.1'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.1') { - - // Clean up orphaned data before adding foreign keys - - // Clean up orphaned asset_custom_asset_id rows in asset_custom - mysqli_query($mysqli, " - DELETE FROM `asset_custom` - WHERE `asset_custom_asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign key to asset_custom - mysqli_query($mysqli, " - ALTER TABLE `asset_custom` - ADD FOREIGN KEY (`asset_custom_asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned asset_id rows in asset_documents - mysqli_query($mysqli, " - DELETE FROM `asset_documents` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Clean up orphaned document_id rows in asset_documents - mysqli_query($mysqli, " - DELETE FROM `asset_documents` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - - // Add foreign keys to asset_documents - mysqli_query($mysqli, " - ALTER TABLE `asset_documents` - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE - "); - - // Clean up orphaned asset_id rows in asset_files - mysqli_query($mysqli, " - DELETE FROM `asset_files` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Clean up orphaned file_id rows in asset_files - mysqli_query($mysqli, " - DELETE FROM `asset_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - - // Add foreign keys to asset_files - mysqli_query($mysqli, " - ALTER TABLE `asset_files` - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - // Clean up orphaned asset_history_asset_id rows in asset_history - mysqli_query($mysqli, " - DELETE FROM `asset_history` - WHERE `asset_history_asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign key to asset_history - mysqli_query($mysqli, " - ALTER TABLE `asset_history` - ADD FOREIGN KEY (`asset_history_asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned interface_asset_id rows in asset_interfaces - mysqli_query($mysqli, " - DELETE FROM `asset_interfaces` - WHERE `interface_asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign key to asset_interfaces - mysqli_query($mysqli, " - ALTER TABLE `asset_interfaces` - ADD FOREIGN KEY (`interface_asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned asset_note_asset_id rows in asset_notes - mysqli_query($mysqli, " - DELETE FROM `asset_notes` - WHERE `asset_note_asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign key to asset_notes - mysqli_query($mysqli, " - ALTER TABLE `asset_notes` - ADD FOREIGN KEY (`asset_note_asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned contact_id rows in contact_assets - mysqli_query($mysqli, " - DELETE FROM `contact_assets` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - // Clean up orphaned asset_id rows in contact_assets - mysqli_query($mysqli, " - DELETE FROM `contact_assets` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign keys to contact_assets - mysqli_query($mysqli, " - ALTER TABLE `contact_assets` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned service_id rows in service_assets - mysqli_query($mysqli, " - DELETE FROM `service_assets` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - - // Clean up orphaned asset_id rows in service_assets - mysqli_query($mysqli, " - DELETE FROM `service_assets` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign keys to service_assets - mysqli_query($mysqli, " - ALTER TABLE `service_assets` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Clean up orphaned software_id rows in software_assets - mysqli_query($mysqli, " - DELETE FROM `software_assets` - WHERE `software_id` NOT IN (SELECT `software_id` FROM `software`); - "); - - // Clean up orphaned asset_id rows in software_assets - mysqli_query($mysqli, " - DELETE FROM `software_assets` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign keys to software_assets - mysqli_query($mysqli, " - ALTER TABLE `software_assets` - ADD FOREIGN KEY (`software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.2'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.2') { - - // Clean up orphans - mysqli_query($mysqli, " - DELETE FROM `calendar_event_attendees` - WHERE `attendee_event_id` NOT IN (SELECT `event_id` FROM `calendar_events`); - "); - - mysqli_query($mysqli, " - DELETE FROM `calendar_events` - WHERE `event_calendar_id` NOT IN (SELECT `calendar_id` FROM `calendars`); - "); - - // Add foreign key to calendar_event_attendees - mysqli_query($mysqli, " - ALTER TABLE `calendar_event_attendees` - ADD FOREIGN KEY (`attendee_event_id`) REFERENCES `calendar_events`(`event_id`) ON DELETE CASCADE - "); - - // Add foreign key to calendar_events - mysqli_query($mysqli, " - ALTER TABLE `calendar_events` - ADD FOREIGN KEY (`event_calendar_id`) REFERENCES `calendars`(`calendar_id`) ON DELETE CASCADE - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.3'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.3') { - - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `certificate_history` - WHERE `certificate_history_certificate_id` NOT IN (SELECT `certificate_id` FROM `certificates`); - "); - - // Add foreign key certificate history - mysqli_query($mysqli, " - ALTER TABLE `certificate_history` - ADD FOREIGN KEY (`certificate_history_certificate_id`) REFERENCES `certificates`(`certificate_id`) ON DELETE CASCADE - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.4'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.4') { - - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `client_notes` - WHERE `client_note_client_id` NOT IN (SELECT `client_id` FROM `clients`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `client_notes` - ADD FOREIGN KEY (`client_note_client_id`) REFERENCES `clients`(`client_id`) ON DELETE CASCADE - "); - - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `client_tags` - WHERE `client_id` NOT IN (SELECT `client_id` FROM `clients`); - "); - - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `client_tags` - WHERE `tag_id` NOT IN (SELECT `tag_id` FROM `tags`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `client_tags` - ADD FOREIGN KEY (`client_id`) REFERENCES `clients`(`client_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`tag_id`) REFERENCES `tags`(`tag_id`) ON DELETE CASCADE - "); - - //Contact Assets - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `contact_assets` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - mysqli_query($mysqli, " - DELETE FROM `contact_assets` - WHERE `asset_id` NOT IN (SELECT `asset_id` FROM `assets`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `contact_assets` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - "); - - // Contact Documents - // Clean up orphaned history - mysqli_query($mysqli, " - DELETE FROM `contact_documents` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - mysqli_query($mysqli, " - DELETE FROM `contact_documents` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `contact_documents` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE - "); - - // contact_files - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `contact_files` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - mysqli_query($mysqli, " - DELETE FROM `contact_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `contact_files` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - // contact_notes - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `contact_notes` - WHERE `contact_note_contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `contact_notes` - ADD FOREIGN KEY (`contact_note_contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE - "); - - // contact_tags - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `contact_tags` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - - mysqli_query($mysqli, " - DELETE FROM `contact_tags` - WHERE `tag_id` NOT IN (SELECT `tag_id` FROM `tags`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `contact_tags` - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`tag_id`) REFERENCES `tags`(`tag_id`) ON DELETE CASCADE - "); - - // document_files - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `document_files` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - - mysqli_query($mysqli, " - DELETE FROM `document_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `document_files` - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - // domain_history - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `domain_history` - WHERE `domain_history_domain_id` NOT IN (SELECT `domain_id` FROM `domains`); - "); - - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `domain_history` - ADD FOREIGN KEY (`domain_history_domain_id`) REFERENCES `domains`(`domain_id`) ON DELETE CASCADE - "); - - // location_tags - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `location_tags` - WHERE `location_id` NOT IN (SELECT `location_id` FROM `locations`); - "); - mysqli_query($mysqli, " - DELETE FROM `location_tags` - WHERE `tag_id` NOT IN (SELECT `tag_id` FROM `tags`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `location_tags` - ADD FOREIGN KEY (`location_id`) REFERENCES `locations`(`location_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`tag_id`) REFERENCES `tags`(`tag_id`) ON DELETE CASCADE - "); - - // quote_files - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `quote_files` - WHERE `quote_id` NOT IN (SELECT `quote_id` FROM `quotes`); - "); - mysqli_query($mysqli, " - DELETE FROM `quote_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `quote_files` - ADD FOREIGN KEY (`quote_id`) REFERENCES `quotes`(`quote_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - // service_certificates - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `service_certificates` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - mysqli_query($mysqli, " - DELETE FROM `service_certificates` - WHERE `certificate_id` NOT IN (SELECT `certificate_id` FROM `certificates`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `service_certificates` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`certificate_id`) REFERENCES `certificates`(`certificate_id`) ON DELETE CASCADE - "); - - // service_contacts - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `service_contacts` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - mysqli_query($mysqli, " - DELETE FROM `service_contacts` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `service_contacts` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE - "); - - // service_documents - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `service_documents` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - mysqli_query($mysqli, " - DELETE FROM `service_documents` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `service_documents` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE - "); - - // service_domains - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `service_domains` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - mysqli_query($mysqli, " - DELETE FROM `service_domains` - WHERE `domain_id` NOT IN (SELECT `domain_id` FROM `domains`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `service_domains` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`domain_id`) REFERENCES `domains`(`domain_id`) ON DELETE CASCADE - "); - - // service_vendors - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `service_vendors` - WHERE `service_id` NOT IN (SELECT `service_id` FROM `services`); - "); - mysqli_query($mysqli, " - DELETE FROM `service_vendors` - WHERE `vendor_id` NOT IN (SELECT `vendor_id` FROM `vendors`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `service_vendors` - ADD FOREIGN KEY (`service_id`) REFERENCES `services`(`service_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`vendor_id`) REFERENCES `vendors`(`vendor_id`) ON DELETE CASCADE - "); - - // software_contacts - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `software_contacts` - WHERE `software_id` NOT IN (SELECT `software_id` FROM `software`); - "); - mysqli_query($mysqli, " - DELETE FROM `software_contacts` - WHERE `contact_id` NOT IN (SELECT `contact_id` FROM `contacts`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `software_contacts` - ADD FOREIGN KEY (`software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE - "); - - // software_documents - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `software_documents` - WHERE `software_id` NOT IN (SELECT `software_id` FROM `software`); - "); - mysqli_query($mysqli, " - DELETE FROM `software_documents` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `software_documents` - ADD FOREIGN KEY (`software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE - "); - - // software_files - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `software_files` - WHERE `software_id` NOT IN (SELECT `software_id` FROM `software`); - "); - mysqli_query($mysqli, " - DELETE FROM `software_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `software_files` - ADD FOREIGN KEY (`software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - // vendor_documents - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `vendor_documents` - WHERE `vendor_id` NOT IN (SELECT `vendor_id` FROM `vendors`); - "); - mysqli_query($mysqli, " - DELETE FROM `vendor_documents` - WHERE `document_id` NOT IN (SELECT `document_id` FROM `documents`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `vendor_documents` - ADD FOREIGN KEY (`vendor_id`) REFERENCES `vendors`(`vendor_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`document_id`) REFERENCES `documents`(`document_id`) ON DELETE CASCADE - "); - - // vendor_files - // Clean up orphaned rows - mysqli_query($mysqli, " - DELETE FROM `vendor_files` - WHERE `vendor_id` NOT IN (SELECT `vendor_id` FROM `vendors`); - "); - mysqli_query($mysqli, " - DELETE FROM `vendor_files` - WHERE `file_id` NOT IN (SELECT `file_id` FROM `files`); - "); - // Add foreign key - mysqli_query($mysqli, " - ALTER TABLE `vendor_files` - ADD FOREIGN KEY (`vendor_id`) REFERENCES `vendors`(`vendor_id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`file_id`) REFERENCES `files`(`file_id`) ON DELETE CASCADE - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.5'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.5') { - - // CONVERT All tables TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci - - $tables = [ - 'accounts', 'api_keys', 'app_logs', 'asset_credentials', 'asset_custom', 'asset_documents', - 'asset_files', 'asset_history', 'asset_interface_links', 'asset_interfaces', 'asset_notes', 'assets', - 'auth_logs', 'budget', 'calendar_event_attendees', 'calendar_events', 'calendars', 'categories', - 'certificate_history', 'certificates', 'client_notes', 'client_stripe', 'client_tags', 'clients', - 'companies', 'contact_assets', 'contact_credentials', 'contact_documents', 'contact_files', 'contact_notes', - 'contact_tags', 'contacts', 'credential_tags', 'credentials', 'custom_fields', 'custom_links', - 'custom_values', 'document_files', 'documents', 'domain_history', 'domains', 'email_queue', 'expenses', - 'files', 'folders', 'history', 'invoice_items', 'invoices', 'location_tags', 'locations', 'logs', - 'modules', 'networks', 'notifications', 'payments', 'products', 'project_template_ticket_templates', - 'project_templates', 'projects', 'quote_files', 'quotes', 'rack_units', 'racks', 'records', - 'recurring_expenses', 'recurring_invoices', 'recurring_payments', 'recurring_ticket_assets', 'recurring_tickets', - 'remember_tokens', 'revenues', 'service_assets', 'service_certificates', 'service_contacts', 'service_credentials', - 'service_documents', 'service_domains', 'service_vendors', 'services', 'settings', 'shared_items', - 'software', 'software_assets', 'software_contacts', 'software_credentials', 'software_documents', 'software_files', - 'tags', 'task_templates', 'tasks', 'taxes', 'ticket_assets', 'ticket_attachments', 'ticket_history', 'ticket_replies', - 'ticket_statuses', 'ticket_templates', 'ticket_views', 'ticket_watchers', 'tickets', 'transfers', 'trips', - 'user_client_permissions', 'user_role_permissions', 'user_roles', 'user_settings', 'users', 'vendor_credentials', - 'vendor_documents', 'vendor_files', 'vendors' - ]; - - foreach ($tables as $table) { - $sql = "ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"; - mysqli_query($mysqli, $sql); - } - - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.6'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.6') { - // Fix service_domains to yse InnoDB instead of MyISAM - mysqli_query($mysqli, "ALTER TABLE service_domains ENGINE = InnoDB;"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.7'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.7') { - - mysqli_query($mysqli, "ALTER TABLE `files` DROP `file_hash`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.8'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.8') { - - mysqli_query($mysqli, "ALTER TABLE `files` DROP `file_has_thumbnail`"); - mysqli_query($mysqli, "ALTER TABLE `files` DROP `file_has_preview`"); - mysqli_query($mysqli, "ALTER TABLE `files` DROP `file_asset_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.9'"); - } - - if (CURRENT_DATABASE_VERSION == '2.0.9') { - - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_phone_country_code` VARCHAR(10) DEFAULT 1 AFTER `contact_email`"); - mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_mobile_country_code` VARCHAR(10) DEFAULT 1 AFTER `contact_extension`"); - - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_phone_country_code` VARCHAR(10) DEFAULT 1 AFTER `location_zip`"); - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_phone_extension` VARCHAR(10) DEFAULT NULL AFTER `location_phone`"); - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_fax_country_code` VARCHAR(10) DEFAULT 1 AFTER `location_phone_extension`"); - - mysqli_query($mysqli, "ALTER TABLE `vendors` ADD `vendor_phone_country_code` VARCHAR(10) DEFAULT 1 AFTER `vendor_contact_name`"); - - mysqli_query($mysqli, "ALTER TABLE `companies` ADD `company_phone_country_code` VARCHAR(10) DEFAULT 1 AFTER `company_country`"); - - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.0'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.0') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_signature` TEXT DEFAULT NULL AFTER `user_config_calendar_first_day`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.1'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.1') { - mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_phone_mask`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.2'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.2') { - - // Update country_code to NULL for `contacts` table - mysqli_query($mysqli, "ALTER TABLE `contacts` MODIFY `contact_phone_country_code` VARCHAR(10) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `contacts` MODIFY `contact_mobile_country_code` VARCHAR(10) DEFAULT NULL"); - - // Update country_code to NULL for `locations` table - mysqli_query($mysqli, "ALTER TABLE `locations` MODIFY `location_phone_country_code` VARCHAR(10) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `locations` MODIFY `location_fax_country_code` VARCHAR(10) DEFAULT NULL"); - - // Update country_code to NULL for `vendors` table - mysqli_query($mysqli, "ALTER TABLE `vendors` MODIFY `vendor_phone_country_code` VARCHAR(10) DEFAULT NULL"); - - // Update country_code to NULL for `companies` table - mysqli_query($mysqli, "ALTER TABLE `companies` MODIFY `company_phone_country_code` VARCHAR(10) DEFAULT NULL"); - - // Set country_code to NULL for `contacts` table - mysqli_query($mysqli, "UPDATE `contacts` SET `contact_phone_country_code` = NULL"); - mysqli_query($mysqli, "UPDATE `contacts` SET `contact_mobile_country_code` = NULL"); - - // Set country_code to NULL for `locations` table - mysqli_query($mysqli, "UPDATE `locations` SET `location_phone_country_code` = NULL"); - mysqli_query($mysqli, "UPDATE `locations` SET `location_fax_country_code` = NULL"); - - // Set country_code to NULL for `vendors` table - mysqli_query($mysqli, "UPDATE `vendors` SET `vendor_phone_country_code` = NULL"); - - // Set country_code to NULL for `companies` table - mysqli_query($mysqli, "UPDATE `companies` SET `company_phone_country_code` = NULL"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.3'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.3') { - mysqli_query($mysqli, "ALTER TABLE `client_stripe` ADD `stripe_pm_details` VARCHAR(200) DEFAULT NULL AFTER `stripe_pm`"); - mysqli_query($mysqli, "ALTER TABLE `client_stripe` ADD `stripe_pm_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `stripe_pm_details`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.4'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.4') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_timer_autostart` TINYINT(1) NOT NULL DEFAULT '0' AFTER `config_ticket_default_billable`"); - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_due_at` DATETIME DEFAULT NULL AFTER `ticket_updated_at`"); - mysqli_query($mysqli, "ALTER TABLE `companies` ADD `company_tax_id` VARCHAR(200) DEFAULT NULL AFTER `company_currency`"); - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_invoice_show_tax_id` TINYINT(1) NOT NULL DEFAULT '0' AFTER `config_invoice_paid_notification_email`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.5'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.5') { - - mysqli_query($mysqli, "CREATE TABLE `document_versions` ( - `document_version_id` INT(11) NOT NULL AUTO_INCREMENT, - `document_version_name` VARCHAR(200) NOT NULL, - `document_version_description` TEXT DEFAULT NULL, - `document_version_content` LONGTEXT NOT NULL, - `document_version_created_by` INT(11) DEFAULT 0, - `document_version_created_at` DATETIME NOT NULL, - `document_version_document_id` INT(11) NOT NULL, - PRIMARY KEY (`document_version_id`) - )"); - - // Delete all Current Document Versions - mysqli_query($mysqli, " - DELETE FROM `documents` - WHERE `document_parent` > 0 AND `document_parent` != `document_id` - "); - - mysqli_query($mysqli, "ALTER TABLE `documents` DROP `document_parent`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.6'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.6') { - mysqli_query($mysqli, "CREATE TABLE `document_templates` ( - `document_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `document_template_name` VARCHAR(200) NOT NULL, - `document_template_description` TEXT DEFAULT NULL, - `document_template_content` LONGTEXT NOT NULL, - `document_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `document_template_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `document_template_archived_at` DATETIME NULL DEFAULT NULL, - `document_template_created_by` INT(11) NOT NULL DEFAULT 0, - `document_template_updated_by` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`document_template_id`) - )"); - - // Copy Document Templates over to new document templates table - mysqli_query($mysqli, " - INSERT INTO document_templates ( - document_template_name, - document_template_description, - document_template_content, - document_template_created_at, - document_template_updated_at, - document_template_archived_at, - document_template_created_by, - document_template_updated_by - ) - SELECT - document_name, - document_description, - document_content, - document_created_at, - document_updated_at, - document_archived_at, - document_created_by, - document_updated_by - FROM - documents - WHERE - document_template = 1 - "); - - mysqli_query($mysqli, "DELETE FROM documents WHERE document_template = 1"); - - mysqli_query($mysqli, "ALTER TABLE `documents` DROP `document_template`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.7'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.7') { - mysqli_query($mysqli, "CREATE TABLE `software_templates` ( - `software_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `software_template_name` VARCHAR(200) NOT NULL, - `software_template_description` TEXT DEFAULT NULL, - `software_template_version` VARCHAR(200) DEFAULT NULL, - `software_template_type` VARCHAR(200) NOT NULL, - `software_template_license_type` VARCHAR(200) DEFAULT NULL, - `software_template_notes` TEXT DEFAULT NULL, - `software_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `software_template_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `software_template_archived_at` DATETIME NULL DEFAULT NULL, - PRIMARY KEY (`software_template_id`) - )"); - - // Copy software Templates over to new software templates table - mysqli_query($mysqli, " - INSERT INTO software_templates ( - software_template_name, - software_template_description, - software_template_version, - software_template_type, - software_template_license_type, - software_template_notes, - software_template_created_at, - software_template_updated_at, - software_template_archived_at - ) - SELECT - software_name, - software_description, - software_version, - software_type, - software_license_type, - software_notes, - software_created_at, - software_updated_at, - software_archived_at - FROM - software - WHERE - software_template = 1 - "); - - mysqli_query($mysqli, "DELETE FROM software WHERE software_template = 1"); - - mysqli_query($mysqli, "ALTER TABLE `software` DROP `software_template`"); - - mysqli_query($mysqli, "ALTER TABLE `software` DROP `software_template_id`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.8'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.8') { - mysqli_query($mysqli, "CREATE TABLE `vendor_templates` ( - `vendor_template_id` INT(11) NOT NULL AUTO_INCREMENT, - `vendor_template_name` VARCHAR(200) NOT NULL, - `vendor_template_description` VARCHAR(200) DEFAULT NULL, - `vendor_template_contact_name` VARCHAR(200) DEFAULT NULL, - `vendor_template_phone_country_code` VARCHAR(10) DEFAULT NULL, - `vendor_template_phone` VARCHAR(200) DEFAULT NULL, - `vendor_template_extension` VARCHAR(200) DEFAULT NULL, - `vendor_template_email` VARCHAR(200) DEFAULT NULL, - `vendor_template_website` VARCHAR(200) DEFAULT NULL, - `vendor_template_hours` VARCHAR(200) DEFAULT NULL, - `vendor_template_sla` VARCHAR(200) DEFAULT NULL, - `vendor_template_code` VARCHAR(200) DEFAULT NULL, - `vendor_template_account_number` VARCHAR(200) DEFAULT NULL, - `vendor_template_notes` TEXT DEFAULT NULL, - `vendor_template_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `vendor_template_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `vendor_template_archived_at` DATETIME NULL DEFAULT NULL, - PRIMARY KEY (`vendor_template_id`) - )"); - - // Copy Vendor Templates over to new vendor templates table - mysqli_query($mysqli, " - INSERT INTO vendor_templates ( - vendor_template_name, - vendor_template_description, - vendor_template_contact_name, - vendor_template_phone_country_code, - vendor_template_phone, - vendor_template_extension, - vendor_template_email, - vendor_template_website, - vendor_template_hours, - vendor_template_sla, - vendor_template_code, - vendor_template_account_number, - vendor_template_notes, - vendor_template_created_at, - vendor_template_updated_at, - vendor_template_archived_at - ) - SELECT - vendor_name, - vendor_description, - vendor_contact_name, - vendor_phone_country_code, - vendor_phone, - vendor_extension, - vendor_email, - vendor_website, - vendor_hours, - vendor_sla, - vendor_code, - vendor_account_number, - vendor_notes, - vendor_created_at, - vendor_updated_at, - vendor_archived_at - FROM - vendors - WHERE - vendor_template = 1 - "); - - mysqli_query($mysqli, "DELETE FROM vendors WHERE vendor_template = 1"); - - mysqli_query($mysqli, "ALTER TABLE `vendors` DROP `vendor_template`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.9'"); - } - - if (CURRENT_DATABASE_VERSION == '2.1.9') { - mysqli_query($mysqli, "ALTER TABLE `companies` MODIFY `company_currency` VARCHAR(200) DEFAULT 'USD'"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.0'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.0') { - mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_quote_id` INT(11) NOT NULL DEFAULT 0 AFTER `ticket_asset_id`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.1'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.1') { - mysqli_query($mysqli, "CREATE TABLE `ai_providers` ( - `ai_provider_id` INT(11) NOT NULL AUTO_INCREMENT, - `ai_provider_name` VARCHAR(200) NOT NULL, - `ai_provider_api_url` VARCHAR(200) NOT NULL, - `ai_provider_api_key` VARCHAR(200) DEFAULT NULL, - `ai_provider_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `ai_provider_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`ai_provider_id`) - )"); - - mysqli_query($mysqli, " - CREATE TABLE `ai_models` ( - `ai_model_id` INT(11) NOT NULL AUTO_INCREMENT, - `ai_model_name` VARCHAR(200) NOT NULL, - `ai_model_prompt` TEXT DEFAULT NULL, - `ai_model_use_case` VARCHAR(200) DEFAULT NULL, - `ai_model_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `ai_model_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `ai_model_ai_provider_id` INT(11) NOT NULL, - PRIMARY KEY (`ai_model_id`), - FOREIGN KEY (`ai_model_ai_provider_id`) - REFERENCES `ai_providers`(`ai_provider_id`) - ON DELETE CASCADE - ) - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.2'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.2') { - mysqli_query($mysqli, "CREATE TABLE `payment_methods` ( - `payment_method_id` INT(11) NOT NULL AUTO_INCREMENT, - `payment_method_name` VARCHAR(200) NOT NULL, - `payment_method_description` VARCHAR(250) DEFAULT NULL, - `payment_method_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `payment_method_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`payment_method_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `payment_providers` ( - `payment_provider_id` INT(11) NOT NULL AUTO_INCREMENT, - `payment_provider_name` VARCHAR(200) NOT NULL, - `payment_provider_description` VARCHAR(250) DEFAULT NULL, - `payment_provider_public_key` VARCHAR(250) DEFAULT NULL, - `payment_provider_private_key` VARCHAR(250) DEFAULT NULL, - `payment_provider_threshold` DECIMAL(15,2) DEFAULT NULL, - `payment_provider_active` TINYINT(1) NOT NULL DEFAULT 1, - `payment_provider_account` INT(11) NOT NULL, - `payment_provider_expense_vendor` INT(11) NOT NULL DEFAULT 0, - `payment_provider_expense_category` INT(11) NOT NULL DEFAULT 0, - `payment_provider_expense_percentage_fee` DECIMAL(4,4) DEFAULT NULL, - `payment_provider_expense_flat_fee` DECIMAL(15,2) DEFAULT NULL, - `payment_provider_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `payment_provider_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`payment_provider_id`) - )"); - - mysqli_query($mysqli, "CREATE TABLE `client_saved_payment_methods` ( - `saved_payment_id` INT(11) NOT NULL AUTO_INCREMENT, - `saved_payment_provider_method` VARCHAR(200) NOT NULL, - `saved_payment_description` VARCHAR(200) DEFAULT NULL, - `saved_payment_client_id` INT(11) NOT NULL, - `saved_payment_provider_id` INT(11) NOT NULL, - `saved_payment_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `saved_payment_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`saved_payment_id`), - FOREIGN KEY (`saved_payment_client_id`) REFERENCES clients(`client_id`) ON DELETE CASCADE, - FOREIGN KEY (`saved_payment_provider_id`) REFERENCES payment_providers(`payment_provider_id`) ON DELETE CASCADE - )"); - - mysqli_query($mysqli, "CREATE TABLE `client_payment_provider` ( - `client_id` INT(11) NOT NULL, - `payment_provider_id` INT(11) NOT NULL, - `payment_provider_client` VARCHAR(200) NOT NULL, - `client_payment_provider_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`client_id`, `payment_provider_id`), - FOREIGN KEY (`client_id`) REFERENCES clients(`client_id`) ON DELETE CASCADE, - FOREIGN KEY (`payment_provider_id`) REFERENCES payment_providers(`payment_provider_id`) ON DELETE CASCADE - )"); - - mysqli_query($mysqli, "ALTER TABLE `recurring_payments` ADD `recurring_payment_saved_payment_id` INT(11) DEFAULT NULL AFTER `recurring_payment_recurring_invoice_id`"); - - mysqli_query($mysqli, "ALTER TABLE `recurring_payments` ADD CONSTRAINT `fk_recurring_saved_payment` FOREIGN KEY (`recurring_payment_saved_payment_id`) REFERENCES `client_saved_payment_methods`(`saved_payment_id`) ON DELETE CASCADE"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.3'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.3') { - - mysqli_query($mysqli, "CREATE TABLE `credits` ( - `credit_id` INT(11) NOT NULL AUTO_INCREMENT, - `credit_amount` DECIMAL(15,2) NOT NULL, - `credit_reference` VARCHAR(250) DEFAULT NULL, - `credit_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `credit_created_by` INT(11) NOT NULL, - `credit_expire_at` DATE DEFAULT NULL, - `credit_client_id` INT(11) NOT NULL, - PRIMARY KEY (`credit_id`) - )"); - - mysqli_query($mysqli, "ALTER TABLE `invoices` ADD `invoice_credit_amount` DECIMAL(15,2) NOT NULL DEFAULT 0.00 AFTER `invoice_discount_amount`"); - - mysqli_query($mysqli, "CREATE TABLE `discount_codes` ( - `discount_code_id` INT(11) NOT NULL AUTO_INCREMENT, - `discount_code_description` VARCHAR(250) DEFAULT NULL, - `discount_code_amount` DECIMAL(15,2) NOT NULL, - `discount_code` VARCHAR(200) NOT NULL, - `discount_code_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `discount_code_created_by` INT(11) NOT NULL, - `discount_code_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `discount_code_archived_at` DATETIME NULL DEFAULT NULL, - `discount_code_expire_at` DATE DEFAULT NULL, - PRIMARY KEY (`discount_code_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.4'"); +// Collect and order the migration files by version (glob sorts alphabetically, +// which would put 2.4.10 before 2.4.9 - version_compare gets it right) +$database_update_files = []; +foreach (glob(__DIR__ . "/database_updates/*.php") as $file) { + $version = basename($file, ".php"); + if (preg_match('/^\d+(\.\d+)+$/', $version)) { + $database_update_files[$version] = $file; } - - if (CURRENT_DATABASE_VERSION == '2.2.4') { - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_theme_dark` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_theme`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.5'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.5') { - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_uri_client` VARCHAR(500) NULL DEFAULT NULL AFTER `asset_uri_2`"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.6'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.6') { - mysqli_query($mysqli, "ALTER TABLE `credits` DROP `credit_reference`"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD `credit_type` ENUM('prepaid', 'manual', 'refund', 'promotion', 'usage') NOT NULL DEFAULT 'manual' AFTER `credit_amount`"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD `credit_note` TEXT NULL DEFAULT NULL AFTER `credit_type`"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD `credit_invoice_id` INT(11) NULL DEFAULT NULL AFTER `credit_expire_at`"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD INDEX (`credit_client_id`)"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD INDEX (`credit_invoice_id`)"); - mysqli_query($mysqli, "ALTER TABLE `credits` ADD INDEX (`credit_created_at`)"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.7'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.7') { - mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_theme_dark` TINYINT(1) NOT NULL DEFAULT 0 AFTER `user_config_signature`"); - mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_theme_dark`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.8'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.8') { - - mysqli_query($mysqli, "ALTER TABLE `products` ADD `product_type` ENUM('service', 'product') NOT NULL DEFAULT 'service' AFTER `product_name`"); - mysqli_query($mysqli, "ALTER TABLE `products` ADD `product_code` VARCHAR(200) DEFAULT NULL AFTER `product_description`"); - mysqli_query($mysqli, "ALTER TABLE `products` ADD `product_location` VARCHAR(250) DEFAULT NULL AFTER `product_code`"); - - mysqli_query($mysqli, "CREATE TABLE `product_stock` ( - `stock_id` INT(11) NOT NULL AUTO_INCREMENT, - `stock_qty` INT(11) NOT NULL, - `stock_note` TEXT DEFAULT NULL, - `stock_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), - `stock_expense_id` INT(11) DEFAULT NULL, - `stock_item_id` INT(11) DEFAULT NULL, - `stock_product_id` INT(11) NOT NULL, - PRIMARY KEY (`stock_id`) - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.9'"); - } - - if (CURRENT_DATABASE_VERSION == '2.2.9') { - // Migrate Stripe Settings over to new Tables - - // Get Current Stripe Settings - $sql_stripe_settings = mysqli_query($mysqli, "SELECT * FROM settings WHERE company_id = 1"); - $row = mysqli_fetch_assoc($sql_stripe_settings); - $config_stripe_enable = intval($row['config_stripe_enable']); - if ($config_stripe_enable === 1) { - $config_stripe_publishable = mysqli_real_escape_string($mysqli, $row['config_stripe_publishable']); - $config_stripe_secret = mysqli_real_escape_string($mysqli, $row['config_stripe_secret']); - $config_stripe_account = intval($row['config_stripe_account']); - $config_stripe_expense_vendor = intval($row['config_stripe_expense_vendor']); - $config_stripe_expense_category = intval($row['config_stripe_expense_category']); - $config_stripe_percentage_fee = floatval($row['config_stripe_percentage_fee']); - $config_stripe_flat_fee = floatval($row['config_stripe_flat_fee']); - - mysqli_query($mysqli,"INSERT INTO payment_providers SET - payment_provider_name = 'Stripe', - payment_provider_public_key = '$config_stripe_publishable', - payment_provider_private_key = '$config_stripe_secret', - payment_provider_account = $config_stripe_account, - payment_provider_expense_vendor = $config_stripe_expense_vendor, - payment_provider_expense_category = $config_stripe_expense_category, - payment_provider_expense_percentage_fee = $config_stripe_percentage_fee, - payment_provider_expense_flat_fee = $config_stripe_flat_fee" - ); - - $provider_id = mysqli_insert_id($mysqli); - - // Migrate Clients and Payment Method over - $sql_stripe_clients = mysqli_query($mysqli, "SELECT * FROM client_stripe WHERE stripe_pm IS NOT NULL AND stripe_pm != ''"); - while ($row = mysqli_fetch_assoc($sql_stripe_clients)) { - $client_id = intval($row['client_id']); - $stripe_id = mysqli_real_escape_string($mysqli, $row['stripe_id']); - $stripe_pm = mysqli_real_escape_string($mysqli, $row['stripe_pm']); - $stripe_pm_details = mysqli_real_escape_string($mysqli, $row['stripe_pm_details'] ?? 'Saved Card'); - - mysqli_query($mysqli,"INSERT INTO client_payment_provider SET - client_id = $client_id, - payment_provider_id = $provider_id, - payment_provider_client = '$stripe_id'" - ); - - mysqli_query($mysqli,"INSERT INTO client_saved_payment_methods SET - saved_payment_provider_method = '$stripe_pm', - saved_payment_description = '$stripe_pm_details', - saved_payment_client_id = $client_id, - saved_payment_provider_id = $provider_id" - ); - } - } - - // Get Stripe provider id - $res = mysqli_query($mysqli, " - SELECT payment_provider_id - FROM payment_providers - WHERE payment_provider_name = 'Stripe' - ORDER BY payment_provider_id DESC - LIMIT 1 - "); - $stripe = mysqli_fetch_assoc($res); - $stripe_provider_id = intval($stripe['payment_provider_id']); - - // Correct mapping: RP -> Recurring Invoice -> Client -> Client's Stripe saved method - mysqli_query($mysqli, " - UPDATE recurring_payments rp - INNER JOIN recurring_invoices ri - ON ri.recurring_invoice_id = rp.recurring_payment_recurring_invoice_id - INNER JOIN client_saved_payment_methods spm - ON spm.saved_payment_client_id = ri.recurring_invoice_client_id - AND spm.saved_payment_provider_id = $stripe_provider_id - SET - rp.recurring_payment_method = 'Credit Card', - rp.recurring_payment_saved_payment_id = spm.saved_payment_id - WHERE rp.recurring_payment_method = 'Stripe' - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.0'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.0') { - // Migrate Payment Methods from Categories Table to new payment_methods table - $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Payment Method' AND category_name != 'Stripe' AND category_archived_at IS NULL"); - - while ($row = mysqli_fetch_assoc($sql_categories)) { - $category_name = escapeSql($row['category_name']); - - mysqli_query($mysqli,"INSERT INTO payment_methods SET payment_method_name = '$category_name'"); - } - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.1'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.1') { - - // Delete all Recurring Payments that are Stripe - mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_method = 'Stripe'"); - - // Delete Stripe Specific ITFlow Client Stripe Client Relationship Table - mysqli_query($mysqli, "DROP TABLE client_stripe"); - - // Delete Unused Stripe and AI Settings now in their own tables - mysqli_query($mysqli, "ALTER TABLE `settings` - DROP `config_stripe_enable`, - DROP `config_stripe_publishable`, - DROP `config_stripe_secret`, - DROP `config_stripe_account`, - DROP `config_stripe_expense_vendor`, - DROP `config_stripe_expense_category`, - DROP `config_stripe_percentage_fee`, - DROP `config_stripe_flat_fee`, - DROP `config_ai_enable`, - DROP `config_ai_provider`, - DROP `config_ai_model`, - DROP `config_ai_url`, - DROP `config_ai_api_key` - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.2'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.2') { - - mysqli_query($mysqli, "ALTER TABLE settings - ADD `config_imap_provider` ENUM('standard_imap','google_oauth','microsoft_oauth') NULL DEFAULT NULL AFTER `config_mail_from_name`, - ADD `config_mail_oauth_client_id` VARCHAR(255) NULL AFTER `config_imap_provider`, - ADD `config_mail_oauth_client_secret` VARCHAR(255) NULL AFTER `config_mail_oauth_client_id`, - ADD `config_mail_oauth_tenant_id` VARCHAR(255) NULL AFTER `config_mail_oauth_client_secret`, - ADD `config_mail_oauth_refresh_token` TEXT NULL AFTER `config_mail_oauth_tenant_id`, - ADD `config_mail_oauth_access_token` TEXT NULL AFTER `config_mail_oauth_refresh_token`, - ADD `config_mail_oauth_access_token_expires_at` DATETIME NULL AFTER `config_mail_oauth_access_token` - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.3'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.3') { - - mysqli_query($mysqli, "ALTER TABLE settings - ADD `config_smtp_provider` ENUM('standard_smtp','google_oauth','microsoft_oauth') NULL DEFAULT NULL AFTER `config_start_page` - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.4'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.4') { - - // Add Software Keys - mysqli_query($mysqli, "CREATE TABLE `software_keys` ( - `software_key_id` INT(11) NOT NULL AUTO_INCREMENT, - `software_key` VARCHAR(400) NOT NULL, - `software_key_software_id` INT(11) NOT NULL, - PRIMARY KEY (`software_key_id`), - FOREIGN KEY (`software_key_software_id`) REFERENCES `software`(`software_id`) ON DELETE CASCADE - )"); - - // Software Key Assignments to Contacts - mysqli_query($mysqli, "CREATE TABLE `software_key_contact_assignments` ( - `software_key_id` INT(11) NOT NULL, - `contact_id` INT(11) NOT NULL, - `software_key_assigned_at` DATETIME DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`software_key_id`, `contact_id`), - FOREIGN KEY (`software_key_id`) REFERENCES `software_keys`(`software_key_id`) ON DELETE CASCADE, - FOREIGN KEY (`contact_id`) REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE - )"); - - // Software Key Assignments to Assets - mysqli_query($mysqli, "CREATE TABLE `software_key_asset_assignments` ( - `software_key_id` INT(11) NOT NULL, - `asset_id` INT(11) NOT NULL, - `software_key_assigned_at` DATETIME DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`software_key_id`, `asset_id`), - FOREIGN KEY (`software_key_id`) REFERENCES `software_keys`(`software_key_id`) ON DELETE CASCADE, - FOREIGN KEY (`asset_id`) REFERENCES `assets`(`asset_id`) ON DELETE CASCADE - )"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.5'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.5') { - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_smtp_provider` `config_smtp_provider` VARCHAR(200) DEFAULT NULL"); - mysqli_query($mysqli, "ALTER TABLE `settings` CHANGE `config_imap_provider` `config_imap_provider` VARCHAR(200) DEFAULT NULL"); - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.6'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.6') { - // Create New Contract Templates Table - mysqli_query($mysqli, "CREATE TABLE `contract_templates` ( - `contract_template_id` INT(11) AUTO_INCREMENT PRIMARY KEY, - `contract_template_name` VARCHAR(255) NOT NULL, - `contract_template_description` TEXT NULL DEFAULT NULL, - `contract_template_type` VARCHAR(50) NULL DEFAULT NULL, - - `contract_template_sla_low_response_time` INT(11) NULL DEFAULT NULL, - `contract_template_sla_low_resolution_time` INT(11) NULL DEFAULT NULL, - `contract_template_sla_medium_response_time` INT(11) NULL DEFAULT NULL, - `contract_template_sla_medium_resolution_time` INT(11) NULL DEFAULT NULL, - `contract_template_sla_high_response_time` INT(11) NULL DEFAULT NULL, - `contract_template_sla_high_resolution_time` INT(11) NULL DEFAULT NULL, - - `contract_template_rate_standard` DECIMAL(10,2) NULL DEFAULT NULL, - `contract_template_rate_after_hours` DECIMAL(10,2) NULL DEFAULT NULL, - - `contract_template_net_terms` VARCHAR(50) NULL DEFAULT NULL, - `contract_template_support_hours` VARCHAR(100) NULL DEFAULT NULL, - `contract_template_renewal_frequency` VARCHAR(50) NULL DEFAULT NULL, - - `contract_template_details` TEXT NULL DEFAULT NULL, - - `contract_template_created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, - `contract_template_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `contract_template_archived_at` DATETIME NULL DEFAULT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"); - - - // Create New Contracts Table - mysqli_query($mysqli, "CREATE TABLE `contracts` ( - `contract_id` INT(11) AUTO_INCREMENT PRIMARY KEY, - `contract_name` VARCHAR(255) NOT NULL, - `contract_status` VARCHAR(50) NOT NULL, - `contract_type` VARCHAR(50) NOT NULL, - - `contract_sla_low_response_time` INT(11) NULL DEFAULT NULL, - `contract_sla_low_resolution_time` INT(11) NULL DEFAULT NULL, - `contract_sla_medium_response_time` INT(11) NULL DEFAULT NULL, - `contract_sla_medium_resolution_time` INT(11) NULL DEFAULT NULL, - `contract_sla_high_response_time` INT(11) NULL DEFAULT NULL, - `contract_sla_high_resolution_time` INT(11) NULL DEFAULT NULL, - - `contract_details` TEXT NULL DEFAULT NULL, - - `contract_client_id` INT(11) NULL DEFAULT NULL, - `contract_client_name` VARCHAR(255) NULL DEFAULT NULL, - `contract_client_address` TEXT NULL DEFAULT NULL, - `contract_client_email` VARCHAR(255) NULL DEFAULT NULL, - `contract_client_phone` VARCHAR(100) NULL DEFAULT NULL, - - `contract_contact_name` VARCHAR(255) NULL DEFAULT NULL, - `contract_contact_signature` TEXT NULL DEFAULT NULL, - `contract_contact_signature_date` DATETIME NULL DEFAULT NULL, - - `contract_agent_name` VARCHAR(255) NULL DEFAULT NULL, - `contract_agent_signature` TEXT NULL DEFAULT NULL, - `contract_agent_signature_date` DATETIME NULL DEFAULT NULL, - - `contract_rate_standard` DECIMAL(10,2) NULL DEFAULT NULL, - `contract_rate_after_hours` DECIMAL(10,2) NULL DEFAULT NULL, - - `contract_net_terms` VARCHAR(50) NULL DEFAULT NULL, - `contract_support_hours` VARCHAR(100) NULL DEFAULT NULL, - - `contract_start_date` DATE NULL DEFAULT NULL, - `contract_end_date` DATE NULL DEFAULT NULL, - `contract_renewal_frequency` VARCHAR(50) NULL DEFAULT NULL, - - `contract_created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, - `contract_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP, - `contract_archived_at` DATETIME NULL DEFAULT NULL, - - FOREIGN KEY (`contract_client_id`) REFERENCES `clients`(`client_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.7'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.7') { - - mysqli_query($mysqli, " - CREATE TABLE `asset_tags` ( - `asset_tag_asset_id` INT(11) NOT NULL, - `asset_tag_tag_id` INT(11) NOT NULL, - PRIMARY KEY (`asset_tag_asset_id`, `asset_tag_tag_id`), - CONSTRAINT `fk_asset` - FOREIGN KEY (`asset_tag_asset_id`) - REFERENCES `assets`(`asset_id`) - ON DELETE CASCADE, - CONSTRAINT `fk_tag` - FOREIGN KEY (`asset_tag_tag_id`) - REFERENCES `tags`(`tag_id`) - ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.8'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.8') { - - mysqli_query($mysqli, " - CREATE TABLE `task_approvals` ( - `approval_id` int(11) NOT NULL AUTO_INCREMENT, - `approval_scope` enum('client','internal') NOT NULL, - `approval_type` enum('any','technical','billing','specific') NOT NULL, - `approval_required_user_id` int(11) DEFAULT NULL, - `approval_status` enum('pending','approved','declined') NOT NULL, - `approval_created_by` int(11) NOT NULL, - `approval_approved_by` varchar(255) DEFAULT NULL, - `approval_url_key` varchar(200) NOT NULL, - `approval_task_id` int(11) NOT NULL, - PRIMARY KEY (`approval_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.3.9'"); - } - - if (CURRENT_DATABASE_VERSION == '2.3.9') { - mysqli_query($mysqli, "ALTER TABLE `clients` ADD `client_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `client_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `location_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `vendors` ADD `vendor_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `vendor_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `software` ADD `software_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `software_notes`"); - - mysqli_query( - $mysqli, - "ALTER TABLE `credentials` - CHANGE `credential_important` `credential_favorite` - TINYINT(1) NOT NULL DEFAULT 0 - AFTER `credential_note`" - ); - - mysqli_query($mysqli, "ALTER TABLE `assets` DROP `asset_important`"); - mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `asset_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `documents` DROP `document_important`"); - mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `document_client_visible`"); - - mysqli_query($mysqli, "ALTER TABLE `racks` ADD `rack_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `rack_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `files` DROP `file_important`"); - mysqli_query($mysqli, "ALTER TABLE `files` ADD `file_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `file_mime_type`"); - - mysqli_query($mysqli, "ALTER TABLE `networks` ADD `network_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `network_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `domain_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `certificates` ADD `certificate_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `certificate_notes`"); - - mysqli_query($mysqli, "ALTER TABLE `services` ADD `service_favorite` TINYINT(1) NOT NULL DEFAULT '0' AFTER `service_notes`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.0'"); - } - - if (CURRENT_DATABASE_VERSION == '2.4.0') { - - mysqli_query($mysqli, " - CREATE TABLE `quote_items` ( - `item_id` int(11) NOT NULL AUTO_INCREMENT, - `item_name` varchar(200) NOT NULL, - `item_description` text DEFAULT NULL, - `item_quantity` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_price` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_subtotal` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_tax` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_total` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_order` int(11) NOT NULL DEFAULT 0, - `item_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `item_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), - `item_archived_at` datetime DEFAULT NULL, - `item_tax_id` int(11) NOT NULL DEFAULT 0, - `item_product_id` int(11) NOT NULL DEFAULT 0, - `item_quote_id` int(11) NOT NULL, - PRIMARY KEY (`item_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - "); - - mysqli_query($mysqli, " - CREATE TABLE `recurring_invoice_items` ( - `item_id` int(11) NOT NULL AUTO_INCREMENT, - `item_name` varchar(200) NOT NULL, - `item_description` text DEFAULT NULL, - `item_quantity` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_price` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_subtotal` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_tax` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_total` decimal(15,2) NOT NULL DEFAULT 0.00, - `item_order` int(11) NOT NULL DEFAULT 0, - `item_created_at` datetime NOT NULL DEFAULT current_timestamp(), - `item_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), - `item_archived_at` datetime DEFAULT NULL, - `item_tax_id` int(11) NOT NULL DEFAULT 0, - `item_product_id` int(11) NOT NULL DEFAULT 0, - `item_recurring_invoice_id` int(11) NOT NULL, - PRIMARY KEY (`item_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.1'"); - } - - if (CURRENT_DATABASE_VERSION == '2.4.1') { - - // Migrate Items - mysqli_query($mysqli, " - INSERT INTO `recurring_invoice_items` ( - `item_name`, - `item_description`, - `item_quantity`, - `item_price`, - `item_subtotal`, - `item_tax`, - `item_total`, - `item_order`, - `item_created_at`, - `item_updated_at`, - `item_archived_at`, - `item_tax_id`, - `item_product_id`, - `item_recurring_invoice_id` - ) - SELECT - `item_name`, - `item_description`, - `item_quantity`, - `item_price`, - `item_subtotal`, - `item_tax`, - `item_total`, - `item_order`, - `item_created_at`, - `item_updated_at`, - `item_archived_at`, - `item_tax_id`, - `item_product_id`, - `item_recurring_invoice_id` - FROM `invoice_items` - WHERE `item_recurring_invoice_id` != 0 - "); - - mysqli_query($mysqli, " - INSERT INTO `quote_items` ( - `item_name`, - `item_description`, - `item_quantity`, - `item_price`, - `item_subtotal`, - `item_tax`, - `item_total`, - `item_order`, - `item_created_at`, - `item_updated_at`, - `item_archived_at`, - `item_tax_id`, - `item_product_id`, - `item_quote_id` - ) - SELECT - `item_name`, - `item_description`, - `item_quantity`, - `item_price`, - `item_subtotal`, - `item_tax`, - `item_total`, - `item_order`, - `item_created_at`, - `item_updated_at`, - `item_archived_at`, - `item_tax_id`, - `item_product_id`, - `item_quote_id` - FROM `invoice_items` - WHERE `item_quote_id` != 0 - "); - - mysqli_query($mysqli, " - DELETE FROM `invoice_items` - WHERE `item_recurring_invoice_id` != 0 - "); - - mysqli_query($mysqli, " - DELETE FROM `invoice_items` - WHERE `item_quote_id` != 0 - "); - - mysqli_query($mysqli, " - ALTER TABLE `invoice_items` - DROP COLUMN `item_quote_id`, - DROP COLUMN `item_recurring_invoice_id` - "); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.2'"); - - } - - if (CURRENT_DATABASE_VERSION == '2.4.2') { - - mysqli_query($mysqli, "ALTER TABLE `categories` ADD `category_description` VARCHAR(255) DEFAULT NULL AFTER `category_name`"); - mysqli_query($mysqli, "ALTER TABLE `categories` ADD `category_order` INT(11) NOT NULL DEFAULT 0 AFTER `category_icon`"); - - // Create network_interfaces - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Ethernet', category_type = 'network_interface', category_order = 1"); // 1 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'SFP', category_type = 'network_interface', category_order = 2"); // 2 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'SFP+', category_type = 'network_interface', category_order = 3"); // 3 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'QSFP28', category_type = 'network_interface', category_order = 4"); // 4 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'QSFP-DD', category_type = 'network_interface', category_order = 5"); // 5 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Coaxial', category_type = 'network_interface', category_order = 6"); // 6 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Fiber', category_type = 'network_interface', category_order = 7"); // 7 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'WiFi', category_type = 'network_interface', category_order = 8"); // 8 - - - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.3'"); - } - - if (CURRENT_DATABASE_VERSION == '2.4.3') { - // Asset Status - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Ready to Deploy', category_description = 'Asset is configured and ready to be assigned', category_type = 'asset_status', category_order = 1"); // 1 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Deployed', category_description = 'Asset is actively in use and assigned to a client or location', category_type = 'asset_status', category_order = 2"); // 2 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Out for Repair', category_description = 'Asset has been sent out for servicing or repair', category_type = 'asset_status', category_order = 3"); // 3 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Lost', category_description = 'Asset location is unknown and cannot be accounted for', category_type = 'asset_status', category_order = 4"); // 4 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Stolen', category_description = 'Asset has been reported stolen', category_type = 'asset_status', category_order = 5"); // 5 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Retired', category_description = 'Asset has been decommissioned and is no longer in service', category_type = 'asset_status', category_order = 6"); // 6 - - // Contact note types - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Call', category_description = 'Phone call with a client or contact', category_icon = 'fa-phone-alt', category_type = 'contact_note_type', category_order = 1"); // 1 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Email', category_description = 'Email correspondence with a client or contact', category_icon = 'fa-envelope', category_type = 'contact_note_type', category_order = 2"); // 2 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Meeting', category_description = 'Scheduled meeting with a client or contact', category_icon = 'fa-handshake', category_type = 'contact_note_type', category_order = 3"); // 3 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'In Person', category_description = 'In person visit or on-site interaction', category_icon = 'fa-people-arrows', category_type = 'contact_note_type', category_order = 4"); // 4 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Note', category_description = 'General note or internal comment', category_icon = 'fa-sticky-note', category_type = 'contact_note_type', category_order = 5"); // 5 - - // Rack Types - mysqli_query($mysqli, "INSERT INTO categories SET category_name = '2-Post Open Frame', category_description = 'Two-post open frame rack for patch panels and lightweight equipment', category_type = 'rack_type', category_order = 1"); // 1 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = '4-Post Open Frame', category_description = 'Four-post open frame rack for servers and heavier equipment', category_type = 'rack_type', category_order = 2"); // 2 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = '4-Post Enclosed Cabinet', category_description = 'Four-post enclosed cabinet with doors and sides for secure equipment housing', category_type = 'rack_type', category_order = 3"); // 3 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Wall-Mount Open', category_description = 'Open frame rack mounted directly to a wall for small deployments', category_type = 'rack_type', category_order = 4"); // 4 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Wall-Mount Enclosed', category_description = 'Enclosed cabinet rack mounted to a wall with a locking door', category_type = 'rack_type', category_order = 5"); // 5 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Other', category_description = 'Rack type does not fit any standard category', category_type = 'rack_type', category_order = 6"); // 6 - - // Software Types - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Software as a Service (SaaS)', category_description = 'Cloud-hosted software accessed via a web browser or API', category_type = 'software_type', category_order = 1"); // 1 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Productivity Suite', category_description = 'Bundled office and collaboration tools such as Microsoft 365 or Google Workspace', category_type = 'software_type', category_order = 2"); // 2 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Web Application', category_description = 'Application hosted on a web server and accessed through a browser', category_type = 'software_type', category_order = 3"); // 3 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Desktop Application', category_description = 'Application installed and run locally on a workstation or laptop', category_type = 'software_type', category_order = 4"); // 4 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Mobile Application', category_description = 'Application installed and run on a mobile device or tablet', category_type = 'software_type', category_order = 5"); // 5 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Security Software', category_description = 'Software providing antivirus, endpoint protection, or security monitoring', category_type = 'software_type', category_order = 6"); // 6 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'System Software', category_description = 'Low-level software managing hardware resources and system operations', category_type = 'software_type', category_order = 7"); // 7 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Operating System', category_description = 'Core software managing hardware and providing a platform for applications', category_type = 'software_type', category_order = 8"); // 8 - mysqli_query($mysqli, "INSERT INTO categories SET category_name = 'Other', category_description = 'Software type does not fit any standard category', category_type = 'software_type', category_order = 9"); // 9 - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.4'"); - - } - - if (CURRENT_DATABASE_VERSION == '2.4.4') { - // Gateway fee expense now uses the actual fee from Stripe's balance transaction - mysqli_query($mysqli, "ALTER TABLE `payment_providers` DROP `payment_provider_expense_percentage_fee`, DROP `payment_provider_expense_flat_fee`"); - - mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.5'"); - } - - // if (CURRENT_DATABASE_VERSION == '2.4.5') { - // // Insert queries here required to update to DB version 2.4.6 - // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.4.6'"); - // } - -} else { - // Up-to-date +} +uksort($database_update_files, "version_compare"); + +// Apply everything newer than the current database version, in order +// (CURRENT_DATABASE_VERSION is a constant frozen at page load, so track progress in a variable) +$database_current_version = CURRENT_DATABASE_VERSION; + +foreach ($database_update_files as $version => $file) { + + if (version_compare($version, $database_current_version, "<=")) { + continue; + } + + try { + require $file; + } catch (Throwable $e) { + // Stop here - config_current_database_version still points at the last + // completed migration, so a re-run resumes at this file + $database_updates_error = "$version: " . $e->getMessage(); + error_log("ITFlow database update to version $version failed: " . $e->getMessage()); + break; + } + + // Migration succeeded - bump the database version + mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '" . escapeSql($version) . "'"); + $database_current_version = $version; + $database_updates_applied[] = $version; } diff --git a/admin/database_updates/2.0.0.php b/admin/database_updates/2.0.0.php new file mode 100644 index 00000000..1c571cab --- /dev/null +++ b/admin/database_updates/2.0.0.php @@ -0,0 +1,184 @@ + 0 AND `document_parent` != `document_id` + "); + + mysqli_query($mysqli, "ALTER TABLE `documents` DROP `document_parent`"); diff --git a/admin/database_updates/2.1.7.php b/admin/database_updates/2.1.7.php new file mode 100644 index 00000000..9f566d6f --- /dev/null +++ b/admin/database_updates/2.1.7.php @@ -0,0 +1,52 @@ + Recurring Invoice -> Client -> Client's Stripe saved method + mysqli_query($mysqli, " + UPDATE recurring_payments rp + INNER JOIN recurring_invoices ri + ON ri.recurring_invoice_id = rp.recurring_payment_recurring_invoice_id + INNER JOIN client_saved_payment_methods spm + ON spm.saved_payment_client_id = ri.recurring_invoice_client_id + AND spm.saved_payment_provider_id = $stripe_provider_id + SET + rp.recurring_payment_method = 'Credit Card', + rp.recurring_payment_saved_payment_id = spm.saved_payment_id + WHERE rp.recurring_payment_method = 'Stripe' + "); diff --git a/admin/database_updates/2.3.1.php b/admin/database_updates/2.3.1.php new file mode 100644 index 00000000..5b0389b5 --- /dev/null +++ b/admin/database_updates/2.3.1.php @@ -0,0 +1,17 @@ +") + ) { + $database_latest_version = $database_file_version; + } +} + +if ($database_latest_version == "0.0.0") { + exit("Error: admin/database_updates/ is missing or empty - the install may be incomplete."); +} + +DEFINE("LATEST_DATABASE_VERSION", $database_latest_version); diff --git a/libs/stripe-php/CHANGELOG.md b/libs/stripe-php/CHANGELOG.md index 381a9365..81cedcc6 100644 --- a/libs/stripe-php/CHANGELOG.md +++ b/libs/stripe-php/CHANGELOG.md @@ -1,4 +1,192 @@ # Changelog + +## 21.0.0 - 2026-07-15 +This release **does not** change the pinned API version. It's still `2026-06-24.dahlia`. + +We're releasing it as a major out of an abundance of caution, but it should be functionally a patch release for most users. See below. + +* [#2097](https://github.com/stripe/stripe-php/pull/2097) ⚠️ Correctly type properties on `ErrorObject` + * the properties of `ErrorObject` were typed as `string` when many of them should have been `null|string`. If you (or your typechecker) were treating these as plain strings, you'll need to be more defensive in your code. + * to be clear: no runtime code has changed, we've just made the types more accurate. We didn't want to break any builds in a patch version, so this is released as a major +* [#2098](https://github.com/stripe/stripe-php/pull/2098) Replace source hash with Telemetry UUID +* [#2095](https://github.com/stripe/stripe-php/pull/2095) Remove unused Retry-After header support + +## 20.3.1 - 2026-07-09 +* [#2093](https://github.com/stripe/stripe-php/pull/2093) Add TStripeObject to iterator PHPDoc comments (fixes [#2091](https://github.com/stripe/stripe-php/issues/2091)) + - Fixed: PHPStan no longer infers iterated Collection values as `mixed`; loop variables are now correctly typed as the collection's generic type parameter + +## 20.3.0 - 2026-06-24 +This release changes the pinned API version to 2026-06-24.dahlia. + +* [#2088](https://github.com/stripe/stripe-php/pull/2088) Update generated code + * Add support for `release_details` on `Reserve.Hold` + * Add support for new value `tax_fund` on enum `BalanceTransaction.type` + * Change `Billing.CreditGrant.priority` to be required + * Add support for `buyer_id` on `Charge.payment_method_details.bizum`, `ConfirmationToken.payment_method_preview.bizum`, `ConfirmationToken.payment_method_preview.blik`, `PaymentAttemptRecord.payment_method_details.bizum`, `PaymentMethod.bizum`, `PaymentMethod.blik`, and `PaymentRecord.payment_method_details.bizum` + * Add support for `transaction_link_id` on `Charge.payment_method_details.card` + * Add support for new value `sui` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network` + * Add support for new value `usdsui` on enums `Charge.payment_method_details.crypto.token_currency`, `PaymentAttemptRecord.payment_method_details.crypto.token_currency`, and `PaymentRecord.payment_method_details.crypto.token_currency` + * Add support for `fingerprint` on `Charge.payment_method_details.pix`, `ConfirmationToken.payment_method_preview.pix`, `PaymentMethod.pix`, and `SetupAttempt.payment_method_details.pix` + * Add support for `sunbit` on `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, and `PaymentIntent.update().$params.payment_method_option` + * Add support for `billing_cycle_anchor_config` on `Checkout\Session.create().$params.subscription_datum` + * Add support for `wechat_pay` on `Checkout.Session.payment_method_options` + * Add support for `mastercard_compliance` on `Dispute.evidence.enhanced_evidence`, `Dispute.evidence_details.enhanced_eligibility`, and `Dispute.update().$params.evidence.enhanced_evidence` + * Add support for new value `mastercard_compliance` on enum `Dispute.enhanced_eligibility_types` + * Add support for `status_details` on `FinancialConnections.Account` + * Add support for new value `validated` on enum `Identity.VerificationSession.redaction.status` + * Add support for new value `satispay` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types` + * ⚠️ Remove support for `stored_credential_usage` on `PaymentAttemptRecord.payment_method_details.card` and `PaymentRecord.payment_method_details.card` + * ⚠️ Change `PaymentAttemptRecord.payment_method_details.card.description` and `PaymentRecord.payment_method_details.card.description` to be optional + * ⚠️ Change `PaymentAttemptRecord.payment_method_details.card.iin` and `PaymentRecord.payment_method_details.card.iin` to be optional + * ⚠️ Change `PaymentAttemptRecord.payment_method_details.card.issuer` and `PaymentRecord.payment_method_details.card.issuer` to be optional + * Add support for `setup_future_usage` on `PaymentIntent.confirm().$params.payment_method_option.satispay`, `PaymentIntent.create().$params.payment_method_option.satispay`, `PaymentIntent.payment_method_options.satispay`, and `PaymentIntent.update().$params.payment_method_option.satispay` + * Change `PaymentRecord.report_refund().$params.refunded` to be optional + * Add support for `satispay` on `SetupAttempt.payment_method_details` + * Add support for `custom_fields`, `description`, and `footer` on `Subscription.create().$params.invoice_setting`, `Subscription.invoice_settings`, and `Subscription.update().$params.invoice_setting` + * Add support for `payment_method_options` and `payment_method` on `Topup.create().$params` + * Add support for `mode` on `V2.Commerce.ProductCatalogImport` + * Add support for new value `promotion` on enum `V2.Commerce.ProductCatalogImport.feed_type` + * Add support for `sunbit_payments` on `V2.Core.Account.configuration.merchant.capabilities`, `V2\Core\Account.create().$params.configuration.merchant.capability`, and `V2\Core\Account.update().$params.configuration.merchant.capability` + * Add support for `crypto_money_manager` and `money_manager` on `V2\Core\Account.update().$params.identity.attestation.terms_of_service` + * ⚠️ Remove support for `crypto_storer` and `storer` on `V2\Core\Account.update().$params.identity.attestation.terms_of_service` + * Add support for new value `sunbit_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` + * Add support for error codes `anomalous_money_movement_request`, `failed_tax_calculation`, `financial_account_balance_does_not_support_currency`, `financial_account_capability_not_enabled`, and `financial_account_capability_restricted` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error` + +## 20.2.1 - 2026-06-12 +* [#2079](https://github.com/stripe/stripe-php/pull/2079) Add "source" field to user-agent header + +## 20.2.0 - 2026-05-27 +This release changes the pinned API version to 2026-05-27.dahlia. + +* [#2072](https://github.com/stripe/stripe-php/pull/2072) Update generated code + * Add support for new resource `V2.Commerce.ProductCatalogImport` + * Add support for `create` and `retrieve` methods on resource `V2.Commerce.ProductCatalogImport` + * Add support for `bizum_payments` and `scalapay_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability` + * Add support for `automatic_transfer_rules_by_currency` on `BalanceSettings.payments.payouts` and `BalanceSettings.update().$params.payment.payout` + * Add support for `start_of_day` on `BalanceSettings.payments.settlement_timing` and `BalanceSettings.update().$params.payment.settlement_timing` + * Add support for `description` on `Charge.create().$params.transfer_datum`, `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum` + * Add support for `bizum` on `Charge.payment_method_details`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `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`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_option` + * Add support for `scalapay` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `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`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `Refund.destination_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_datum` + * Add support for `mandate` on `Charge.payment_method_details.twint`, `PaymentAttemptRecord.payment_method_details.twint`, and `PaymentRecord.payment_method_details.twint` + * Change type of `Checkout\Session.create().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.confirm().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.create().$params.payment_method_option.twint.setup_future_usage`, and `PaymentIntent.update().$params.payment_method_option.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * ⚠️ Change type of `Checkout.Session.payment_method_options.twint.setup_future_usage` and `PaymentIntent.payment_method_options.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type` + * Add support for `credited_items` on `InvoiceItem.proration_details` + * Add support for `discountable` on `Invoice.create_preview().$params.schedule_detail.phase.add_invoice_item`, `Subscription.create().$params.add_invoice_item`, `Subscription.update().$params.add_invoice_item`, `SubscriptionSchedule.create().$params.phase.add_invoice_item`, `SubscriptionSchedule.phases[].add_invoice_items[]`, and `SubscriptionSchedule.update().$params.phase.add_invoice_item` + * Add support for `billing_schedules` on `Invoice.create_preview().$params.subscription_detail`, `Subscription.create().$params`, `Subscription.update().$params`, and `Subscription` + * Add support for `amount_paid_off_stripe` on `Invoice` + * Add support for new value `twint` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types` + * Add support for `twint` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details` + * Add support for `metadata` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, `PaymentIntent.update().$params.transfer_datum`, and `Subscription.pending_update` + * Add support for `payment_data` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum` + * Add support for new values `bizum` and `scalapay` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types` + * Add support for `blik_authorize` on `PaymentIntent.next_action` and `SetupIntent.next_action` + * Add support for `payment_method_options` on `PaymentLink.create().$params`, `PaymentLink.update().$params`, and `PaymentLink` + * Add support for new value `bizum` on enum `PaymentLink.payment_method_types` + * Add support for `active` on `PaymentMethodConfiguration.all().$params` + * Add support for `billed_until` on `SubscriptionItem` + * Add support for `discount` and `discounts` on `Subscription.pending_update` + * Add support for `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on `Terminal.Configuration`, `Terminal\Configuration.create().$params`, and `Terminal\Configuration.update().$params` + * Add support for `api_error` and `print_content` on `Terminal.Reader.action` + * Add support for new value `print_content` on enum `Terminal.Reader.action.type` + * Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader.device_type` + * Add support for `customer` on `TestHelpers\TestClock.create().$params` + * Add support for `signer` on `V2.Core.Account.identity.business_details.documents.proof_of_registration`, `V2.Core.Account.identity.business_details.documents.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_registration`, and `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership` + * Add support for `azure_event_grid` on `V2.Core.EventDestination` and `V2\Core\EventDestination.create().$params` + * Add support for new value `no_azure_partner_topic_exists` on enum `V2.Core.EventDestination.status_details.disabled.reason` + * Add support for new value `azure_event_grid` on enum `V2.Core.EventDestination.type` + * Add support for new value `meter_event_value_too_many_digits` on enums `EventsV1BillingMeterErrorReportTriggeredEvent.reason.error_types[].code` and `EventsV1BillingMeterNoMeterFoundEvent.reason.error_types[].code` + * Add support for event notifications `V2CommerceProductCatalogImportsFailedEvent`, `V2CommerceProductCatalogImportsProcessingEvent`, `V2CommerceProductCatalogImportsSucceededEvent`, and `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` with related object `V2.Commerce.ProductCatalogImport` + * Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError` +* [#2071](https://github.com/stripe/stripe-php/pull/2071) Emit warning when `stripe-notify` header is present in response + +## 20.1.0 - 2026-04-23 +This release changes the pinned API version to 2026-04-22.dahlia. + +* [#2056](https://github.com/stripe/stripe-php/pull/2056) Update generated code + * Add support for `balance_report` and `payout_reconciliation_report` on `AccountSession.components` and `AccountSession.create().$params.component` + * Add support for `app_distribution` and `sunbit_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability` + * Add support for new values `fee_credit_funding`, `inbound_transfer_reversal`, and `inbound_transfer` on enum `BalanceTransaction.type` + * Add support for `sunbit` on `Charge.payment_method_details`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentMethod.create().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_datum` + * Add support for new values `phantom_cash` and `usdt` on enums `Charge.payment_method_details.crypto.token_currency`, `PaymentAttemptRecord.payment_method_details.crypto.token_currency`, and `PaymentRecord.payment_method_details.crypto.token_currency` + * Add support for `location` and `reader` on `Charge.payment_method_details.klarna`, `PaymentAttemptRecord.payment_method_details.klarna`, and `PaymentRecord.payment_method_details.klarna` + * Add support for `mandate` on `Charge.payment_method_details.pix`, `PaymentAttemptRecord.payment_method_details.pix`, and `PaymentRecord.payment_method_details.pix` + * Add support for `managed_payments` on `Checkout.Session`, `Checkout\Session.create().$params`, `PaymentIntent`, `PaymentLink.create().$params`, `PaymentLink`, `SetupIntent`, and `Subscription` + * Add support for `mandate_options` on `Checkout.Session.payment_method_options.pix`, `Checkout\Session.create().$params.payment_method_option.pix`, `PaymentIntent.confirm().$params.payment_method_option.pix`, `PaymentIntent.create().$params.payment_method_option.pix`, `PaymentIntent.payment_method_options.pix`, and `PaymentIntent.update().$params.payment_method_option.pix` + * Change type of `Checkout\Session.create().$params.payment_method_option.pix.setup_future_usage`, `PaymentIntent.confirm().$params.payment_method_option.pix.setup_future_usage`, `PaymentIntent.create().$params.payment_method_option.pix.setup_future_usage`, and `PaymentIntent.update().$params.payment_method_option.pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type` + * ⚠️ Change type of `Checkout.Session.payment_method_options.pix.setup_future_usage` and `PaymentIntent.payment_method_options.pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new value `sunbit` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type` + * Add support for `pix` on `Invoice.create().$params.payment_setting.payment_method_option`, `Invoice.payment_settings.payment_method_options`, `Invoice.update().$params.payment_setting.payment_method_option`, `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_option`, `Subscription.create().$params.payment_setting.payment_method_option`, `Subscription.payment_settings.payment_method_options`, and `Subscription.update().$params.payment_setting.payment_method_option` + * Add support for `upi` on `Invoice.create().$params.payment_setting.payment_method_option`, `Invoice.payment_settings.payment_method_options`, `Invoice.update().$params.payment_setting.payment_method_option`, `Subscription.create().$params.payment_setting.payment_method_option`, `Subscription.payment_settings.payment_method_options`, and `Subscription.update().$params.payment_setting.payment_method_option` + * Add support for new values `pix` and `upi` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types` + * Add support for `card_presence` on `Issuing.Authorization` + * Add support for `allowed_card_presences` and `blocked_card_presences` on `Issuing.Card.spending_controls`, `Issuing.Cardholder.spending_controls`, `Issuing\Card.create().$params.spending_control`, `Issuing\Card.update().$params.spending_control`, `Issuing\Cardholder.create().$params.spending_control`, and `Issuing\Cardholder.update().$params.spending_control` + * Add support for new value `fulfillment_error` on enum `Issuing.Card.cancellation_reason` + * Add support for new value `fulfillment_error` on enum `Issuing.Card.replacement_reason` + * Add support for `amount` and `currency` on `Mandate.multi_use` + * Add support for `amount_to_confirm` on `PaymentIntent.confirm().$params` + * Add support for new value `sunbit` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types` + * Add support for `klarna_display_qr_code` on `PaymentIntent.next_action` + * Add support for new value `sunbit` on enum `PaymentLink.payment_method_types` + * Add support for new values `low`, `not_assessed`, and `unknown` on enum `Radar.PaymentEvaluation.signals.fraudulent_payment.risk_level` + * Add support for new value `account` on enum `Radar.ValueList.item_type` + * Add support for `moto` on `SetupAttempt.payment_method_details.card` + * Add support for `pix_display_qr_code` on `SetupIntent.next_action` + * Add support for error codes `action_blocked` and `approval_required` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError` +* [#2052](https://github.com/stripe/stripe-php/pull/2052) Fix 2D array parameter encoding + - Fixes an issue encoding two-dimensional array request params where the SDK incorrectly flattens the array. + +## 20.0.0 - 2026-03-25 + +This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v20) to simplify your upgrade process. + +Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/dahlia) before upgrading. + +* ⚠️ **Breaking change:** [#2038](https://github.com/stripe/stripe-php/pull/2038) Drop support for PHP < 7.2. This is also the **last major version to support PHP 7.2 and 7.3**. Please upgrade to 7.4+ before September 2026. See the [versioning policy](https://docs.stripe.com/sdks/versioning?lang=php#stripe-sdk-language-version-support-policy) for more information. +* ⚠️ **Breaking change:** [#2042](https://github.com/stripe/stripe-php/pull/2042) Preserve null values in v2 JSON request bodies + - The SDK now preserves and sends `null` when set in V2 API metadata and params, enabling you to clear metadata entries and some unsettable properties for V2 APIs. + - ⚠️ The `Util::objectsToIds()` method now has a required `$serializeNull` parameter to indicate if null values set in the object should be output in the resulting hash. This is relevant for V2 POST APIs to let callers clear emptyable values. +* [#1917](https://github.com/stripe/stripe-php/pull/1917) Avoid using func_get_args +* [#2011](https://github.com/stripe/stripe-php/pull/2011) Ensure that `previous_attributes` is always an instance of `StripeObject` +* [#2033](https://github.com/stripe/stripe-php/pull/2033) Add runtime support for V2 int64 string-encoded fields + +### ⚠️ Breaking changes due to changes in the Stripe API + +* [#2041](https://github.com/stripe/stripe-php/pull/2041) ⚠️ Throw an error when using the wrong webhook parsing method +* Generated changes from [#2046](https://github.com/stripe/stripe-php/pull/2046), [#2044](https://github.com/stripe/stripe-php/pull/2044), [#2025](https://github.com/stripe/stripe-php/pull/2025) + * Add support for `upi_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability` + * Add support for `upi` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `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`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_option` + * Add support for new value `tempo` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network` + * Add support for `integration_identifier` on `Checkout.Session` and `Checkout\Session.create().$params` + * Add support for `crypto` on `Checkout\Session.create().$params.payment_method_option` + * Add support for `pending_invoice_item_interval` on `Checkout\Session.create().$params.subscription_datum` + * Add support for new values `elements`, `embedded_page`, `form`, and `hosted_page` on enum `Checkout.Session.ui_mode` + * Add support for new value `marine_carbon_removal` on enum `Climate.Supplier.removal_pathway` + * Add support for new value `upi` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type` + * Add support for `metadata` on `CreditNote.create().$params.line`, `CreditNote.preview().$params.line`, `CreditNote.preview_lines().$params.line`, and `CreditNoteLineItem` + * Add support for `quantity_decimal` on `Invoice.add_lines().$params.line`, `Invoice.create_preview().$params.invoice_item`, `Invoice.update_lines().$params.line`, `InvoiceItem.create().$params`, `InvoiceItem.update().$params`, `InvoiceItem`, `InvoiceLineItem.update().$params`, and `InvoiceLineItem` + * ⚠️ Add support for `level` on `Issuing\Authorization.create().$params.risk_assessment.card_testing_risk` and `Issuing\Authorization.create().$params.risk_assessment.merchant_dispute_risk` + * ⚠️ Remove support for `risk_level` on `Issuing\Authorization.create().$params.risk_assessment.card_testing_risk` and `Issuing\Authorization.create().$params.risk_assessment.merchant_dispute_risk` + * Add support for `lifecycle_controls` on `Issuing.Card` and `Issuing\Card.create().$params` + * ⚠️ Change type of `Issuing.Token.network_data.visa.card_reference_id` from `string` to `nullable(string)` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.brand` and `PaymentRecord.payment_method_details.card.brand` from `enum` to `nullable(enum)` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.exp_month` and `PaymentRecord.payment_method_details.card.exp_month` from `longInteger` to `nullable(longInteger)` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.exp_year` and `PaymentRecord.payment_method_details.card.exp_year` from `longInteger` to `nullable(longInteger)` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.funding` and `PaymentRecord.payment_method_details.card.funding` from `enum('credit'|'debit'|'prepaid'|'unknown')` to `nullable(enum('credit'|'debit'|'prepaid'|'unknown'))` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.last4` and `PaymentRecord.payment_method_details.card.last4` from `string` to `nullable(string)` + * ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.moto` and `PaymentRecord.payment_method_details.card.moto` from `boolean` to `nullable(boolean)` + * Add support for `cryptogram`, `electronic_commerce_indicator`, `exemption_indicator_applied`, and `exemption_indicator` on `PaymentAttemptRecord.payment_method_details.card.three_d_secure` and `PaymentRecord.payment_method_details.card.three_d_secure` + * Add support for new value `upi` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types` + * Add support for `upi_handle_redirect_or_display_qr_code` on `PaymentIntent.next_action` and `SetupIntent.next_action` + * Add support for new value `upi` on enum `PaymentLink.payment_method_types` + * Add support for `recommended_action` and `signals` on `Radar.PaymentEvaluation` + * ⚠️ Remove support for `insights` on `Radar.PaymentEvaluation` + * Add support for new value `crypto_fingerprint` on enum `Radar.ValueList.item_type` + * Add support for new value `canceled_by_retention_policy` on enum `Subscription.cancellation_details.reason` + * ⚠️ Change type of `V2.Core.EventDestination.events_from` from `enum('other_accounts'|'self')` to `string` + * Add support for error code `service_period_coupon_with_metered_tiered_item_unsupported` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError` + ## 19.4.1 - 2026-03-06 * [#2024](https://github.com/stripe/stripe-php/pull/2024) Add Stripe-Request-Trigger header * [#2022](https://github.com/stripe/stripe-php/pull/2022) Add agent information to UserAgent diff --git a/libs/stripe-php/CODEGEN_VERSION b/libs/stripe-php/CODEGEN_VERSION index 17557a68..983636f7 100644 --- a/libs/stripe-php/CODEGEN_VERSION +++ b/libs/stripe-php/CODEGEN_VERSION @@ -1 +1 @@ -e65e48569f6dfad2d5f1b58018017856520c3ae6 \ No newline at end of file +6012b623b1c09ad54d466947da04511a042ee45a \ No newline at end of file diff --git a/libs/stripe-php/OPENAPI_VERSION b/libs/stripe-php/OPENAPI_VERSION index 58dae793..83c68c9d 100644 --- a/libs/stripe-php/OPENAPI_VERSION +++ b/libs/stripe-php/OPENAPI_VERSION @@ -1 +1 @@ -v2186 \ No newline at end of file +v2324 \ No newline at end of file diff --git a/libs/stripe-php/README.md b/libs/stripe-php/README.md index b582cab9..bac46c51 100644 --- a/libs/stripe-php/README.md +++ b/libs/stripe-php/README.md @@ -5,6 +5,9 @@ [![Total Downloads](https://poser.pugx.org/stripe/stripe-php/downloads.svg)](https://packagist.org/packages/stripe/stripe-php) [![License](https://poser.pugx.org/stripe/stripe-php/license.svg)](https://packagist.org/packages/stripe/stripe-php) +> [!TIP] +> Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/php). + The Stripe PHP library provides convenient access to the Stripe API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API @@ -13,9 +16,9 @@ API. ## Requirements -PHP 5.6.0 and later. +PHP 7.2.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. +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 7.2 and 7.3 will be removed soon, so upgrade your runtime if you're able to. Additional PHP versions will be dropped in future major versions, so upgrade to supported versions if possible. @@ -45,9 +48,9 @@ require_once '/path/to/stripe-php/init.php'; The bindings require the following extensions in order to work properly: -- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer -- [`json`](https://secure.php.net/manual/en/book.json.php) -- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String) +- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer +- [`json`](https://secure.php.net/manual/en/book.json.php) +- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String) If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available. @@ -206,7 +209,7 @@ You can disable this behavior if you prefer: ### How to use undocumented parameters and properties In some cases, you might encounter parameters on an API request or fields on an API response that aren’t available in the SDKs. -This might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK. +This might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK. See [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=php#undocumented-params-and-fields) to send those parameters or access those fields. ### Public Preview SDKs @@ -231,7 +234,7 @@ Stripe::addBetaVersion("feature_beta", "v3"); ### 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`. 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`. Note that access to specific private preview API features may require separate approval. ### Custom requests @@ -261,6 +264,9 @@ New features and bug fixes are released on the latest major version of the Strip ## Development +> [!WARNING] +> External contributions to this repo from first-time contributors are currently on hiatus. If you'd like to see a change made to the package, please open an issue. + [Contribution guidelines for this project](CONTRIBUTING.md) We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`. diff --git a/libs/stripe-php/VERSION b/libs/stripe-php/VERSION index ab73a550..fb5b5130 100644 --- a/libs/stripe-php/VERSION +++ b/libs/stripe-php/VERSION @@ -1 +1 @@ -19.4.1 +21.0.0 diff --git a/libs/stripe-php/composer.json b/libs/stripe-php/composer.json index 5bf2d54b..754d5511 100644 --- a/libs/stripe-php/composer.json +++ b/libs/stripe-php/composer.json @@ -15,20 +15,23 @@ } ], "require": { - "php": ">=5.6.0", + "php": ">=7.2.0", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^9.0", + "phpunit/phpunit": "^8.0 || ^9.0", "friendsofphp/php-cs-fixer": "3.94.0", "phpstan/phpstan": "^1.2" }, "autoload": { "psr-4": { "Stripe\\": "lib/" - } + }, + "files": [ + "lib/version_check.php" + ] }, "autoload-dev": { "psr-4": { @@ -42,12 +45,5 @@ "branch-alias": { "dev-master": "2.0-dev" } - }, - "config": { - "audit": { - "ignore": { - "PKSA-z3gr-8qht-p93v": "PHPUnit is only a dev dependency. Temporarily ignore PHPUnit security advisory to ensure continued support for PHP 5.6 in CI." - } - } } } diff --git a/libs/stripe-php/init.php b/libs/stripe-php/init.php index c809874e..01a3aed9 100644 --- a/libs/stripe-php/init.php +++ b/libs/stripe-php/init.php @@ -1,5 +1,7 @@ Accounts v2 API, in place of /v1/accounts and /v1/customers to represent a user. + * * This is an object representing a Stripe account. You can retrieve it to see * properties on the account like its current requirements or if the account is * enabled to make live charges or receive payouts. @@ -22,7 +24,7 @@ namespace Stripe; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|(object{annual_revenue?: null|(object{amount: null|int, currency: null|string, fiscal_year_end: null|string}&StripeObject), estimated_worker_count?: null|int, mcc: null|string, minority_owned_business_designation: null|string[], monthly_estimated_revenue?: (object{amount: int, currency: string}&StripeObject), name: null|string, product_description?: null|string, support_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), support_email: null|string, support_phone: null|string, support_url: null|string, url: null|string}&StripeObject) $business_profile Business information about the account. * @property null|string $business_type The business type. - * @property null|(object{acss_debit_payments?: string, affirm_payments?: string, afterpay_clearpay_payments?: string, alma_payments?: string, amazon_pay_payments?: string, au_becs_debit_payments?: string, bacs_debit_payments?: string, bancontact_payments?: string, bank_transfer_payments?: string, billie_payments?: string, blik_payments?: string, boleto_payments?: string, card_issuing?: string, card_payments?: string, cartes_bancaires_payments?: string, cashapp_payments?: string, crypto_payments?: string, eps_payments?: string, fpx_payments?: string, gb_bank_transfer_payments?: string, giropay_payments?: string, grabpay_payments?: string, ideal_payments?: string, india_international_payments?: string, jcb_payments?: string, jp_bank_transfer_payments?: string, kakao_pay_payments?: string, klarna_payments?: string, konbini_payments?: string, kr_card_payments?: string, legacy_payments?: string, link_payments?: string, mb_way_payments?: string, mobilepay_payments?: string, multibanco_payments?: string, mx_bank_transfer_payments?: string, naver_pay_payments?: string, nz_bank_account_becs_debit_payments?: string, oxxo_payments?: string, p24_payments?: string, pay_by_bank_payments?: string, payco_payments?: string, paynow_payments?: string, payto_payments?: string, pix_payments?: string, promptpay_payments?: string, revolut_pay_payments?: string, samsung_pay_payments?: string, satispay_payments?: string, sepa_bank_transfer_payments?: string, sepa_debit_payments?: string, sofort_payments?: string, swish_payments?: string, tax_reporting_us_1099_k?: string, tax_reporting_us_1099_misc?: string, transfers?: string, treasury?: string, twint_payments?: string, us_bank_account_ach_payments?: string, us_bank_transfer_payments?: string, zip_payments?: string}&StripeObject) $capabilities + * @property null|(object{acss_debit_payments?: string, affirm_payments?: string, afterpay_clearpay_payments?: string, alma_payments?: string, amazon_pay_payments?: string, app_distribution?: string, au_becs_debit_payments?: string, bacs_debit_payments?: string, bancontact_payments?: string, bank_transfer_payments?: string, billie_payments?: string, bizum_payments?: string, blik_payments?: string, boleto_payments?: string, card_issuing?: string, card_payments?: string, cartes_bancaires_payments?: string, cashapp_payments?: string, crypto_payments?: string, eps_payments?: string, fpx_payments?: string, gb_bank_transfer_payments?: string, giropay_payments?: string, grabpay_payments?: string, ideal_payments?: string, india_international_payments?: string, jcb_payments?: string, jp_bank_transfer_payments?: string, kakao_pay_payments?: string, klarna_payments?: string, konbini_payments?: string, kr_card_payments?: string, legacy_payments?: string, link_payments?: string, mb_way_payments?: string, mobilepay_payments?: string, multibanco_payments?: string, mx_bank_transfer_payments?: string, naver_pay_payments?: string, nz_bank_account_becs_debit_payments?: string, oxxo_payments?: string, p24_payments?: string, pay_by_bank_payments?: string, payco_payments?: string, paynow_payments?: string, payto_payments?: string, pix_payments?: string, promptpay_payments?: string, revolut_pay_payments?: string, samsung_pay_payments?: string, satispay_payments?: string, scalapay_payments?: string, sepa_bank_transfer_payments?: string, sepa_debit_payments?: string, sofort_payments?: string, sunbit_payments?: string, swish_payments?: string, tax_reporting_us_1099_k?: string, tax_reporting_us_1099_misc?: string, transfers?: string, treasury?: string, twint_payments?: string, upi_payments?: string, us_bank_account_ach_payments?: string, us_bank_transfer_payments?: string, zip_payments?: string}&StripeObject) $capabilities * @property null|bool $charges_enabled Whether the account can process charges. * @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), address_kana?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string, town: null|string}&StripeObject), address_kanji?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string, town: null|string}&StripeObject), directors_provided?: bool, directorship_declaration?: null|(object{date: null|int, ip: null|string, user_agent: null|string}&StripeObject), executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: null|string, name_kana?: null|string, name_kanji?: null|string, owners_provided?: bool, ownership_declaration?: null|(object{date: null|int, ip: null|string, user_agent: null|string}&StripeObject), ownership_exemption_reason?: string, phone?: null|string, registration_date?: (object{day: null|int, month: null|int, year: null|int}&StripeObject), representative_declaration?: null|(object{date: null|int, ip: null|string, user_agent: null|string}&StripeObject), structure?: string, tax_id_provided?: bool, tax_id_registrar?: string, vat_id_provided?: bool, verification?: null|(object{document: (object{back: null|File|string, details: null|string, details_code: null|string, front: null|File|string}&StripeObject)}&StripeObject)}&StripeObject) $company * @property null|(object{fees?: (object{payer: string}&StripeObject), is_controller?: bool, losses?: (object{payments: string}&StripeObject), requirement_collection?: string, stripe_dashboard?: (object{type: string}&StripeObject), type: string}&StripeObject) $controller @@ -71,7 +73,7 @@ class Account extends ApiResource * information during account onboarding. You can prefill any information on the * account. * - * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params + * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, app_distribution?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, bizum_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, scalapay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, sunbit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, upi_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params * @param null|array|string $options * * @return Account the created resource @@ -162,7 +164,7 @@ class Account extends ApiResource * more about updating accounts. * * @param string $id the ID of the resource to update - * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params + * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, app_distribution?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, bizum_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, scalapay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, sunbit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, upi_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params * @param null|array|string $opts * * @return Account the updated resource diff --git a/libs/stripe-php/lib/AccountSession.php b/libs/stripe-php/lib/AccountSession.php index 5222c5b6..45542f03 100644 --- a/libs/stripe-php/lib/AccountSession.php +++ b/libs/stripe-php/lib/AccountSession.php @@ -16,9 +16,9 @@ namespace Stripe; * @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 $client_secret

The client secret of this AccountSession. Used on the client to set up secure access to the given account.

The client secret can be used to provide access to account 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.

Refer to our docs to setup Connect embedded components and learn about how client_secret should be handled.

- * @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 (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 int $expires_at The timestamp at which this AccountSession will expire. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class AccountSession extends ApiResource { @@ -28,7 +28,7 @@ class AccountSession extends ApiResource * 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. * - * @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{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|string $options * * @return AccountSession the created resource diff --git a/libs/stripe-php/lib/ApiRequestor.php b/libs/stripe-php/lib/ApiRequestor.php index 6bf85474..f7d24b91 100644 --- a/libs/stripe-php/lib/ApiRequestor.php +++ b/libs/stripe-php/lib/ApiRequestor.php @@ -134,6 +134,7 @@ class ApiRequestor $headers = $headers ?: []; list($rbody, $rcode, $rheaders, $myApiKey) = $this->_requestRaw($method, $url, $params, $headers, $apiMode, $usage, $maxNetworkRetries); + $this->_maybeEmitStripeNotice($rheaders); $json = $this->_interpretResponse($rbody, $rcode, $rheaders, $apiMode); $resp = new ApiResponse($rbody, $rcode, $rheaders, $json); @@ -158,6 +159,7 @@ class ApiRequestor $headers = $headers ?: []; list($rbody, $rcode, $rheaders, $myApiKey) = $this->_requestRawStreaming($method, $url, $params, $headers, $apiMode, $usage, $readBodyChunkCallable, $maxNetworkRetries); + $this->_maybeEmitStripeNotice($rheaders); if ($rcode >= 300) { $this->_interpretResponse($rbody, $rcode, $rheaders, $apiMode); } @@ -270,6 +272,16 @@ class ApiRequestor return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); // switchCases: The beginning of the section generated from our OpenAPI spec + case 'rate_limit': + return Exception\RateLimitException::factory( + $msg, + $rcode, + $rbody, + $resp, + $rheaders, + $code + ); + case 'temporary_session_expired': return Exception\TemporarySessionExpiredException::factory( $msg, @@ -385,6 +397,7 @@ class ApiRequestor ['CODEX_CI', 'codex_cli'], ['CURSOR_AGENT', 'cursor'], ['GEMINI_CLI', 'gemini_cli'], + ['OPENCLAW_SHELL', 'openclaw'], ['OPENCODE', 'open_code'], // aiAgents: The end of the section generated from our OpenAPI spec ]; @@ -419,18 +432,26 @@ class ApiRequestor $uaString = "Stripe/{$apiMode} PhpBindings/" . Stripe::VERSION; $langVersion = \PHP_VERSION; - $uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname'); - $uname = $uname_disabled ? '(disabled)' : \php_uname(); // Fallback to global configuration to maintain backwards compatibility. $appInfo = $appInfo ?: Stripe::getAppInfo(); + $ua = [ 'bindings_version' => Stripe::VERSION, 'lang' => 'php', 'lang_version' => $langVersion, - 'publisher' => 'stripe', - 'uname' => $uname, ]; + if (Stripe::getEnableTelemetry()) { + $telemetryId = TelemetryId::get(); + if (null !== $telemetryId) { + $ua['telemetry_id'] = $telemetryId; + } + $uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname'); + $ua['platform'] = $uname_disabled + ? '(disabled)' + // only get general platform information, e.g. `Darwin 25.3.0 arm64` + : \php_uname('s') . ' ' . \php_uname('r') . ' ' . \php_uname('m'); + } if ($clientInfo) { $ua = \array_merge($clientInfo, $ua); } @@ -543,6 +564,13 @@ class ApiRequestor return [$absUrl, $rawHeaders, $params, $hasFile, $myApiKey]; } + private function _maybeEmitStripeNotice($rheaders) + { + if (isset($rheaders['stripe-notice']) && \is_string($rheaders['stripe-notice'])) { + \trigger_error($rheaders['stripe-notice'], \E_USER_WARNING); + } + } + /** * @param 'delete'|'get'|'post' $method * @param string $url diff --git a/libs/stripe-php/lib/ApplePayDomain.php b/libs/stripe-php/lib/ApplePayDomain.php index 0aa38422..da2c0964 100644 --- a/libs/stripe-php/lib/ApplePayDomain.php +++ b/libs/stripe-php/lib/ApplePayDomain.php @@ -9,7 +9,7 @@ namespace Stripe; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $domain_name - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class ApplePayDomain extends ApiResource { diff --git a/libs/stripe-php/lib/ApplicationFee.php b/libs/stripe-php/lib/ApplicationFee.php index 32db7913..ac0241e7 100644 --- a/libs/stripe-php/lib/ApplicationFee.php +++ b/libs/stripe-php/lib/ApplicationFee.php @@ -16,7 +16,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|(object{charge?: string, payout?: string, type: string}&StripeObject) $fee_source Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|Charge|string $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. * @property Collection $refunds A list of refunds that have been applied to the fee. diff --git a/libs/stripe-php/lib/Apps/Secret.php b/libs/stripe-php/lib/Apps/Secret.php index 98ace562..1f746d01 100644 --- a/libs/stripe-php/lib/Apps/Secret.php +++ b/libs/stripe-php/lib/Apps/Secret.php @@ -20,7 +20,7 @@ namespace Stripe\Apps; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|bool $deleted If true, indicates that this secret has been deleted * @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $name A name for the secret that's unique within the scope. * @property null|string $payload The plaintext secret value to be stored. * @property (object{type: string, user?: string}&\Stripe\StripeObject) $scope diff --git a/libs/stripe-php/lib/Balance.php b/libs/stripe-php/lib/Balance.php index ef488325..3292ffc7 100644 --- a/libs/stripe-php/lib/Balance.php +++ b/libs/stripe-php/lib/Balance.php @@ -17,7 +17,7 @@ namespace Stripe; * @property null|(object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $connect_reserved Funds held due to negative balances on connected accounts where account.controller.requirement_collection is application, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the source_types property. * @property null|(object{amount: int, currency: string, net_available?: (object{amount: int, destination: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[], source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $instant_available Funds that you can pay out using Instant Payouts. * @property null|(object{available: (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[]}&StripeObject) $issuing - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $pending Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the source_types property. * @property null|(object{available: (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[], pending: (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[]}&StripeObject) $refund_and_dispute_prefunding */ diff --git a/libs/stripe-php/lib/BalanceSettings.php b/libs/stripe-php/lib/BalanceSettings.php index 72c07d65..c13d2942 100644 --- a/libs/stripe-php/lib/BalanceSettings.php +++ b/libs/stripe-php/lib/BalanceSettings.php @@ -8,7 +8,7 @@ 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 + * @property (object{debit_negative_balances: null|bool, payouts: null|(object{automatic_transfer_rules_by_currency: null|StripeObject, 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, start_of_day: null|(object{hour: int, minutes: int, timezone: string}&StripeObject)}&StripeObject)}&StripeObject) $payments */ class BalanceSettings extends SingletonApiResource { @@ -40,7 +40,7 @@ class BalanceSettings extends SingletonApiResource * href="/connect/authentication">Making API calls for connected accounts. * * @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, 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{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{automatic_transfer_rules_by_currency?: null|array, minimum_balance_by_currency?: null|array, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_timing?: array{delay_days_override?: null|int, start_of_day?: null|array{hour?: int, minutes?: int, timezone?: string}}}} $params * @param null|array|string $opts * * @return BalanceSettings the updated resource diff --git a/libs/stripe-php/lib/BalanceTransaction.php b/libs/stripe-php/lib/BalanceTransaction.php index d7419ed6..4d550c2e 100644 --- a/libs/stripe-php/lib/BalanceTransaction.php +++ b/libs/stripe-php/lib/BalanceTransaction.php @@ -25,7 +25,7 @@ namespace Stripe; * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. * @property null|ApplicationFee|ApplicationFeeRefund|Charge|ConnectCollectionTransfer|CustomerCashBalanceTransaction|Dispute|Issuing\Authorization|Issuing\Dispute|Issuing\Transaction|Payout|Refund|ReserveTransaction|string|TaxDeductedAtSource|Topup|Transfer|TransferReversal $source This transaction relates to the Stripe object. * @property string $status The transaction's net funds status in the Stripe balance, which are either available or pending. - * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, payout_minimum_balance_hold, payout_minimum_balance_release, refund, refund_failure, reserve_transaction, reserved_funds, reserve_hold, reserve_release, stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, stripe_balance_payment_debit_reversal, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead. + * @property string $type Transaction type: tax_fund, adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, inbound_transfer, inbound_transfer_reversal, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, payout_minimum_balance_hold, payout_minimum_balance_release, refund, refund_failure, reserve_transaction, reserved_funds, reserve_hold, reserve_release, stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, stripe_balance_payment_debit_reversal, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, transfer_refund, or fee_credit_funding. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead. */ class BalanceTransaction extends ApiResource { @@ -47,6 +47,9 @@ class BalanceTransaction extends ApiResource const TYPE_CLIMATE_ORDER_REFUND = 'climate_order_refund'; const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer'; const TYPE_CONTRIBUTION = 'contribution'; + const TYPE_FEE_CREDIT_FUNDING = 'fee_credit_funding'; + const TYPE_INBOUND_TRANSFER = 'inbound_transfer'; + const TYPE_INBOUND_TRANSFER_REVERSAL = 'inbound_transfer_reversal'; const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; const TYPE_ISSUING_DISPUTE = 'issuing_dispute'; @@ -76,6 +79,7 @@ class BalanceTransaction extends ApiResource const TYPE_STRIPE_FEE = 'stripe_fee'; const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; const TYPE_TAX_FEE = 'tax_fee'; + const TYPE_TAX_FUND = 'tax_fund'; const TYPE_TOPUP = 'topup'; const TYPE_TOPUP_REVERSAL = 'topup_reversal'; const TYPE_TRANSFER = 'transfer'; @@ -85,11 +89,11 @@ class BalanceTransaction extends ApiResource /** * Returns a list of transactions that have contributed to the Stripe account - * balance (e.g., charges, transfers, and so forth). The transactions are returned - * in sorted order, with the most recent transactions appearing first. + * balance (for example, charges, transfers, and so on). The transactions return in + * sorted order, with the most recent transactions appearing first. * - * Note that this endpoint was previously called “Balance history” and used the - * path /v1/balance/history. + * The previous name of this endpoint was “Balance history,” and it used the path + * /v1/balance/history. * * @param null|array{created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, payout?: string, source?: string, starting_after?: string, type?: string} $params * @param null|array|string $opts diff --git a/libs/stripe-php/lib/Billing/Alert.php b/libs/stripe-php/lib/Billing/Alert.php index 49fe58a0..9e54cf3a 100644 --- a/libs/stripe-php/lib/Billing/Alert.php +++ b/libs/stripe-php/lib/Billing/Alert.php @@ -10,7 +10,7 @@ namespace Stripe\Billing; * @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 $alert_type Defines the type of the alert. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $status Status of the alert. This can be active, inactive or archived. * @property string $title Title of the alert. * @property null|(object{filters: null|((object{customer: null|string|\Stripe\Customer, type: string}&\Stripe\StripeObject))[], gte: int, meter: Meter|string, recurrence: string}&\Stripe\StripeObject) $usage_threshold Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. diff --git a/libs/stripe-php/lib/Billing/AlertTriggered.php b/libs/stripe-php/lib/Billing/AlertTriggered.php index 8641dd38..b73f0b28 100644 --- a/libs/stripe-php/lib/Billing/AlertTriggered.php +++ b/libs/stripe-php/lib/Billing/AlertTriggered.php @@ -9,7 +9,7 @@ namespace Stripe\Billing; * @property Alert $alert A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $customer ID of customer for which the alert triggered - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $value The value triggering the alert */ class AlertTriggered extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/Billing/CreditBalanceSummary.php b/libs/stripe-php/lib/Billing/CreditBalanceSummary.php index e767650e..2801352e 100644 --- a/libs/stripe-php/lib/Billing/CreditBalanceSummary.php +++ b/libs/stripe-php/lib/Billing/CreditBalanceSummary.php @@ -11,7 +11,7 @@ namespace Stripe\Billing; * @property ((object{available_balance: (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ledger_balance: (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject))[] $balances The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. * @property string|\Stripe\Customer $customer The customer the balance is for. * @property null|string $customer_account The account the balance is for. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class CreditBalanceSummary extends \Stripe\SingletonApiResource { diff --git a/libs/stripe-php/lib/Billing/CreditBalanceTransaction.php b/libs/stripe-php/lib/Billing/CreditBalanceTransaction.php index 2d3be6f7..ddb7696f 100644 --- a/libs/stripe-php/lib/Billing/CreditBalanceTransaction.php +++ b/libs/stripe-php/lib/Billing/CreditBalanceTransaction.php @@ -14,7 +14,7 @@ namespace Stripe\Billing; * @property CreditGrant|string $credit_grant The credit grant associated with this credit balance transaction. * @property null|(object{amount: (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), credits_applied: null|(object{invoice: string|\Stripe\Invoice, invoice_line_item: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $debit Debit details for this credit balance transaction. Only present if type is debit. * @property int $effective_at The effective time of this credit balance transaction. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit balance transaction belongs to. * @property null|string $type The type of credit balance transaction (credit or debit). */ diff --git a/libs/stripe-php/lib/Billing/CreditGrant.php b/libs/stripe-php/lib/Billing/CreditGrant.php index 5d1f2add..881099d8 100644 --- a/libs/stripe-php/lib/Billing/CreditGrant.php +++ b/libs/stripe-php/lib/Billing/CreditGrant.php @@ -19,7 +19,7 @@ namespace Stripe\Billing; * @property null|string $customer_account ID of the account representing the customer receiving the billing credits * @property null|int $effective_at The time when the billing credits become effective-when they're eligible for use. * @property null|int $expires_at The time when the billing credits expire. If not present, the billing credits don't expire. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name A descriptive name shown in dashboard. * @property null|int $priority The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. diff --git a/libs/stripe-php/lib/Billing/Meter.php b/libs/stripe-php/lib/Billing/Meter.php index c5465856..21f30dee 100644 --- a/libs/stripe-php/lib/Billing/Meter.php +++ b/libs/stripe-php/lib/Billing/Meter.php @@ -17,7 +17,7 @@ namespace Stripe\Billing; * @property string $display_name The meter's name. * @property string $event_name The name of the meter event to record usage for. Corresponds with the event_name field on meter events. * @property null|string $event_time_window The time window which meter events have been pre-aggregated for, if any. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status The meter's status. * @property (object{deactivated_at: null|int}&\Stripe\StripeObject) $status_transitions * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. diff --git a/libs/stripe-php/lib/Billing/MeterEvent.php b/libs/stripe-php/lib/Billing/MeterEvent.php index 96c19184..e12a69dc 100644 --- a/libs/stripe-php/lib/Billing/MeterEvent.php +++ b/libs/stripe-php/lib/Billing/MeterEvent.php @@ -11,7 +11,7 @@ namespace Stripe\Billing; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $event_name The name of the meter event. Corresponds with the event_name field on a meter. * @property string $identifier A unique identifier for the event. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $payload The payload of the event. This contains the fields corresponding to a meter's customer_mapping.event_payload_key (default is stripe_customer_id) and value_settings.event_payload_key (default is value). Read more about the payload. * @property int $timestamp The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. */ diff --git a/libs/stripe-php/lib/Billing/MeterEventAdjustment.php b/libs/stripe-php/lib/Billing/MeterEventAdjustment.php index a6742b46..842ed597 100644 --- a/libs/stripe-php/lib/Billing/MeterEventAdjustment.php +++ b/libs/stripe-php/lib/Billing/MeterEventAdjustment.php @@ -10,7 +10,7 @@ namespace Stripe\Billing; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|(object{identifier: null|string}&\Stripe\StripeObject) $cancel Specifies which event to cancel. * @property string $event_name The name of the meter event. Corresponds with the event_name field on a meter. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status The meter event adjustment's status. * @property string $type Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. */ diff --git a/libs/stripe-php/lib/Billing/MeterEventSummary.php b/libs/stripe-php/lib/Billing/MeterEventSummary.php index 008525a6..0ab36c90 100644 --- a/libs/stripe-php/lib/Billing/MeterEventSummary.php +++ b/libs/stripe-php/lib/Billing/MeterEventSummary.php @@ -14,7 +14,7 @@ namespace Stripe\Billing; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property float $aggregated_value Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via default_aggregation. * @property int $end_time End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $meter The meter associated with this event summary. * @property int $start_time Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. */ diff --git a/libs/stripe-php/lib/BillingPortal/Configuration.php b/libs/stripe-php/lib/BillingPortal/Configuration.php index 4cc47d33..fb90e434 100644 --- a/libs/stripe-php/lib/BillingPortal/Configuration.php +++ b/libs/stripe-php/lib/BillingPortal/Configuration.php @@ -16,7 +16,7 @@ namespace Stripe\BillingPortal; * @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 overriden 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, payment_method_configuration: null|string}&\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{billing_cycle_anchor: null|string, 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 true, 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 true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property (object{enabled: bool, url: null|string}&\Stripe\StripeObject) $login_page * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name The name of the configuration. diff --git a/libs/stripe-php/lib/BillingPortal/Session.php b/libs/stripe-php/lib/BillingPortal/Session.php index b833a6e2..8be7a3d6 100644 --- a/libs/stripe-php/lib/BillingPortal/Session.php +++ b/libs/stripe-php/lib/BillingPortal/Session.php @@ -27,7 +27,7 @@ namespace Stripe\BillingPortal; * @property string $customer The ID of the customer for this session. * @property null|string $customer_account The ID of the account for this session. * @property null|(object{after_completion: (object{hosted_confirmation: null|(object{custom_message: null|string}&\Stripe\StripeObject), redirect: null|(object{return_url: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription_cancel: null|(object{retention: null|(object{coupon_offer: null|(object{coupon: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription: string}&\Stripe\StripeObject), subscription_update: null|(object{subscription: string}&\Stripe\StripeObject), subscription_update_confirm: null|(object{discounts: null|((object{coupon: null|string, promotion_code: null|string}&\Stripe\StripeObject))[], items: ((object{id: null|string, price: null|string, quantity?: int}&\Stripe\StripeObject))[], subscription: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $flow Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used. * @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays. * @property null|string $return_url The URL to redirect customers to when they click on the portal's link to return to your website. diff --git a/libs/stripe-php/lib/CashBalance.php b/libs/stripe-php/lib/CashBalance.php index fd0cbfe2..a9261494 100644 --- a/libs/stripe-php/lib/CashBalance.php +++ b/libs/stripe-php/lib/CashBalance.php @@ -11,7 +11,7 @@ namespace Stripe; * @property null|StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit. * @property string $customer The ID of the customer whose cash balance this object represents. * @property null|string $customer_account The ID of an Account representing a customer whose cash balance this object represents. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property (object{reconciliation_mode: string, using_merchant_default: bool}&StripeObject) $settings */ class CashBalance extends ApiResource diff --git a/libs/stripe-php/lib/Charge.php b/libs/stripe-php/lib/Charge.php index 73a86547..02bdd15e 100644 --- a/libs/stripe-php/lib/Charge.php +++ b/libs/stripe-php/lib/Charge.php @@ -32,14 +32,14 @@ namespace Stripe; * @property null|string $failure_message Message to user further explaining reason for charge failure if available. * @property null|(object{stripe_report?: string, user_report?: string}&StripeObject) $fraud_details Information on fraud assessments for the charge. * @property null|(object{customer_reference?: string, line_items: ((object{discount_amount: null|int, product_code: string, product_description: string, quantity: null|int, tax_amount: null|int, unit_cost: null|int}&StripeObject))[], merchant_reference: string, shipping_address_zip?: string, shipping_amount?: int, shipping_from_zip?: string}&StripeObject) $level3 - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|Account|string $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details. * @property null|(object{advice_code: null|string, network_advice_code: null|string, network_decline_code: null|string, network_status: null|string, reason: null|string, risk_level?: string, risk_score?: int, rule?: (object{action: string, id: string, predicate: string}&StripeObject)|string, seller_message: null|string, type: string}&StripeObject) $outcome Details about whether the payment was accepted, and why. See understanding declines for details. * @property bool $paid true if the charge succeeded, or was successfully authorized for later capture. * @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent associated with this charge, if one exists. * @property null|string $payment_method ID of the payment method used in this charge. - * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), card?: (object{amount_authorized: null|int, authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&StripeObject), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&StripeObject), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&StripeObject), network: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&StripeObject), regulated_status: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied?: bool, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{}&StripeObject), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Details about the payment method at the time of the transaction. + * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), card?: (object{amount_authorized: null|int, authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&StripeObject), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&StripeObject), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&StripeObject), network: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&StripeObject), regulated_status: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied?: bool, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), transaction_link_id: null|string, wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, fingerprint?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Details about the payment method at the time of the transaction. * @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details * @property null|(object{session?: string}&StripeObject) $radar_options Options to configure Radar. See Radar Session for more information. * @property null|string $receipt_email This is the email address that the receipt for this charge was sent to. @@ -75,7 +75,7 @@ class Charge extends ApiResource * payment instead. Confirmation of the PaymentIntent creates the * Charge object used to request payment. * - * @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|array, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string} $params + * @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|array, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, destination: string}, transfer_group?: string} $params * @param null|array|string $options * * @return Charge the created resource diff --git a/libs/stripe-php/lib/Checkout/Session.php b/libs/stripe-php/lib/Checkout/Session.php index 9a405abd..f5c1f54e 100644 --- a/libs/stripe-php/lib/Checkout/Session.php +++ b/libs/stripe-php/lib/Checkout/Session.php @@ -32,7 +32,7 @@ namespace Stripe\Checkout; * @property null|(object{background_color: string, border_style: string, button_color: string, display_name: string, font_family: string, icon: null|(object{file?: string, type: string, url?: string}&\Stripe\StripeObject), logo: null|(object{file?: string, type: string, url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $branding_settings * @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. - * @property null|string $client_secret The client secret of your Checkout Session. Applies to Checkout Sessions with ui_mode: embedded or ui_mode: custom. For ui_mode: embedded, the client secret is to be used when initializing Stripe.js embedded checkout. For ui_mode: custom, use the client secret with initCheckout on your front end. + * @property null|string $client_secret The client secret of your Checkout Session. Applies to Checkout Sessions with ui_mode: embedded_page or ui_mode: elements. For ui_mode: embedded_page, the client secret is to be used when initializing Stripe.js embedded checkout. For ui_mode: elements, use the client secret with initCheckout on your front end. * @property null|(object{business_name: null|string, individual_name: null|string, shipping_details: 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), name: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $collected_information Information about the customer collected within the Checkout Session. * @property null|(object{promotions: null|string, terms_of_service: null|string}&\Stripe\StripeObject) $consent Results of consent_collection for this session. * @property null|(object{payment_method_reuse_agreement: null|(object{position: string}&\Stripe\StripeObject), promotions: null|string, terms_of_service: null|string}&\Stripe\StripeObject) $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers. @@ -49,11 +49,13 @@ namespace Stripe\Checkout; * @property null|((object{coupon: null|string|\Stripe\Coupon, promotion_code: null|string|\Stripe\PromotionCode}&\Stripe\StripeObject))[] $discounts List of coupons and promotion codes attached to the Checkout Session. * @property null|string[] $excluded_payment_method_types A list of the types of payment methods (e.g., card) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the Stripe Dashboard. * @property int $expires_at The timestamp at which the Checkout Session will expire. + * @property null|string $integration_identifier The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the same integration identifier. * @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists. * @property null|(object{enabled: bool, invoice_data: (object{account_tax_ids: null|(string|\Stripe\TaxId)[], custom_fields: null|(object{name: string, value: string}&\Stripe\StripeObject)[], description: null|string, footer: null|string, issuer: null|(object{account?: string|\Stripe\Account, type: string}&\Stripe\StripeObject), metadata: null|\Stripe\StripeObject, rendering_options: null|(object{amount_tax_display: null|string, template: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $invoice_creation Details on the state of invoice creation for the Checkout Session. * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used. + * @property null|(object{enabled: bool}&\Stripe\StripeObject) $managed_payments Settings for Managed Payments for this Checkout Session and resulting PaymentIntents, Invoices, and Subscriptions. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $mode The mode of the Checkout Session. * @property null|(object{business?: (object{enabled: bool, optional: bool}&\Stripe\StripeObject), individual?: (object{enabled: bool, optional: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject) $name_collection @@ -63,15 +65,15 @@ namespace Stripe\Checkout; * @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. Defaults to always. * @property null|(object{id: string, parent: null|string}&\Stripe\StripeObject) $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods. - * @property null|(object{acss_debit?: (object{currency?: string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), affirm?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), afterpay_clearpay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), alma?: (object{capture_method?: string}&\Stripe\StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject), billie?: (object{capture_method?: string}&\Stripe\StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), card?: (object{capture_method?: string, installments?: (object{enabled?: bool}&\Stripe\StripeObject), request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: string, restrictions?: (object{brands_blocked?: string[]}&\Stripe\StripeObject), setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), klarna?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), link?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject), payco?: (object{capture_method?: string}&\Stripe\StripeObject), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string}&\Stripe\StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, setup_future_usage?: string}&\Stripe\StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject), satispay?: (object{capture_method?: string}&\Stripe\StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject), swish?: (object{reference: null|string}&\Stripe\StripeObject), twint?: (object{setup_future_usage?: string}&\Stripe\StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&\Stripe\StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + * @property null|(object{acss_debit?: (object{currency?: string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), affirm?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), afterpay_clearpay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), alma?: (object{capture_method?: string}&\Stripe\StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject), billie?: (object{capture_method?: string}&\Stripe\StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), card?: (object{capture_method?: string, installments?: (object{enabled?: bool}&\Stripe\StripeObject), request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: string, restrictions?: (object{brands_blocked?: string[]}&\Stripe\StripeObject), setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), klarna?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), link?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject), payco?: (object{capture_method?: string}&\Stripe\StripeObject), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string}&\Stripe\StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject), satispay?: (object{capture_method?: string}&\Stripe\StripeObject), scalapay?: (object{capture_method?: string}&\Stripe\StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject), sunbit?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), swish?: (object{reference: null|string}&\Stripe\StripeObject), twint?: (object{setup_future_usage?: string}&\Stripe\StripeObject), upi?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&\Stripe\StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. * @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order. * @property null|(object{update_shipping_details: null|string}&\Stripe\StripeObject) $permissions

This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.

For specific permissions, please refer to their dedicated subsections, such as permissions.update_shipping_details.

* @property null|(object{enabled: bool}&\Stripe\StripeObject) $phone_number_collection * @property null|(object{presentment_amount: int, presentment_currency: string}&\Stripe\StripeObject) $presentment_details * @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow. - * @property null|string $redirect_on_completion This parameter applies to ui_mode: embedded. Learn more about the redirect behavior of embedded sessions. Defaults to always. - * @property null|string $return_url Applies to Checkout Sessions with ui_mode: embedded or ui_mode: custom. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * @property null|string $redirect_on_completion This parameter applies to ui_mode: embedded_page. Learn more about the redirect behavior of embedded sessions. Defaults to always. + * @property null|string $return_url Applies to Checkout Sessions with ui_mode: embedded_page or ui_mode: elements. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. * @property null|(object{allow_redisplay_filters: null|string[], payment_method_remove: null|string, payment_method_save: null|string}&\Stripe\StripeObject) $saved_payment_method_options Controls saved payment method settings for the session. Only available in payment and subscription mode. * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, expire the Checkout Session instead. * @property null|(object{allowed_countries: string[]}&\Stripe\StripeObject) $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer. @@ -83,8 +85,8 @@ namespace Stripe\Checkout; * @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. * @property null|(object{enabled: bool, required: string}&\Stripe\StripeObject) $tax_id_collection * @property null|(object{amount_discount: int, amount_shipping: null|int, amount_tax: int, breakdown?: (object{discounts: (object{amount: int, discount: \Stripe\Discount}&\Stripe\StripeObject)[], taxes: ((object{amount: int, rate: \Stripe\TaxRate, taxability_reason: null|string, taxable_amount: null|int}&\Stripe\StripeObject))[]}&\Stripe\StripeObject)}&\Stripe\StripeObject) $total_details Tax and discount details for the computed total amount. - * @property null|string $ui_mode The UI mode of the Session. Defaults to hosted. - * @property null|string $url The URL to the Checkout Session. Applies to Checkout Sessions with ui_mode: hosted. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active. + * @property null|string $ui_mode The UI mode of the Session. Defaults to hosted_page. + * @property null|string $url The URL to the Checkout Session. Applies to Checkout Sessions with ui_mode: hosted_page. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active. * @property null|(object{link?: (object{display?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $wallet_options Wallet-specific configuration for this Checkout Session. */ class Session extends \Stripe\ApiResource @@ -127,14 +129,15 @@ class Session extends \Stripe\ApiResource const SUBMIT_TYPE_PAY = 'pay'; const SUBMIT_TYPE_SUBSCRIBE = 'subscribe'; - const UI_MODE_CUSTOM = 'custom'; - const UI_MODE_EMBEDDED = 'embedded'; - const UI_MODE_HOSTED = 'hosted'; + const UI_MODE_ELEMENTS = 'elements'; + const UI_MODE_EMBEDDED_PAGE = 'embedded_page'; + const UI_MODE_FORM = 'form'; + const UI_MODE_HOSTED_PAGE = 'hosted_page'; /** * Creates a Checkout Session object. * - * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: string}}, cancel_url?: string, client_reference_id?: 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?: string, customer_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], excluded_payment_method_types?: string[], expand?: string[], expires_at?: int, 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?: array, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: array, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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, tax_rates?: string[]}[], locale?: string, metadata?: array, mode?: string, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], origin_context?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: array, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, 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}, setup_future_usage?: string, target_date?: string, verification_method?: string}, affirm?: array{capture_method?: string, setup_future_usage?: string}, afterpay_clearpay?: array{capture_method?: string, setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, alma?: array{capture_method?: string}, amazon_pay?: array{capture_method?: string, setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string, target_date?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, bancontact?: array{setup_future_usage?: string}, billie?: array{capture_method?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{capture_method?: string, installments?: array{enabled?: bool}, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{capture_method?: string, setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, demo_pay?: array{setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{capture_method?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{capture_method?: string, setup_future_usage?: string}, mobilepay?: array{capture_method?: string, setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}, setup_future_usage?: string}, pix?: array{amount_includes_iof?: string, expires_after_seconds?: int, setup_future_usage?: string}, revolut_pay?: array{capture_method?: string, setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, satispay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, twint?: array{setup_future_usage?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, target_date?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update_shipping_details?: string}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_remove?: string, payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: array, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string, wallet_options?: array{link?: array{display?: string}}} $params + * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: string}}, cancel_url?: string, client_reference_id?: 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?: string, customer_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], excluded_payment_method_types?: string[], expand?: string[], expires_at?: int, integration_identifier?: 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?: array, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: array, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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, tax_rates?: string[]}[], locale?: string, managed_payments?: array{enabled?: bool}, metadata?: array, mode?: string, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], origin_context?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: array, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, 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}, setup_future_usage?: string, target_date?: string, verification_method?: string}, affirm?: array{capture_method?: string, setup_future_usage?: string}, afterpay_clearpay?: array{capture_method?: string, setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, alma?: array{capture_method?: string}, amazon_pay?: array{capture_method?: string, setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string, target_date?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, bancontact?: array{setup_future_usage?: string}, billie?: array{capture_method?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{capture_method?: string, installments?: array{enabled?: bool}, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{capture_method?: string, setup_future_usage?: string}, crypto?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, demo_pay?: array{setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{capture_method?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{capture_method?: string, setup_future_usage?: string}, mobilepay?: array{capture_method?: string, setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}, setup_future_usage?: string}, pix?: array{amount_includes_iof?: string, expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, revolut_pay?: array{capture_method?: string, setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, satispay?: array{capture_method?: string}, scalapay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, sofort?: array{setup_future_usage?: string}, sunbit?: array{capture_method?: string, setup_future_usage?: string}, swish?: array{reference?: string}, twint?: array{setup_future_usage?: string}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, target_date?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update_shipping_details?: string}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_remove?: string, payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: array, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, 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}, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array, on_behalf_of?: string, pending_invoice_item_interval?: array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string, wallet_options?: array{link?: array{display?: string}}} $params * @param null|array|string $options * * @return Session the created resource diff --git a/libs/stripe-php/lib/Climate/Supplier.php b/libs/stripe-php/lib/Climate/Supplier.php index 02044540..8fe52c2f 100644 --- a/libs/stripe-php/lib/Climate/Supplier.php +++ b/libs/stripe-php/lib/Climate/Supplier.php @@ -22,6 +22,7 @@ class Supplier extends \Stripe\ApiResource const REMOVAL_PATHWAY_BIOMASS_CARBON_REMOVAL_AND_STORAGE = 'biomass_carbon_removal_and_storage'; const REMOVAL_PATHWAY_DIRECT_AIR_CAPTURE = 'direct_air_capture'; const REMOVAL_PATHWAY_ENHANCED_WEATHERING = 'enhanced_weathering'; + const REMOVAL_PATHWAY_MARINE_CARBON_REMOVAL = 'marine_carbon_removal'; /** * Lists all available Climate supplier objects. diff --git a/libs/stripe-php/lib/Collection.php b/libs/stripe-php/lib/Collection.php index b8c1d4bd..b17c1b31 100644 --- a/libs/stripe-php/lib/Collection.php +++ b/libs/stripe-php/lib/Collection.php @@ -147,7 +147,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate } /** - * @return \ArrayIterator an iterator that can be used to iterate + * @return \ArrayIterator an iterator that can be used to iterate * across objects in the current page */ #[\ReturnTypeWillChange] @@ -157,7 +157,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate } /** - * @return \ArrayIterator an iterator that can be used to iterate + * @return \ArrayIterator an iterator that can be used to iterate * backwards across objects in the current page */ public function getReverseIterator() diff --git a/libs/stripe-php/lib/ConfirmationToken.php b/libs/stripe-php/lib/ConfirmationToken.php index 94c5f6f3..645b9588 100644 --- a/libs/stripe-php/lib/ConfirmationToken.php +++ b/libs/stripe-php/lib/ConfirmationToken.php @@ -17,11 +17,11 @@ namespace Stripe; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|int $expires_at Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{customer_acceptance: (object{online: null|(object{ip_address: null|string, user_agent: null|string}&StripeObject), type: string}&StripeObject)}&StripeObject) $mandate_data Data used for generating a Mandate. * @property null|string $payment_intent ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. * @property null|(object{card: null|(object{cvc_token: null|string, installments?: (object{plan?: (object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this ConfirmationToken. - * @property null|(object{acss_debit?: (object{bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, transit_number: null|string}&StripeObject), affirm?: (object{}&StripeObject), afterpay_clearpay?: (object{}&StripeObject), alipay?: (object{}&StripeObject), allow_redisplay?: string, alma?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string}&StripeObject), bacs_debit?: (object{fingerprint: null|string, last4: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{}&StripeObject), billie?: (object{}&StripeObject), billing_details: (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&StripeObject), blik?: (object{}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), card?: (object{brand: string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, generated_from: null|(object{charge: null|string, payment_method_details: null|(object{card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), type: string}&StripeObject), setup_attempt: null|SetupAttempt|string}&StripeObject), iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), regulated_status: null|string, three_d_secure_usage: null|(object{supported: bool}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), card_present?: (object{brand: null|string, brand_product: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), preferred_locales: null|string[], read_method: null|string, wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&StripeObject), crypto?: (object{}&StripeObject), customer: null|Customer|string, customer_account: null|string, customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string}&StripeObject), giropay?: (object{}&StripeObject), grabpay?: (object{}&StripeObject), ideal?: (object{bank: null|string, bic: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), preferred_locales: null|string[], read_method: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&StripeObject)}&StripeObject), konbini?: (object{}&StripeObject), kr_card?: (object{brand: null|string, last4: null|string}&StripeObject), link?: (object{email: null|string, persistent_token?: string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{}&StripeObject), multibanco?: (object{}&StripeObject), naver_pay?: (object{buyer_id: null|string, funding: string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{}&StripeObject), p24?: (object{bank: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{}&StripeObject), paynow?: (object{}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, pay_id: null|string}&StripeObject), pix?: (object{}&StripeObject), promptpay?: (object{}&StripeObject), revolut_pay?: (object{}&StripeObject), samsung_pay?: (object{}&StripeObject), satispay?: (object{}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, generated_from: null|(object{charge: null|Charge|string, setup_attempt: null|SetupAttempt|string}&StripeObject), last4: null|string}&StripeObject), sofort?: (object{country: null|string}&StripeObject), swish?: (object{}&StripeObject), twint?: (object{}&StripeObject), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, financial_connections_account: null|string, fingerprint: null|string, last4: null|string, networks: null|(object{preferred: null|string, supported: string[]}&StripeObject), routing_number: null|string, status_details: null|(object{blocked?: (object{network_code: null|string, reason: null|string}&StripeObject)}&StripeObject)}&StripeObject), wechat_pay?: (object{}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_preview Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + * @property null|(object{acss_debit?: (object{bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, transit_number: null|string}&StripeObject), affirm?: (object{}&StripeObject), afterpay_clearpay?: (object{}&StripeObject), alipay?: (object{}&StripeObject), allow_redisplay?: string, alma?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string}&StripeObject), bacs_debit?: (object{fingerprint: null|string, last4: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{}&StripeObject), billie?: (object{}&StripeObject), billing_details: (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&StripeObject), bizum?: (object{buyer_id?: null|string}&StripeObject), blik?: (object{buyer_id?: null|string}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), card?: (object{brand: string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, generated_from: null|(object{charge: null|string, payment_method_details: null|(object{card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), type: string}&StripeObject), setup_attempt: null|SetupAttempt|string}&StripeObject), iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), regulated_status: null|string, three_d_secure_usage: null|(object{supported: bool}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), card_present?: (object{brand: null|string, brand_product: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), preferred_locales: null|string[], read_method: null|string, wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&StripeObject), crypto?: (object{}&StripeObject), customer: null|Customer|string, customer_account: null|string, customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string}&StripeObject), giropay?: (object{}&StripeObject), grabpay?: (object{}&StripeObject), ideal?: (object{bank: null|string, bic: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), preferred_locales: null|string[], read_method: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&StripeObject)}&StripeObject), konbini?: (object{}&StripeObject), kr_card?: (object{brand: null|string, last4: null|string}&StripeObject), link?: (object{email: null|string, persistent_token?: string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{}&StripeObject), multibanco?: (object{}&StripeObject), naver_pay?: (object{buyer_id: null|string, funding: string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{}&StripeObject), p24?: (object{bank: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{}&StripeObject), paynow?: (object{}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, pay_id: null|string}&StripeObject), pix?: (object{fingerprint?: null|string}&StripeObject), promptpay?: (object{}&StripeObject), revolut_pay?: (object{}&StripeObject), samsung_pay?: (object{}&StripeObject), satispay?: (object{}&StripeObject), scalapay?: (object{}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, generated_from: null|(object{charge: null|Charge|string, setup_attempt: null|SetupAttempt|string}&StripeObject), last4: null|string}&StripeObject), sofort?: (object{country: null|string}&StripeObject), sunbit?: (object{}&StripeObject), swish?: (object{}&StripeObject), twint?: (object{}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, financial_connections_account: null|string, fingerprint: null|string, last4: null|string, networks: null|(object{preferred: null|string, supported: string[]}&StripeObject), routing_number: null|string, status_details: null|(object{blocked?: (object{network_code: null|string, reason: null|string}&StripeObject)}&StripeObject)}&StripeObject), wechat_pay?: (object{}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_preview Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. * @property null|string $return_url Return URL used to confirm the Intent. * @property null|string $setup_future_usage

Indicates that you intend to make future payments with this ConfirmationToken's payment method.

The presence of this property will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.

* @property null|string $setup_intent ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. diff --git a/libs/stripe-php/lib/ConnectCollectionTransfer.php b/libs/stripe-php/lib/ConnectCollectionTransfer.php index 837547a2..15a7d706 100644 --- a/libs/stripe-php/lib/ConnectCollectionTransfer.php +++ b/libs/stripe-php/lib/ConnectCollectionTransfer.php @@ -10,7 +10,7 @@ namespace Stripe; * @property int $amount Amount transferred, in cents (or local equivalent). * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property Account|string $destination ID of the account that funds are being collected for. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class ConnectCollectionTransfer extends ApiResource { diff --git a/libs/stripe-php/lib/Coupon.php b/libs/stripe-php/lib/Coupon.php index 52051cf6..6071cf69 100644 --- a/libs/stripe-php/lib/Coupon.php +++ b/libs/stripe-php/lib/Coupon.php @@ -7,7 +7,7 @@ namespace Stripe; /** * 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 subscriptions, invoices, - * checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents. + * checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents. * * @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. @@ -18,7 +18,7 @@ namespace Stripe; * @property null|StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. * @property string $duration One of forever, once, or repeating. Describes how long a customer who applies this coupon will get the discount. * @property null|int $duration_in_months If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts. diff --git a/libs/stripe-php/lib/CreditNote.php b/libs/stripe-php/lib/CreditNote.php index 8606c640..397477d2 100644 --- a/libs/stripe-php/lib/CreditNote.php +++ b/libs/stripe-php/lib/CreditNote.php @@ -23,7 +23,7 @@ namespace Stripe; * @property null|int $effective_at The date when this credit note is in effect. Same as created unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. * @property Invoice|string $invoice ID of the invoice. * @property Collection $lines Line items that make up the credit note - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $memo Customer-facing text that appears on the credit note PDF. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. @@ -86,7 +86,13 @@ class CreditNote extends ApiResource * post_payment_credit_notes_amount, or both, depending on the * invoice’s amount_remaining 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, 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 + * For invoices that also have refunds created through the Refund API, the credit note API subtracts those + * refund amounts from the maximum creditable amount. This prevents the combined + * credit notes and refunds from exceeding the invoice amount. If you use both, + * ensure the combined total does not exceed the invoice’s paid amount. + * + * @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, metadata?: array, 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, 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 * * @return CreditNote the created resource diff --git a/libs/stripe-php/lib/CreditNoteLineItem.php b/libs/stripe-php/lib/CreditNoteLineItem.php index 10b2d3d6..00be8ee6 100644 --- a/libs/stripe-php/lib/CreditNoteLineItem.php +++ b/libs/stripe-php/lib/CreditNoteLineItem.php @@ -14,7 +14,8 @@ namespace Stripe; * @property int $discount_amount The integer amount in cents (or local equivalent) representing the discount being credited for this line item. * @property ((object{amount: int, discount: Discount|string}&StripeObject))[] $discount_amounts The amount of discount calculated per discount for this line item * @property null|string $invoice_line_item ID of the invoice line item being credited - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @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 this line item. * @property null|int $quantity The number of units of product being credited. * @property TaxRate[] $tax_rates The tax rates which apply to the line item. diff --git a/libs/stripe-php/lib/Customer.php b/libs/stripe-php/lib/Customer.php index 5c95bcd7..8aa80002 100644 --- a/libs/stripe-php/lib/Customer.php +++ b/libs/stripe-php/lib/Customer.php @@ -26,7 +26,7 @@ namespace Stripe; * @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|(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 bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name The customer's full name or business name. * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. diff --git a/libs/stripe-php/lib/CustomerBalanceTransaction.php b/libs/stripe-php/lib/CustomerBalanceTransaction.php index 667d6507..c5924a46 100644 --- a/libs/stripe-php/lib/CustomerBalanceTransaction.php +++ b/libs/stripe-php/lib/CustomerBalanceTransaction.php @@ -24,7 +24,7 @@ namespace Stripe; * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property int $ending_balance The customer's balance after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. * @property null|Invoice|string $invoice The ID of the invoice (if any) related to the transaction. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $type Transaction type: adjustment, applied_to_invoice, credit_note, initial, invoice_overpaid, invoice_too_large, invoice_too_small, unspent_receiver_credit, unapplied_from_invoice, checkout_session_subscription_payment, or checkout_session_subscription_payment_canceled. See the Customer Balance page to learn more about transaction types. */ diff --git a/libs/stripe-php/lib/CustomerCashBalanceTransaction.php b/libs/stripe-php/lib/CustomerCashBalanceTransaction.php index 57102426..4241f4a9 100644 --- a/libs/stripe-php/lib/CustomerCashBalanceTransaction.php +++ b/libs/stripe-php/lib/CustomerCashBalanceTransaction.php @@ -20,7 +20,7 @@ namespace Stripe; * @property null|string $customer_account The ID of an Account representing a customer whose available cash balance changed as a result of this transaction. * @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit. * @property null|(object{bank_transfer: (object{eu_bank_transfer?: (object{bic: null|string, iban_last4: null|string, sender_name: null|string}&StripeObject), gb_bank_transfer?: (object{account_number_last4: null|string, sender_name: null|string, sort_code: null|string}&StripeObject), jp_bank_transfer?: (object{sender_bank: null|string, sender_branch: null|string, sender_name: null|string}&StripeObject), reference: null|string, type: string, us_bank_transfer?: (object{network?: string, sender_name: null|string}&StripeObject)}&StripeObject)}&StripeObject) $funded - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $net_amount The amount by which the cash balance changed, represented in the smallest currency unit. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. * @property null|(object{refund: Refund|string}&StripeObject) $refunded_from_payment * @property null|(object{balance_transaction: BalanceTransaction|string}&StripeObject) $transferred_to_balance diff --git a/libs/stripe-php/lib/CustomerSession.php b/libs/stripe-php/lib/CustomerSession.php index 999b91f8..c37d5f37 100644 --- a/libs/stripe-php/lib/CustomerSession.php +++ b/libs/stripe-php/lib/CustomerSession.php @@ -19,7 +19,7 @@ namespace Stripe; * @property Customer|string $customer The Customer the Customer Session was created for. * @property null|string $customer_account The Account that the Customer Session was created for. * @property int $expires_at The timestamp at which this Customer Session will expire. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class CustomerSession extends ApiResource { diff --git a/libs/stripe-php/lib/Discount.php b/libs/stripe-php/lib/Discount.php index adc689e8..42220dfc 100644 --- a/libs/stripe-php/lib/Discount.php +++ b/libs/stripe-php/lib/Discount.php @@ -10,9 +10,9 @@ namespace Stripe; * * Related guide: Applying discounts to subscriptions * - * @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array. + * @property string $id The ID of the discount object. Discounts can't be fetched by ID. Use expand[]=discounts 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 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. Not present for subscription mode. * @property null|Customer|string $customer The ID of the customer associated with this discount. * @property null|string $customer_account The ID of the account representing the customer associated with this discount. * @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. diff --git a/libs/stripe-php/lib/Dispute.php b/libs/stripe-php/lib/Dispute.php index d0a3474a..88edd1dd 100644 --- a/libs/stripe-php/lib/Dispute.php +++ b/libs/stripe-php/lib/Dispute.php @@ -19,10 +19,10 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string[] $enhanced_eligibility_types List of eligibility types that are included in enhanced_evidence. - * @property (object{access_activity_log: null|string, billing_address: null|string, cancellation_policy: null|File|string, cancellation_policy_disclosure: null|string, cancellation_rebuttal: null|string, customer_communication: null|File|string, customer_email_address: null|string, customer_name: null|string, customer_purchase_ip: null|string, customer_signature: null|File|string, duplicate_charge_documentation: null|File|string, duplicate_charge_explanation: null|string, duplicate_charge_id: null|string, enhanced_evidence: (object{visa_compelling_evidence_3?: (object{disputed_transaction: null|(object{customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, merchandise_or_services: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), prior_undisputed_transactions: ((object{charge: string, customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject))[]}&StripeObject), visa_compliance?: (object{fee_acknowledged: bool}&StripeObject)}&StripeObject), product_description: null|string, receipt: null|File|string, refund_policy: null|File|string, refund_policy_disclosure: null|string, refund_refusal_explanation: null|string, service_date: null|string, service_documentation: null|File|string, shipping_address: null|string, shipping_carrier: null|string, shipping_date: null|string, shipping_documentation: null|File|string, shipping_tracking_number: null|string, uncategorized_file: null|File|string, uncategorized_text: null|string}&StripeObject) $evidence - * @property (object{due_by: null|int, enhanced_eligibility: (object{visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int}&StripeObject) $evidence_details + * @property (object{access_activity_log: null|string, billing_address: null|string, cancellation_policy: null|File|string, cancellation_policy_disclosure: null|string, cancellation_rebuttal: null|string, customer_communication: null|File|string, customer_email_address: null|string, customer_name: null|string, customer_purchase_ip: null|string, customer_signature: null|File|string, duplicate_charge_documentation: null|File|string, duplicate_charge_explanation: null|string, duplicate_charge_id: null|string, enhanced_evidence: (object{mastercard_compliance?: (object{fee_acknowledged: bool}&StripeObject), visa_compelling_evidence_3?: (object{disputed_transaction: null|(object{customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, merchandise_or_services: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), prior_undisputed_transactions: ((object{charge: string, customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject))[]}&StripeObject), visa_compliance?: (object{fee_acknowledged: bool}&StripeObject)}&StripeObject), product_description: null|string, receipt: null|File|string, refund_policy: null|File|string, refund_policy_disclosure: null|string, refund_refusal_explanation: null|string, service_date: null|string, service_documentation: null|File|string, shipping_address: null|string, shipping_carrier: null|string, shipping_date: null|string, shipping_documentation: null|File|string, shipping_tracking_number: null|string, uncategorized_file: null|File|string, uncategorized_text: null|string}&StripeObject) $evidence + * @property (object{due_by: null|int, enhanced_eligibility: (object{mastercard_compliance?: (object{status: string}&StripeObject), visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int}&StripeObject) $evidence_details * @property bool $is_charge_refundable If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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|PaymentIntent|string $payment_intent ID of the PaymentIntent that's disputed. @@ -108,7 +108,7 @@ class Dispute extends ApiResource * see our guide to dispute types. * * @param string $id the ID of the resource to update - * @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|array, submit?: bool} $params + * @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{mastercard_compliance?: array{fee_acknowledged?: bool}, visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|array, submit?: bool} $params * @param null|array|string $opts * * @return Dispute the updated resource diff --git a/libs/stripe-php/lib/Entitlements/ActiveEntitlement.php b/libs/stripe-php/lib/Entitlements/ActiveEntitlement.php index 16bc27b0..5c936f17 100644 --- a/libs/stripe-php/lib/Entitlements/ActiveEntitlement.php +++ b/libs/stripe-php/lib/Entitlements/ActiveEntitlement.php @@ -10,7 +10,7 @@ namespace Stripe\Entitlements; * @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 Feature|string $feature The Feature that the customer is entitled to. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters. */ class ActiveEntitlement extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php b/libs/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php index cfa368e4..f5bede7f 100644 --- a/libs/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php +++ b/libs/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php @@ -10,7 +10,7 @@ namespace Stripe\Entitlements; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property string $customer The customer that is entitled to this feature. * @property \Stripe\Collection $entitlements The list of entitlements this customer has. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class ActiveEntitlementSummary extends \Stripe\ApiResource { diff --git a/libs/stripe-php/lib/Entitlements/Feature.php b/libs/stripe-php/lib/Entitlements/Feature.php index 61b49a26..a7036c20 100644 --- a/libs/stripe-php/lib/Entitlements/Feature.php +++ b/libs/stripe-php/lib/Entitlements/Feature.php @@ -11,7 +11,7 @@ namespace Stripe\Entitlements; * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property bool $active Inactive features cannot be attached to new products and will not be returned from the features list endpoint. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $name The feature's name, for your own purpose, not meant to be displayable to the customer. diff --git a/libs/stripe-php/lib/EphemeralKey.php b/libs/stripe-php/lib/EphemeralKey.php index cd78fe6f..b7e97507 100644 --- a/libs/stripe-php/lib/EphemeralKey.php +++ b/libs/stripe-php/lib/EphemeralKey.php @@ -9,7 +9,7 @@ namespace Stripe; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $secret The key's secret. You can use this value to make authorized requests to the Stripe API. */ class EphemeralKey extends ApiResource diff --git a/libs/stripe-php/lib/ErrorObject.php b/libs/stripe-php/lib/ErrorObject.php index fd2305f2..9e5dc59a 100644 --- a/libs/stripe-php/lib/ErrorObject.php +++ b/libs/stripe-php/lib/ErrorObject.php @@ -5,35 +5,26 @@ namespace Stripe; /** * Class ErrorObject. * - * @property string $charge For card errors, the ID of the failed charge. - * @property string $code For some errors that could be handled - * programmatically, a short string indicating the error code reported. - * @property string $decline_code For card errors resulting from a card issuer - * decline, a short string indicating the card issuer's reason for the - * decline if they provide one. - * @property string $doc_url A URL to more information about the error code - * reported. - * @property string $message A human-readable message providing more details - * about the error. For card errors, these messages can be shown to your - * users. - * @property string $param If the error is parameter-specific, the parameter - * related to the error. For example, you can use this to display a message - * near the correct form field. - * @property PaymentIntent $payment_intent The PaymentIntent object for errors - * returned on a request involving a PaymentIntent. - * @property PaymentMethod $payment_method The PaymentMethod object for errors - * returned on a request involving a PaymentMethod. - * @property string $payment_method_type If the error is specific to the type - * of payment method, the payment method type that had a problem. This - * field is only populated for invoice-related errors. - * @property string $request_log_url A URL to the request log entry in your - * dashboard. - * @property SetupIntent $setup_intent The SetupIntent object for errors - * returned on a request involving a SetupIntent. - * @property StripeObject $source The source object for errors returned on a - * request involving a source. - * @property string $type The type of error returned. One of `api_error`, - * `card_error`, `idempotency_error`, or `invalid_request_error`. + * // errorProperties: The beginning of the section generated from our OpenAPI spec + * + * @property null|string $advice_code For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + * @property null|string $charge For card errors, the ID of the failed charge. + * @property null|string $code For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported. + * @property null|string $decline_code For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://docs.stripe.com/declines#issuer-declines) if they provide one. + * @property null|string $doc_url A URL to more information about the [error code](https://docs.stripe.com/error-codes) reported. + * @property null|string $message A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + * @property null|string $network_advice_code For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + * @property null|string $network_decline_code For payments declined by the network, an alphanumeric code which indicates the reason the payment failed. + * @property null|string $param If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + * @property null|PaymentIntent $payment_intent The PaymentIntent object for errors returned on a request involving a PaymentIntent. + * @property null|PaymentMethod $payment_method The PaymentMethod object for errors returned on a request involving a PaymentMethod. + * @property null|string $payment_method_type If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + * @property null|string $request_log_url A URL to the request log entry in your dashboard. + * @property null|SetupIntent $setup_intent The SetupIntent object for errors returned on a request involving a SetupIntent. + * @property null|PaymentSource $source The PaymentSource object for errors returned on a request involving a PaymentSource. + * @property string $type The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + * @property null|string $user_message The user message associated with the error. + * // errorProperties: The end of the section generated from our OpenAPI spec */ class ErrorObject extends StripeObject { @@ -42,7 +33,7 @@ class ErrorObject extends StripeObject * * @see https://stripe.com/docs/error-codes */ - // The beginning of the section generated from our OpenAPI spec + // errorCodes: The beginning of the section generated from our OpenAPI spec const CODE_ACCOUNT_CLOSED = 'account_closed'; const CODE_ACCOUNT_COUNTRY_INVALID_ADDRESS = 'account_country_invalid_address'; const CODE_ACCOUNT_ERROR_COUNTRY_CHANGE_REQUIRES_ADDITIONAL_STEPS = 'account_error_country_change_requires_additional_steps'; @@ -51,11 +42,14 @@ class ErrorObject extends StripeObject const CODE_ACCOUNT_NUMBER_INVALID = 'account_number_invalid'; const CODE_ACCOUNT_TOKEN_REQUIRED_FOR_V2_ACCOUNT = 'account_token_required_for_v2_account'; const CODE_ACSS_DEBIT_SESSION_INCOMPLETE = 'acss_debit_session_incomplete'; + const CODE_ACTION_BLOCKED = 'action_blocked'; const CODE_ALIPAY_UPGRADE_REQUIRED = 'alipay_upgrade_required'; const CODE_AMOUNT_TOO_LARGE = 'amount_too_large'; const CODE_AMOUNT_TOO_SMALL = 'amount_too_small'; + const CODE_ANOMALOUS_MONEY_MOVEMENT_REQUEST = 'anomalous_money_movement_request'; const CODE_API_KEY_EXPIRED = 'api_key_expired'; const CODE_APPLICATION_FEES_NOT_ALLOWED = 'application_fees_not_allowed'; + const CODE_APPROVAL_REQUIRED = 'approval_required'; const CODE_AUTHENTICATION_REQUIRED = 'authentication_required'; const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient'; const CODE_BALANCE_INVALID_PARAMETER = 'balance_invalid_parameter'; @@ -92,6 +86,10 @@ class ErrorObject extends StripeObject const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; const CODE_EMAIL_INVALID = 'email_invalid'; const CODE_EXPIRED_CARD = 'expired_card'; + const CODE_FAILED_TAX_CALCULATION = 'failed_tax_calculation'; + const CODE_FINANCIAL_ACCOUNT_BALANCE_DOES_NOT_SUPPORT_CURRENCY = 'financial_account_balance_does_not_support_currency'; + const CODE_FINANCIAL_ACCOUNT_CAPABILITY_NOT_ENABLED = 'financial_account_capability_not_enabled'; + const CODE_FINANCIAL_ACCOUNT_CAPABILITY_RESTRICTED = 'financial_account_capability_restricted'; 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'; @@ -165,6 +163,7 @@ class ErrorObject extends StripeObject const CODE_PAYMENT_METHOD_INVALID_PARAMETER = 'payment_method_invalid_parameter'; const CODE_PAYMENT_METHOD_INVALID_PARAMETER_TESTMODE = 'payment_method_invalid_parameter_testmode'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_FAILED = 'payment_method_microdeposit_failed'; + const CODE_PAYMENT_METHOD_MICRODEPOSIT_PROCESSING_ERROR = 'payment_method_microdeposit_processing_error'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_INVALID = 'payment_method_microdeposit_verification_amounts_invalid'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_AMOUNTS_MISMATCH = 'payment_method_microdeposit_verification_amounts_mismatch'; const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_ATTEMPTS_EXCEEDED = 'payment_method_microdeposit_verification_attempts_exceeded'; @@ -195,6 +194,7 @@ class ErrorObject extends StripeObject const CODE_ROUTING_NUMBER_INVALID = 'routing_number_invalid'; const CODE_SECRET_KEY_REQUIRED = 'secret_key_required'; const CODE_SEPA_UNSUPPORTED_ACCOUNT = 'sepa_unsupported_account'; + const CODE_SERVICE_PERIOD_COUPON_WITH_METERED_TIERED_ITEM_UNSUPPORTED = 'service_period_coupon_with_metered_tiered_item_unsupported'; const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed'; const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure'; const CODE_SETUP_INTENT_INVALID_PARAMETER = 'setup_intent_invalid_parameter'; @@ -204,6 +204,7 @@ class ErrorObject extends StripeObject const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state'; const CODE_SHIPPING_ADDRESS_INVALID = 'shipping_address_invalid'; const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed'; + const CODE_SIRET_INVALID = 'siret_invalid'; const CODE_SKU_INACTIVE = 'sku_inactive'; const CODE_STATE_UNSUPPORTED = 'state_unsupported'; const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid'; @@ -228,7 +229,7 @@ class ErrorObject extends StripeObject const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch'; const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed'; const CODE_URL_INVALID = 'url_invalid'; - // The end of the section generated from our OpenAPI spec + // errorCodes: The end of the section generated from our OpenAPI spec /** * Refreshes this object using the provided values. @@ -244,17 +245,25 @@ class ErrorObject extends StripeObject // error objects when they have a null value. We manually set default // values here to facilitate generic error handling. $values = \array_merge([ + // errorRefreshFrom: The beginning of the section generated from our OpenAPI spec + 'advice_code' => null, 'charge' => null, 'code' => null, 'decline_code' => null, 'doc_url' => null, 'message' => null, + 'network_advice_code' => null, + 'network_decline_code' => null, 'param' => null, 'payment_intent' => null, 'payment_method' => null, + 'payment_method_type' => null, + 'request_log_url' => null, 'setup_intent' => null, 'source' => null, 'type' => null, + 'user_message' => null, + // errorRefreshFrom: The end of the section generated from our OpenAPI spec ], $values); parent::refreshFrom($values, $opts, $partial); } diff --git a/libs/stripe-php/lib/Event.php b/libs/stripe-php/lib/Event.php index 7a9ebde1..162e7e55 100644 --- a/libs/stripe-php/lib/Event.php +++ b/libs/stripe-php/lib/Event.php @@ -34,7 +34,7 @@ namespace Stripe; * @property null|string $context Authentication context needed to fetch the event or related object. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property (object{object: StripeObject, previous_attributes?: StripeObject}&StripeObject) $data - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $pending_webhooks Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. * @property null|(object{id: null|string, idempotency_key: null|string}&StripeObject) $request Information on the API request that triggers the event. * @property string $type Description of the event (for example, invoice.created or charge.refunded). diff --git a/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEvent.php b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEvent.php new file mode 100644 index 00000000..f78a76bc --- /dev/null +++ b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEvent.php @@ -0,0 +1,31 @@ +related_object->url); + list($object, $options) = $this->_request('get', $this->related_object->url, [], [ + 'stripe_context' => $this->context, + 'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id], + ], [], $apiMode); + + return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode); + } +} diff --git a/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEventNotification.php b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEventNotification.php new file mode 100644 index 00000000..be9a5d60 --- /dev/null +++ b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsFailedEventNotification.php @@ -0,0 +1,38 @@ +related_object->url); + list($object, $options) = $this->_request('get', $this->related_object->url, [], [ + 'stripe_context' => $this->context, + 'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id], + ], [], $apiMode); + + return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode); + } +} diff --git a/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsProcessingEventNotification.php b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsProcessingEventNotification.php new file mode 100644 index 00000000..cfc35609 --- /dev/null +++ b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsProcessingEventNotification.php @@ -0,0 +1,38 @@ +related_object->url); + list($object, $options) = $this->_request('get', $this->related_object->url, [], [ + 'stripe_context' => $this->context, + 'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id], + ], [], $apiMode); + + return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode); + } +} diff --git a/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededEventNotification.php b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededEventNotification.php new file mode 100644 index 00000000..2eb40e98 --- /dev/null +++ b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededEventNotification.php @@ -0,0 +1,38 @@ +related_object->url); + list($object, $options) = $this->_request('get', $this->related_object->url, [], [ + 'stripe_context' => $this->context, + 'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id], + ], [], $apiMode); + + return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode); + } +} diff --git a/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.php b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.php new file mode 100644 index 00000000..c246e6d8 --- /dev/null +++ b/libs/stripe-php/lib/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.php @@ -0,0 +1,38 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $url The publicly accessible URL to download the file. */ diff --git a/libs/stripe-php/lib/FinancialConnections/Account.php b/libs/stripe-php/lib/FinancialConnections/Account.php index 2a8fe28e..88a83f7f 100644 --- a/libs/stripe-php/lib/FinancialConnections/Account.php +++ b/libs/stripe-php/lib/FinancialConnections/Account.php @@ -18,11 +18,12 @@ namespace Stripe\FinancialConnections; * @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution. * @property string $institution_name The name of the institution that holds this account. * @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|AccountOwnership|string $ownership The most recent information about the account's owners. * @property null|(object{last_attempted_at: int, next_refresh_available_at: null|int, status: string}&\Stripe\StripeObject) $ownership_refresh The state of the most recent attempt to refresh the account owners. * @property null|string[] $permissions The list of permissions granted by this account. * @property string $status The status of the link to the account. + * @property null|(object{active?: (object{action: string, cause: string, expected_deactivation_date: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details * @property string $subcategory

If category is cash, one of:

- checking - savings - other

If category is credit, one of:

- mortgage - line_of_credit - credit_card - other

If category is investment or other, this will be other.

* @property null|string[] $subscriptions The list of data refresh subscriptions requested on this account. * @property string[] $supported_payment_method_types The PaymentMethod type(s) that can be created from this account. diff --git a/libs/stripe-php/lib/FinancialConnections/Session.php b/libs/stripe-php/lib/FinancialConnections/Session.php index db8bc2b2..2bbb6800 100644 --- a/libs/stripe-php/lib/FinancialConnections/Session.php +++ b/libs/stripe-php/lib/FinancialConnections/Session.php @@ -13,7 +13,7 @@ namespace Stripe\FinancialConnections; * @property \Stripe\Collection $accounts The accounts that were collected as part of this Session. * @property null|string $client_secret A value that will be passed to the client to launch the authentication flow. * @property null|(object{account_subcategories: null|string[], countries: null|string[]}&\Stripe\StripeObject) $filters - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string[] $permissions Permissions requested for accounts collected during this session. * @property null|string[] $prefetch Data features requested to be retrieved upon account creation. * @property null|string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. diff --git a/libs/stripe-php/lib/FinancialConnections/Transaction.php b/libs/stripe-php/lib/FinancialConnections/Transaction.php index 68a95262..d68c2b1c 100644 --- a/libs/stripe-php/lib/FinancialConnections/Transaction.php +++ b/libs/stripe-php/lib/FinancialConnections/Transaction.php @@ -13,7 +13,7 @@ namespace Stripe\FinancialConnections; * @property int $amount The amount of this transaction, in cents (or local equivalent). * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $description The description of this transaction. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status The status of the transaction. * @property (object{posted_at: null|int, void_at: null|int}&\Stripe\StripeObject) $status_transitions * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch. diff --git a/libs/stripe-php/lib/Forwarding/Request.php b/libs/stripe-php/lib/Forwarding/Request.php index e6dcc12c..536707c8 100644 --- a/libs/stripe-php/lib/Forwarding/Request.php +++ b/libs/stripe-php/lib/Forwarding/Request.php @@ -25,7 +25,7 @@ namespace Stripe\Forwarding; * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $payment_method The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. * @property string[] $replacements The field kinds to be replaced in the forwarded request. diff --git a/libs/stripe-php/lib/FundingInstructions.php b/libs/stripe-php/lib/FundingInstructions.php index 3e8cf3e7..4b2f7dce 100644 --- a/libs/stripe-php/lib/FundingInstructions.php +++ b/libs/stripe-php/lib/FundingInstructions.php @@ -15,7 +15,7 @@ namespace Stripe; * @property (object{country: string, financial_addresses: ((object{aba?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, routing_number: string}&StripeObject), iban?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bic: string, country: string, iban: string}&StripeObject), sort_code?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), sort_code: string}&StripeObject), spei?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: string, bank_name: string, clabe: string}&StripeObject), supported_networks?: string[], swift?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, swift_code: string}&StripeObject), type: string, zengin?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: null|string, account_number: null|string, account_type: null|string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: null|string, bank_name: null|string, branch_code: null|string, branch_name: null|string}&StripeObject)}&StripeObject))[], type: string}&StripeObject) $bank_transfer * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $funding_type The funding_type of the returned instructions - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class FundingInstructions extends ApiResource { diff --git a/libs/stripe-php/lib/HttpClient/CurlClient.php b/libs/stripe-php/lib/HttpClient/CurlClient.php index c210a32c..7e0caec7 100644 --- a/libs/stripe-php/lib/HttpClient/CurlClient.php +++ b/libs/stripe-php/lib/HttpClient/CurlClient.php @@ -202,7 +202,13 @@ class CurlClient implements ClientInterface, StreamingClientInterface */ private function constructUrlAndBody($method, $absUrl, $params, $hasFile, $apiMode) { - $params = Util\Util::objectsToIds($params); + // For V2 POST bodies, preserve null values so they serialize to JSON + // null (the V2 mechanism for clearing fields / metadata keys). + // For all other cases (V1, GET/DELETE query params), strip nulls as + // before — null values become empty strings in query params which + // causes server errors. + $serializeNull = ('post' === $method && 'v2' === $apiMode); + $params = Util\Util::objectsToIds($params, $serializeNull); if ('post' === $method) { $absUrl = Util\Util::utf8($absUrl); if ($hasFile) { @@ -526,7 +532,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface if ($shouldRetry) { ++$numRetries; - $sleepSeconds = $this->sleepTime($numRetries, $lastRHeaders); + $sleepSeconds = $this->sleepTime($numRetries); \usleep((int) ($sleepSeconds * 1000000)); } else { break; @@ -586,7 +592,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface if ($shouldRetry) { ++$numRetries; - $sleepSeconds = $this->sleepTime($numRetries, $rheaders); + $sleepSeconds = $this->sleepTime($numRetries); \usleep((int) ($sleepSeconds * 1000000)); } else { break; @@ -713,11 +719,10 @@ class CurlClient implements ClientInterface, StreamingClientInterface * Provides the number of seconds to wait before retrying a request. * * @param int $numRetries - * @param array|Util\CaseInsensitiveArray $rheaders * * @return int */ - private function sleepTime($numRetries, $rheaders) + private function sleepTime($numRetries) { // Apply exponential backoff with $initialNetworkRetryDelay on the // number of $numRetries so far as inputs. Do not allow the number to exceed @@ -729,18 +734,8 @@ class CurlClient implements ClientInterface, StreamingClientInterface // Apply some jitter by randomizing the value in the range of // ($sleepSeconds / 2) to ($sleepSeconds). - $sleepSeconds *= 0.5 * (1 + $this->randomGenerator->randFloat()); - // But never sleep less than the base sleep seconds. - $sleepSeconds = \max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds); - - // And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask. - $retryAfter = isset($rheaders['retry-after']) ? (float) ($rheaders['retry-after']) : 0.0; - if (\floor($retryAfter) === $retryAfter && $retryAfter <= Stripe::getMaxRetryAfter()) { - $sleepSeconds = \max($sleepSeconds, $retryAfter); - } - - return $sleepSeconds; + return \max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds * 0.5 * (1 + $this->randomGenerator->randFloat())); } /** diff --git a/libs/stripe-php/lib/Identity/VerificationReport.php b/libs/stripe-php/lib/Identity/VerificationReport.php index 033b6791..75f58956 100644 --- a/libs/stripe-php/lib/Identity/VerificationReport.php +++ b/libs/stripe-php/lib/Identity/VerificationReport.php @@ -24,7 +24,7 @@ namespace Stripe\Identity; * @property null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), dob?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), error: null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject), expiration_date?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), files: null|string[], first_name: null|string, issued_date: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), issuing_country: null|string, last_name: null|string, number?: null|string, sex?: null|string, status: string, type: null|string, unparsed_place_of_birth?: null|string, unparsed_sex?: null|string}&\Stripe\StripeObject) $document Result from a document check * @property null|(object{email: null|string, error: null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject), status: string}&\Stripe\StripeObject) $email Result from a email check * @property null|(object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), error: null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject), first_name: null|string, id_number?: null|string, id_number_type: null|string, last_name: null|string, status: string}&\Stripe\StripeObject) $id_number Result from an id_number check - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{document?: (object{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}&\Stripe\StripeObject), id_number?: (object{}&\Stripe\StripeObject)}&\Stripe\StripeObject) $options * @property null|(object{error: null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject), phone: null|string, status: string}&\Stripe\StripeObject) $phone Result from a phone check * @property null|(object{document: null|string, error: null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject), selfie: null|string, status: string}&\Stripe\StripeObject) $selfie Result from a selfie check diff --git a/libs/stripe-php/lib/Identity/VerificationSession.php b/libs/stripe-php/lib/Identity/VerificationSession.php index 2e68e674..e4927166 100644 --- a/libs/stripe-php/lib/Identity/VerificationSession.php +++ b/libs/stripe-php/lib/Identity/VerificationSession.php @@ -24,7 +24,7 @@ namespace Stripe\Identity; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject) $last_error If present, this property tells you the last error encountered when processing the verification. * @property null|string|VerificationReport $last_verification_report ID of the most recent VerificationReport. Learn more about accessing detailed verification results. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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{document?: (object{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}&\Stripe\StripeObject), email?: (object{require_verification?: bool}&\Stripe\StripeObject), id_number?: (object{}&\Stripe\StripeObject), matching?: (object{dob?: string, name?: string}&\Stripe\StripeObject), phone?: (object{require_verification?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject) $options A set of options for the session’s verification checks. * @property null|(object{email?: string, phone?: string}&\Stripe\StripeObject) $provided_details Details provided about the user being verified. These details may be shown to the user. diff --git a/libs/stripe-php/lib/Invoice.php b/libs/stripe-php/lib/Invoice.php index 7341dd85..33c11e91 100644 --- a/libs/stripe-php/lib/Invoice.php +++ b/libs/stripe-php/lib/Invoice.php @@ -46,6 +46,7 @@ namespace Stripe; * @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due. * @property int $amount_overpaid Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. * @property int $amount_paid The amount, in cents (or local equivalent), that was paid. + * @property null|int $amount_paid_off_stripe Amount, in cents (or local equivalent), that was paid on the invoice outside of Stripe. * @property int $amount_remaining The difference between amount_due and amount_paid, in cents (or local equivalent). * @property int $amount_shipping This is the sum of all the shipping amounts. * @property null|Application|string $application ID of the Connect Application that created the invoice. @@ -85,16 +86,16 @@ namespace Stripe; * @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_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. * @property null|Invoice|string $latest_revision The ID of the most recent non-draft revision of this invoice * @property Collection $lines The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice. * @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. * @property null|Account|string $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details. * @property null|(object{quote_details: null|(object{quote: string}&StripeObject), subscription_details: null|(object{metadata: null|StripeObject, subscription: string|Subscription, subscription_proration_date?: int}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice - * @property (object{default_mandate: null|string, payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{installments?: (object{enabled: null|bool}&StripeObject), request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[]}&StripeObject) $payment_settings + * @property (object{default_mandate: null|string, payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{installments?: (object{enabled: null|bool}&StripeObject), request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), pix: null|(object{amount_includes_iof: null|string, expires_after_seconds?: int}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[]}&StripeObject) $payment_settings * @property null|Collection $payments Payments for this invoice. Use invoice payment to get more details. - * @property int $period_end End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. - * @property int $period_start Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. + * @property int $period_end The latest timestamp at which invoice items can be associated with this invoice. Use the line item period to get the service period for each price. + * @property int $period_start The earliest timestamp at which invoice items can be associated with this invoice. Use the line item period to get the service period for each price. * @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice. * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice. * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice. @@ -148,11 +149,11 @@ class Invoice extends ApiResource /** * This endpoint creates a draft invoice for a given customer. The invoice remains - * a draft until you finalize the invoice, which - * allows you to pay or finalize the invoice, + * which allows you to pay or send the invoice to your customers. * - * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params + * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params * @param null|array|string $options * * @return Invoice the created resource @@ -175,7 +176,7 @@ class Invoice extends ApiResource * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to * delete invoices that are no longer in a draft state will fail; once an invoice * has been finalized or if an invoice is for a subscription, it must be voided. + * href="/api/invoices/void">voided. * * @param null|array $params * @param null|array|string $opts @@ -244,7 +245,7 @@ class Invoice extends ApiResource * invoices, pass auto_advance=false. * * @param string $id the ID of the resource to update - * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params + * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params * @param null|array|string $opts * * @return Invoice the updated resource diff --git a/libs/stripe-php/lib/InvoiceItem.php b/libs/stripe-php/lib/InvoiceItem.php index 48c18be9..740e36b0 100644 --- a/libs/stripe-php/lib/InvoiceItem.php +++ b/libs/stripe-php/lib/InvoiceItem.php @@ -25,15 +25,16 @@ namespace Stripe; * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations. * @property null|(Discount|string)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. * @property null|Invoice|string $invoice The ID of the invoice this invoice item belongs to. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs 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 null for discountable=true 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 (object{end: int, start: int}&StripeObject) $period * @property null|(object{price_details?: (object{price: 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 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 null|(object{credited_items: null|(object{invoice_item?: string, invoice_line_item_details?: (object{invoice: string, invoice_line_items: string[]}&StripeObject), type: string}&StripeObject), discount_amounts: ((object{amount: int, discount: Discount|string}&StripeObject))[]}&StripeObject) $proration_details + * @property int $quantity Quantity of units for the invoice item in integer format, with any decimal precision truncated. For the item's full-precision decimal quantity, use quantity_decimal. This field will be deprecated in favor of quantity_decimal in a future version. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + * @property string $quantity_decimal Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice item. * @property null|TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates 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. */ @@ -48,7 +49,7 @@ class InvoiceItem extends ApiResource * no invoice is specified, the item will be on the next invoice created for the * customer specified. * - * @param null|array{amount?: int, currency?: string, customer?: string, customer_account?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params + * @param null|array{amount?: int, currency?: string, customer?: string, customer_account?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params * @param null|array|string $options * * @return InvoiceItem the created resource @@ -133,7 +134,7 @@ class InvoiceItem extends ApiResource * closed. * * @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, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount_decimal?: 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, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount_decimal?: string} $params * @param null|array|string $opts * * @return InvoiceItem the updated resource diff --git a/libs/stripe-php/lib/InvoiceLineItem.php b/libs/stripe-php/lib/InvoiceLineItem.php index 3b8ca051..d20e92ee 100644 --- a/libs/stripe-php/lib/InvoiceLineItem.php +++ b/libs/stripe-php/lib/InvoiceLineItem.php @@ -18,13 +18,14 @@ namespace Stripe; * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations. * @property (Discount|string)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. * @property null|string $invoice The ID of the invoice that contains this line item. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription, metadata reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. * @property null|(object{invoice_item_details: null|(object{invoice_item: string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string}&StripeObject), subscription_item_details: null|(object{invoice_item: null|string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string, subscription_item: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this line item. * @property (object{end: int, start: int}&StripeObject) $period * @property null|((object{amount: int, credit_balance_transaction?: null|Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. * @property null|(object{price_details?: (object{price: Price|string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the line item. - * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration. + * @property null|int $quantity Quantity of units for the invoice line item in integer format, with any decimal precision truncated. For the line item's full-precision decimal quantity, use quantity_decimal. This field will be deprecated in favor of quantity_decimal in a future version. If the line item is a proration or subscription, the quantity of the subscription that the proration was computed for. + * @property null|string $quantity_decimal Non-negative decimal with at most 12 decimal places. The quantity of units for the line item. * @property null|string|Subscription $subscription * @property int $subtotal The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes. * @property null|((object{amount: int, tax_behavior: string, tax_rate_details: null|(object{tax_rate: string}&StripeObject), taxability_reason: string, taxable_amount: null|int, type: string}&StripeObject))[] $taxes The tax information of the line item. @@ -44,7 +45,7 @@ class InvoiceLineItem extends ApiResource * before the invoice is finalized. * * @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, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, 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 * * @return InvoiceLineItem the updated resource diff --git a/libs/stripe-php/lib/InvoicePayment.php b/libs/stripe-php/lib/InvoicePayment.php index b90fe85b..1561d62d 100644 --- a/libs/stripe-php/lib/InvoicePayment.php +++ b/libs/stripe-php/lib/InvoicePayment.php @@ -22,7 +22,7 @@ namespace Stripe; * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @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 amount_remaining. The PaymentIntent associated with the default payment can’t be edited or canceled directly. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @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 open, paid, or canceled. * @property (object{canceled_at: null|int, paid_at: null|int}&StripeObject) $status_transitions diff --git a/libs/stripe-php/lib/InvoiceRenderingTemplate.php b/libs/stripe-php/lib/InvoiceRenderingTemplate.php index 268d8159..e6ec7027 100644 --- a/libs/stripe-php/lib/InvoiceRenderingTemplate.php +++ b/libs/stripe-php/lib/InvoiceRenderingTemplate.php @@ -11,7 +11,7 @@ namespace Stripe; * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $nickname A brief description of the template, hidden from customers * @property string $status The status of the template, one of active or archived. diff --git a/libs/stripe-php/lib/Issuing/Authorization.php b/libs/stripe-php/lib/Issuing/Authorization.php index a828674e..d2f2d298 100644 --- a/libs/stripe-php/lib/Issuing/Authorization.php +++ b/libs/stripe-php/lib/Issuing/Authorization.php @@ -19,13 +19,14 @@ namespace Stripe\Issuing; * @property string $authorization_method How the card details were provided. * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization. * @property Card $card You can create physical or virtual cards that are issued to cardholders. + * @property null|string $card_presence Whether the card was present at the point of sale for the authorization. * @property null|Cardholder|string $cardholder The cardholder to whom this authorization belongs. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency The currency of the cardholder. This currency can be different from the currency presented at authorization and the merchant_currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|(object{cardholder_prompt_data: null|(object{alphanumeric_id: null|string, driver_id: null|string, odometer: null|int, unspecified_id: null|string, user_id: null|string, vehicle_number: null|string}&\Stripe\StripeObject), purchase_type: null|string, reported_breakdown: null|(object{fuel: null|(object{gross_amount_decimal: null|string}&\Stripe\StripeObject), non_fuel: null|(object{gross_amount_decimal: null|string}&\Stripe\StripeObject), tax: null|(object{local_amount_decimal: null|string, national_amount_decimal: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject), service_type: null|string}&\Stripe\StripeObject) $fleet Fleet-specific information for authorizations using Fleet cards. * @property null|((object{channel: string, status: string, undeliverable_reason: null|string}&\Stripe\StripeObject))[] $fraud_challenges Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. * @property null|(object{industry_product_code: null|string, quantity_decimal: null|string, type: null|string, unit: null|string, unit_cost_decimal: null|string}&\Stripe\StripeObject) $fuel Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. merchant_amount should be the same as amount, unless merchant_currency and currency are different. * @property string $merchant_currency The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property (object{category: string, category_code: string, city: null|string, country: null|string, name: null|string, network_id: string, postal_code: null|string, state: null|string, tax_id: null|string, terminal_id: null|string, url: null|string}&\Stripe\StripeObject) $merchant_data @@ -53,6 +54,9 @@ class Authorization extends \Stripe\ApiResource const AUTHORIZATION_METHOD_ONLINE = 'online'; const AUTHORIZATION_METHOD_SWIPE = 'swipe'; + const CARD_PRESENCE_NOT_PRESENT = 'not_present'; + const CARD_PRESENCE_PRESENT = 'present'; + const STATUS_CLOSED = 'closed'; const STATUS_EXPIRED = 'expired'; const STATUS_PENDING = 'pending'; diff --git a/libs/stripe-php/lib/Issuing/Card.php b/libs/stripe-php/lib/Issuing/Card.php index 8d0f4b61..724ea533 100644 --- a/libs/stripe-php/lib/Issuing/Card.php +++ b/libs/stripe-php/lib/Issuing/Card.php @@ -20,7 +20,8 @@ namespace Stripe\Issuing; * @property null|string $financial_account The financial account this card is attached to. * @property string $last4 The last 4 digits of the card number. * @property null|(object{started_at: null|int, type: null|string}&\Stripe\StripeObject) $latest_fraud_warning Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|(object{cancel_after: (object{payment_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $lifecycle_controls Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our documentation for more details. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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 $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. * @property null|PersonalizationDesign|string $personalization_design The personalization design object belonging to this card. @@ -29,7 +30,7 @@ namespace Stripe\Issuing; * @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 (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_card_presences: null|string[], allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_card_presences: 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 inactive. * @property string $type The type of the card. * @property null|(object{apple_pay: (object{eligible: bool, ineligible_reason: null|string}&\Stripe\StripeObject), google_pay: (object{eligible: bool, ineligible_reason: null|string}&\Stripe\StripeObject), primary_account_identifier: null|string}&\Stripe\StripeObject) $wallets Information relating to digital wallets (like Apple Pay and Google Pay). @@ -41,11 +42,13 @@ class Card extends \Stripe\ApiResource use \Stripe\ApiOperations\Update; const CANCELLATION_REASON_DESIGN_REJECTED = 'design_rejected'; + const CANCELLATION_REASON_FULFILLMENT_ERROR = 'fulfillment_error'; const CANCELLATION_REASON_LOST = 'lost'; const CANCELLATION_REASON_STOLEN = 'stolen'; const REPLACEMENT_REASON_DAMAGED = 'damaged'; const REPLACEMENT_REASON_EXPIRED = 'expired'; + const REPLACEMENT_REASON_FULFILLMENT_ERROR = 'fulfillment_error'; const REPLACEMENT_REASON_LOST = 'lost'; const REPLACEMENT_REASON_STOLEN = 'stolen'; @@ -59,7 +62,7 @@ class Card extends \Stripe\ApiResource /** * Creates an Issuing Card object. * - * @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, metadata?: array, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params + * @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params * @param null|array|string $options * * @return Card the created resource @@ -121,7 +124,7 @@ class Card extends \Stripe\ApiResource * the parameters passed. Any parameters not provided will be left unchanged. * * @param string $id the ID of the resource to update - * @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params + * @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params * @param null|array|string $opts * * @return Card the updated resource diff --git a/libs/stripe-php/lib/Issuing/Cardholder.php b/libs/stripe-php/lib/Issuing/Cardholder.php index 3389086a..536cd071 100644 --- a/libs/stripe-php/lib/Issuing/Cardholder.php +++ b/libs/stripe-php/lib/Issuing/Cardholder.php @@ -16,13 +16,13 @@ namespace Stripe\Issuing; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $email The cardholder's email address. * @property null|(object{card_issuing?: null|(object{user_terms_acceptance: null|(object{date: null|int, ip: null|string, user_agent: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject), dob: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), first_name: null|string, last_name: null|string, verification: null|(object{document: null|(object{back: null|string|\Stripe\File, front: null|string|\Stripe\File}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $individual Additional information about an individual cardholder. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $name The cardholder's name. This will be printed on cards issued to them. * @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details. - * @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be de, en, es, fr, or it. This changes the language of the 3D Secure flow and one-time password messages sent to the cardholder. + * @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be da, de, en, es, fr, it, pl, or sv. This changes the language of the 3D Secure flow and one-time password messages sent to the cardholder. * @property (object{disabled_reason: null|string, past_due: null|string[]}&\Stripe\StripeObject) $requirements - * @property null|(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 Rules that control spending across this cardholder's cards. Refer to our documentation for more details. + * @property null|(object{allowed_card_presences: null|string[], allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_card_presences: 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 Rules that control spending across this cardholder's cards. Refer to our documentation for more details. * @property string $status Specifies whether to permit authorizations on this cardholder's cards. * @property string $type One of individual or company. See Choose a cardholder type for more details. */ @@ -42,7 +42,7 @@ class Cardholder extends \Stripe\ApiResource /** * Creates a new Issuing Cardholder object that can be issued cards. * - * @param null|array{billing: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, name: string, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string, type?: string} $params + * @param null|array{billing: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, name: string, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string, type?: string} $params * @param null|array|string $options * * @return Cardholder the created resource @@ -105,7 +105,7 @@ class Cardholder extends \Stripe\ApiResource * unchanged. * * @param string $id the ID of the resource to update - * @param null|array{billing?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string} $params + * @param null|array{billing?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string} $params * @param null|array|string $opts * * @return Cardholder the updated resource diff --git a/libs/stripe-php/lib/Issuing/Dispute.php b/libs/stripe-php/lib/Issuing/Dispute.php index d05d7d09..fc1d2de8 100644 --- a/libs/stripe-php/lib/Issuing/Dispute.php +++ b/libs/stripe-php/lib/Issuing/Dispute.php @@ -16,12 +16,12 @@ namespace Stripe\Issuing; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency The currency the transaction was made in. * @property (object{canceled?: (object{additional_documentation: null|string|\Stripe\File, canceled_at: null|int, cancellation_policy_provided: null|bool, cancellation_reason: null|string, expected_at: null|int, explanation: null|string, product_description: null|string, product_type: null|string, return_status: null|string, returned_at: null|int}&\Stripe\StripeObject), duplicate?: (object{additional_documentation: null|string|\Stripe\File, card_statement: null|string|\Stripe\File, cash_receipt: null|string|\Stripe\File, check_image: null|string|\Stripe\File, explanation: null|string, original_transaction: null|string}&\Stripe\StripeObject), fraudulent?: (object{additional_documentation: null|string|\Stripe\File, explanation: null|string}&\Stripe\StripeObject), merchandise_not_as_described?: (object{additional_documentation: null|string|\Stripe\File, explanation: null|string, received_at: null|int, return_description: null|string, return_status: null|string, returned_at: null|int}&\Stripe\StripeObject), no_valid_authorization?: (object{additional_documentation: null|string|\Stripe\File, explanation: null|string}&\Stripe\StripeObject), not_received?: (object{additional_documentation: null|string|\Stripe\File, expected_at: null|int, explanation: null|string, product_description: null|string, product_type: null|string}&\Stripe\StripeObject), other?: (object{additional_documentation: null|string|\Stripe\File, explanation: null|string, product_description: null|string, product_type: null|string}&\Stripe\StripeObject), reason: string, service_not_as_described?: (object{additional_documentation: null|string|\Stripe\File, canceled_at: null|int, cancellation_reason: null|string, explanation: null|string, received_at: null|int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $evidence - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $status Current status of the dispute. * @property string|Transaction $transaction The transaction being disputed. - * @property null|(object{debit_reversal: null|string, received_debit: string}&\Stripe\StripeObject) $treasury Treasury details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + * @property null|(object{debit_reversal: null|string, received_debit: string}&\Stripe\StripeObject) $treasury Treasury details related to this dispute if it was created on a FinancialAccount */ class Dispute extends \Stripe\ApiResource { diff --git a/libs/stripe-php/lib/Issuing/PersonalizationDesign.php b/libs/stripe-php/lib/Issuing/PersonalizationDesign.php index 3cca57c2..4dc9a833 100644 --- a/libs/stripe-php/lib/Issuing/PersonalizationDesign.php +++ b/libs/stripe-php/lib/Issuing/PersonalizationDesign.php @@ -9,10 +9,10 @@ namespace Stripe\Issuing; * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property null|string|\Stripe\File $card_logo The file for the card logo to use with physical bundles that support card logos. Must have a purpose value of issuing_logo. + * @property null|string|\Stripe\File $card_logo The file for the card logo to use with physical bundles that support card logos. Must have a purpose value of issuing_logo. Image must be in PNG format with dimensions of 1000px by 200px. It must be a binary (black and white) image containing a black logo on a white background. We don't accept grayscale. * @property null|(object{footer_body: null|string, footer_title: null|string, header_body: null|string, header_title: null|string}&\Stripe\StripeObject) $carrier_text Hash containing carrier text, for use with physical bundles that support carrier text. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $lookup_key A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name Friendly display name. diff --git a/libs/stripe-php/lib/Issuing/PhysicalBundle.php b/libs/stripe-php/lib/Issuing/PhysicalBundle.php index 6e130c70..1e0a49de 100644 --- a/libs/stripe-php/lib/Issuing/PhysicalBundle.php +++ b/libs/stripe-php/lib/Issuing/PhysicalBundle.php @@ -10,7 +10,7 @@ namespace Stripe\Issuing; * @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 (object{card_logo: string, carrier_text: string, second_line: string}&\Stripe\StripeObject) $features - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $name Friendly display name. * @property string $status Whether this physical bundle can be used to create cards. * @property string $type Whether this physical bundle is a standard Stripe offering or custom-made for you. diff --git a/libs/stripe-php/lib/Issuing/Token.php b/libs/stripe-php/lib/Issuing/Token.php index 9ea27d76..990d5885 100644 --- a/libs/stripe-php/lib/Issuing/Token.php +++ b/libs/stripe-php/lib/Issuing/Token.php @@ -13,9 +13,9 @@ namespace Stripe\Issuing; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $device_fingerprint The hashed ID derived from the device ID from the card network associated with the token. * @property null|string $last4 The last four digits of the token. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $network The token service provider / card network associated with the token. - * @property null|(object{device?: (object{device_fingerprint?: string, ip_address?: string, location?: string, name?: string, phone_number?: string, type?: string}&\Stripe\StripeObject), mastercard?: (object{card_reference_id?: string, token_reference_id: string, token_requestor_id: string, token_requestor_name?: string}&\Stripe\StripeObject), type: string, visa?: (object{card_reference_id: string, token_reference_id: string, token_requestor_id: string, token_risk_score?: string}&\Stripe\StripeObject), wallet_provider?: (object{account_id?: string, account_trust_score?: int, card_number_source?: string, cardholder_address?: (object{line1: string, postal_code: string}&\Stripe\StripeObject), cardholder_name?: string, device_trust_score?: int, hashed_account_email_address?: string, reason_codes?: string[], suggested_decision?: string, suggested_decision_version?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $network_data + * @property null|(object{device?: (object{device_fingerprint?: string, ip_address?: string, location?: string, name?: string, phone_number?: string, type?: string}&\Stripe\StripeObject), mastercard?: (object{card_reference_id?: string, token_reference_id: string, token_requestor_id: string, token_requestor_name?: string}&\Stripe\StripeObject), type: string, visa?: (object{card_reference_id: null|string, token_reference_id: string, token_requestor_id: string, token_risk_score?: string}&\Stripe\StripeObject), wallet_provider?: (object{account_id?: string, account_trust_score?: int, card_number_source?: string, cardholder_address?: (object{line1: string, postal_code: string}&\Stripe\StripeObject), cardholder_name?: string, device_trust_score?: int, hashed_account_email_address?: string, reason_codes?: string[], suggested_decision?: string, suggested_decision_version?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $network_data * @property int $network_updated_at Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. * @property string $status The usage state of the token. * @property null|string $wallet_provider The digital wallet for this token, if one was used. diff --git a/libs/stripe-php/lib/Issuing/Transaction.php b/libs/stripe-php/lib/Issuing/Transaction.php index 578b95cf..5fbb85c3 100644 --- a/libs/stripe-php/lib/Issuing/Transaction.php +++ b/libs/stripe-php/lib/Issuing/Transaction.php @@ -22,7 +22,7 @@ namespace Stripe\Issuing; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|Dispute|string $dispute If you've disputed the transaction, the ID of the dispute. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency. * @property string $merchant_currency The currency with which the merchant is taking payment. * @property (object{category: string, category_code: string, city: null|string, country: null|string, name: null|string, network_id: string, postal_code: null|string, state: null|string, tax_id: null|string, terminal_id: null|string, url: null|string}&\Stripe\StripeObject) $merchant_data diff --git a/libs/stripe-php/lib/Mandate.php b/libs/stripe-php/lib/Mandate.php index 35315829..1490a959 100644 --- a/libs/stripe-php/lib/Mandate.php +++ b/libs/stripe-php/lib/Mandate.php @@ -10,11 +10,11 @@ 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 (object{accepted_at: null|int, offline?: (object{}&StripeObject), online?: (object{ip_address: null|string, user_agent: null|string}&StripeObject), type: string}&StripeObject) $customer_acceptance - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property null|(object{}&StripeObject) $multi_use + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|(object{amount?: int, currency?: string}&StripeObject) $multi_use * @property null|string $on_behalf_of The account (if any) that the mandate is intended for. * @property PaymentMethod|string $payment_method ID of the payment method associated with this mandate. - * @property (object{acss_debit?: (object{default_for?: string[], interval_description: null|string, payment_schedule: string, transaction_type: string}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{url: string}&StripeObject), bacs_debit?: (object{display_name: null|string, network_status: string, reference: string, revocation_reason: null|string, service_user_number: null|string, url: string}&StripeObject), card?: (object{}&StripeObject), cashapp?: (object{}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{billing_agreement_id: null|string, payer_id: null|string}&StripeObject), payto?: (object{amount: null|int, amount_type: string, end_date: null|string, payment_schedule: string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&StripeObject), revolut_pay?: (object{}&StripeObject), sepa_debit?: (object{reference: string, url: string}&StripeObject), type: string, us_bank_account?: (object{collection_method?: string}&StripeObject)}&StripeObject) $payment_method_details + * @property (object{acss_debit?: (object{default_for?: string[], interval_description: null|string, payment_schedule: string, transaction_type: string}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{url: string}&StripeObject), bacs_debit?: (object{display_name: null|string, network_status: string, reference: string, revocation_reason: null|string, service_user_number: null|string, url: string}&StripeObject), card?: (object{}&StripeObject), cashapp?: (object{}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{billing_agreement_id: null|string, payer_id: null|string}&StripeObject), payto?: (object{amount: null|int, amount_type: string, end_date: null|string, payment_schedule: string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&StripeObject), pix?: (object{amount_includes_iof?: string, amount_type?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject), revolut_pay?: (object{}&StripeObject), sepa_debit?: (object{reference: string, url: string}&StripeObject), twint?: (object{}&StripeObject), type: string, upi?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject), us_bank_account?: (object{collection_method?: string}&StripeObject)}&StripeObject) $payment_method_details * @property null|(object{amount: int, currency: string}&StripeObject) $single_use * @property string $status The mandate status indicates whether or not you can use it to initiate a payment. * @property string $type The type of the mandate. diff --git a/libs/stripe-php/lib/PaymentAttemptRecord.php b/libs/stripe-php/lib/PaymentAttemptRecord.php index 4002bc96..03554ad2 100644 --- a/libs/stripe-php/lib/PaymentAttemptRecord.php +++ b/libs/stripe-php/lib/PaymentAttemptRecord.php @@ -24,9 +24,9 @@ namespace Stripe; * @property null|(object{customer: null|string, email: null|string, name: null|string, phone: null|string}&StripeObject) $customer_details Customer information for this payment. * @property null|string $customer_presence Indicates whether the customer was present in your checkout flow during this payment. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{authorization_code: null|string, brand: string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, iin: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer: null|string, last4: string, moto?: bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, stored_credential_usage: null|string, three_d_secure: null|(object{authentication_flow: null|string, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{}&StripeObject), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment. + * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment. * @property null|string $payment_record ID of the Payment Record this Payment Attempt Record belongs to. * @property (object{custom?: (object{payment_reference: null|string}&StripeObject), type: string}&StripeObject) $processor_details Processor information associated with this payment. * @property string $reported_by Indicates who reported the payment. diff --git a/libs/stripe-php/lib/PaymentIntent.php b/libs/stripe-php/lib/PaymentIntent.php index 5aba14e7..2efd65f5 100644 --- a/libs/stripe-php/lib/PaymentIntent.php +++ b/libs/stripe-php/lib/PaymentIntent.php @@ -40,14 +40,15 @@ namespace Stripe; * @property null|(object{inputs?: (object{tax?: (object{calculation: string}&StripeObject)}&StripeObject)}&StripeObject) $hooks * @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_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. * @property null|Charge|string $latest_charge ID of the latest Charge object created by this PaymentIntent. This property is null until PaymentIntent confirmation is attempted. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|(object{enabled: bool}&StripeObject) $managed_payments Settings for Managed Payments. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about storing information in metadata. - * @property null|(object{alipay_handle_redirect?: (object{native_data: null|string, native_url: null|string, return_url: null|string, url: null|string}&StripeObject), boleto_display_details?: (object{expires_at: null|int, hosted_voucher_url: null|string, number: null|string, pdf: null|string}&StripeObject), card_await_notification?: (object{charge_attempt_at: null|int, customer_approval_required: null|bool}&StripeObject), cashapp_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), display_bank_transfer_instructions?: (object{amount_remaining: null|int, currency: null|string, financial_addresses?: ((object{aba?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, routing_number: string}&StripeObject), iban?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bic: string, country: string, iban: string}&StripeObject), sort_code?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), sort_code: string}&StripeObject), spei?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: string, bank_name: string, clabe: string}&StripeObject), supported_networks?: string[], swift?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, swift_code: string}&StripeObject), type: string, zengin?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: null|string, account_number: null|string, account_type: null|string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: null|string, bank_name: null|string, branch_code: null|string, branch_name: null|string}&StripeObject)}&StripeObject))[], hosted_instructions_url: null|string, reference: null|string, type: string}&StripeObject), konbini_display_details?: (object{expires_at: int, hosted_voucher_url: null|string, stores: (object{familymart: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), lawson: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), ministop: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), seicomart: null|(object{confirmation_number?: string, payment_code: string}&StripeObject)}&StripeObject)}&StripeObject), multibanco_display_details?: (object{entity: null|string, expires_at: null|int, hosted_voucher_url: null|string, reference: null|string}&StripeObject), oxxo_display_details?: (object{expires_after: null|int, hosted_voucher_url: null|string, number: null|string}&StripeObject), paynow_display_qr_code?: (object{data: string, hosted_instructions_url: null|string, image_url_png: string, image_url_svg: string}&StripeObject), pix_display_qr_code?: (object{data?: string, expires_at?: int, hosted_instructions_url?: string, image_url_png?: string, image_url_svg?: string}&StripeObject), promptpay_display_qr_code?: (object{data: string, hosted_instructions_url: string, image_url_png: string, image_url_svg: string}&StripeObject), redirect_to_url?: (object{return_url: null|string, url: null|string}&StripeObject), swish_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{data: string, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), type: string, use_stripe_sdk?: StripeObject, verify_with_microdeposits?: (object{arrival_date: int, hosted_verification_url: string, microdeposit_type: null|string}&StripeObject), wechat_pay_display_qr_code?: (object{data: string, hosted_instructions_url: string, image_data_url: string, image_url_png: string, image_url_svg: string}&StripeObject), wechat_pay_redirect_to_android_app?: (object{app_id: string, nonce_str: string, package: string, partner_id: string, prepay_id: string, sign: string, timestamp: string}&StripeObject), wechat_pay_redirect_to_ios_app?: (object{native_url: string}&StripeObject)}&StripeObject) $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + * @property null|(object{alipay_handle_redirect?: (object{native_data: null|string, native_url: null|string, return_url: null|string, url: null|string}&StripeObject), blik_authorize?: (object{}&StripeObject), boleto_display_details?: (object{expires_at: null|int, hosted_voucher_url: null|string, number: null|string, pdf: null|string}&StripeObject), card_await_notification?: (object{charge_attempt_at: null|int, customer_approval_required: null|bool}&StripeObject), cashapp_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), display_bank_transfer_instructions?: (object{amount_remaining: null|int, currency: null|string, financial_addresses?: ((object{aba?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, routing_number: string}&StripeObject), iban?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bic: string, country: string, iban: string}&StripeObject), sort_code?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), sort_code: string}&StripeObject), spei?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: string, bank_name: string, clabe: string}&StripeObject), supported_networks?: string[], swift?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, swift_code: string}&StripeObject), type: string, zengin?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: null|string, account_number: null|string, account_type: null|string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: null|string, bank_name: null|string, branch_code: null|string, branch_name: null|string}&StripeObject)}&StripeObject))[], hosted_instructions_url: null|string, reference: null|string, type: string}&StripeObject), klarna_display_qr_code?: (object{data: string, expires_at: null|int, image_url_png: string, image_url_svg: string}&StripeObject), konbini_display_details?: (object{expires_at: int, hosted_voucher_url: null|string, stores: (object{familymart: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), lawson: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), ministop: null|(object{confirmation_number?: string, payment_code: string}&StripeObject), seicomart: null|(object{confirmation_number?: string, payment_code: string}&StripeObject)}&StripeObject)}&StripeObject), multibanco_display_details?: (object{entity: null|string, expires_at: null|int, hosted_voucher_url: null|string, reference: null|string}&StripeObject), oxxo_display_details?: (object{expires_after: null|int, hosted_voucher_url: null|string, number: null|string}&StripeObject), paynow_display_qr_code?: (object{data: string, hosted_instructions_url: null|string, image_url_png: string, image_url_svg: string}&StripeObject), pix_display_qr_code?: (object{data?: string, expires_at?: int, hosted_instructions_url?: string, image_url_png?: string, image_url_svg?: string}&StripeObject), promptpay_display_qr_code?: (object{data: string, hosted_instructions_url: string, image_url_png: string, image_url_svg: string}&StripeObject), redirect_to_url?: (object{return_url: null|string, url: null|string}&StripeObject), swish_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{data: string, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), type: string, upi_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), use_stripe_sdk?: StripeObject, verify_with_microdeposits?: (object{arrival_date: int, hosted_verification_url: string, microdeposit_type: null|string}&StripeObject), wechat_pay_display_qr_code?: (object{data: string, hosted_instructions_url: string, image_data_url: string, image_url_png: string, image_url_svg: string}&StripeObject), wechat_pay_redirect_to_android_app?: (object{app_id: string, nonce_str: string, package: string, partner_id: string, prepay_id: string, sign: string, timestamp: string}&StripeObject), wechat_pay_redirect_to_ios_app?: (object{native_url: string}&StripeObject)}&StripeObject) $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. * @property null|Account|string $on_behalf_of You can specify the settlement merchant as the connected account using the on_behalf_of attribute on the charge. See the PaymentIntents use case for connected accounts for details. * @property null|(object{customer_reference: null|string, order_reference: null|string}&StripeObject) $payment_details * @property null|PaymentMethod|string $payment_method ID of the payment method used in this PaymentIntent. * @property null|(object{id: string, parent: null|string}&StripeObject) $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent. - * @property null|(object{acss_debit?: (object{mandate_options?: (object{custom_mandate_url?: string, interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&StripeObject), affirm?: (object{capture_method?: string, preferred_locale?: string, setup_future_usage?: string}&StripeObject), afterpay_clearpay?: (object{capture_method?: string, reference: null|string, setup_future_usage?: string}&StripeObject), alipay?: (object{setup_future_usage?: string}&StripeObject), alma?: (object{capture_method?: string}&StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), bancontact?: (object{preferred_language: string, setup_future_usage?: string}&StripeObject), billie?: (object{capture_method?: string}&StripeObject), blik?: (object{setup_future_usage?: string}&StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), card?: (object{capture_method?: string, installments: null|(object{available_plans: null|((object{count: null|int, interval: null|string, type: string}&StripeObject))[], enabled: bool, plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), mandate_options: null|(object{amount: int, amount_type: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: null|string, require_cvc_recollection?: bool, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&StripeObject), card_present?: (object{capture_method?: string, request_extended_authorization: null|bool, request_incremental_authorization_support: null|bool, routing?: (object{requested_priority: null|string}&StripeObject)}&StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), crypto?: (object{setup_future_usage?: string}&StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), requested_address_types?: string[], type: null|string}&StripeObject), funding_type: null|string, setup_future_usage?: string}&StripeObject), eps?: (object{setup_future_usage?: string}&StripeObject), fpx?: (object{setup_future_usage?: string}&StripeObject), giropay?: (object{setup_future_usage?: string}&StripeObject), grabpay?: (object{setup_future_usage?: string}&StripeObject), ideal?: (object{setup_future_usage?: string}&StripeObject), interac_present?: (object{}&StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), klarna?: (object{capture_method?: string, preferred_locale: null|string, setup_future_usage?: string}&StripeObject), konbini?: (object{confirmation_number: null|string, expires_after_days: null|int, expires_at: null|int, product_description: null|string, setup_future_usage?: string}&StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), link?: (object{capture_method?: string, persistent_token: null|string, setup_future_usage?: string}&StripeObject), mb_way?: (object{setup_future_usage?: string}&StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), multibanco?: (object{setup_future_usage?: string}&StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), nz_bank_account?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), p24?: (object{setup_future_usage?: string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{capture_method?: string}&StripeObject), paynow?: (object{setup_future_usage?: string}&StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string}&StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string}&StripeObject), setup_future_usage?: string}&StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, expires_at: null|int, setup_future_usage?: string}&StripeObject), promptpay?: (object{setup_future_usage?: string}&StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), samsung_pay?: (object{capture_method?: string}&StripeObject), satispay?: (object{capture_method?: string}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), sofort?: (object{preferred_language: null|string, setup_future_usage?: string}&StripeObject), swish?: (object{reference: null|string, setup_future_usage?: string}&StripeObject), twint?: (object{setup_future_usage?: string}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), setup_future_usage?: string, target_date?: string, transaction_purpose?: string, verification_method?: string, preferred_settlement_speed?: string}&StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&StripeObject), zip?: (object{setup_future_usage?: string}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this PaymentIntent. + * @property null|(object{acss_debit?: (object{mandate_options?: (object{custom_mandate_url?: string, interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&StripeObject), affirm?: (object{capture_method?: string, preferred_locale?: string, setup_future_usage?: string}&StripeObject), afterpay_clearpay?: (object{capture_method?: string, reference: null|string, setup_future_usage?: string}&StripeObject), alipay?: (object{setup_future_usage?: string}&StripeObject), alma?: (object{capture_method?: string}&StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), bancontact?: (object{preferred_language: string, setup_future_usage?: string}&StripeObject), billie?: (object{capture_method?: string}&StripeObject), bizum?: (object{}&StripeObject), blik?: (object{setup_future_usage?: string}&StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), card?: (object{capture_method?: string, installments: null|(object{available_plans: null|((object{count: null|int, interval: null|string, type: string}&StripeObject))[], enabled: bool, plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), mandate_options: null|(object{amount: int, amount_type: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: null|string, require_cvc_recollection?: bool, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&StripeObject), card_present?: (object{capture_method?: string, request_extended_authorization: null|bool, request_incremental_authorization_support: null|bool, routing?: (object{requested_priority: null|string}&StripeObject)}&StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), crypto?: (object{setup_future_usage?: string}&StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), requested_address_types?: string[], type: null|string}&StripeObject), funding_type: null|string, setup_future_usage?: string}&StripeObject), eps?: (object{setup_future_usage?: string}&StripeObject), fpx?: (object{setup_future_usage?: string}&StripeObject), giropay?: (object{setup_future_usage?: string}&StripeObject), grabpay?: (object{setup_future_usage?: string}&StripeObject), ideal?: (object{setup_future_usage?: string}&StripeObject), interac_present?: (object{}&StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), klarna?: (object{capture_method?: string, preferred_locale: null|string, setup_future_usage?: string}&StripeObject), konbini?: (object{confirmation_number: null|string, expires_after_days: null|int, expires_at: null|int, product_description: null|string, setup_future_usage?: string}&StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), link?: (object{capture_method?: string, persistent_token: null|string, setup_future_usage?: string}&StripeObject), mb_way?: (object{setup_future_usage?: string}&StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), multibanco?: (object{setup_future_usage?: string}&StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), nz_bank_account?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), p24?: (object{setup_future_usage?: string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{capture_method?: string}&StripeObject), paynow?: (object{setup_future_usage?: string}&StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string}&StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string}&StripeObject), setup_future_usage?: string}&StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, expires_at: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject), setup_future_usage?: string}&StripeObject), promptpay?: (object{setup_future_usage?: string}&StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), samsung_pay?: (object{capture_method?: string}&StripeObject), satispay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), scalapay?: (object{capture_method?: string}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), sofort?: (object{preferred_language: null|string, setup_future_usage?: string}&StripeObject), sunbit?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), swish?: (object{reference: null|string, setup_future_usage?: string}&StripeObject), twint?: (object{setup_future_usage?: string}&StripeObject), upi?: (object{setup_future_usage?: string}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), setup_future_usage?: string, target_date?: string, transaction_purpose?: string, verification_method?: string}&StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&StripeObject), zip?: (object{setup_future_usage?: string}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this PaymentIntent. * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found here. * @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details * @property null|(object{card?: (object{customer_notification?: (object{approval_requested: null|bool, completes_at: null|int}&StripeObject)}&StripeObject), type: string}&StripeObject) $processing If present, this property tells you about the processing state of the payment. @@ -59,7 +60,7 @@ namespace Stripe; * @property null|string $statement_descriptor

Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.

Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.

* @property null|string $statement_descriptor_suffix Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement. * @property string $status Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status. - * @property null|(object{amount?: int, destination: Account|string}&StripeObject) $transfer_data The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts. + * @property null|(object{amount?: int, description?: string, destination: Account|string, metadata?: StripeObject, payment_data?: (object{description?: string, metadata?: StripeObject}&StripeObject)}&StripeObject) $transfer_data The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts. * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts. */ class PaymentIntent extends ApiResource @@ -109,7 +110,7 @@ class PaymentIntent extends ApiResource * parameters available in the confirm * API when you supply confirm=true. * - * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: 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, off_session?: array|bool|string, on_behalf_of?: string, payment_details?: array{customer_reference?: null|string, order_reference?: null|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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string, preferred_settlement_speed?: null|string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: 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}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string, use_stripe_sdk?: bool} $params + * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: 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, off_session?: array|bool|string, on_behalf_of?: string, payment_details?: array{customer_reference?: null|string, order_reference?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, bizum?: null|array{}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, scalapay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, sunbit?: null|array{capture_method?: null|string, setup_future_usage?: string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: 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}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, destination: string, metadata?: null|array, payment_data?: array{description?: string, metadata?: null|array}}, transfer_group?: string, use_stripe_sdk?: bool} $params * @param null|array|string $options * * @return PaymentIntent the created resource @@ -181,7 +182,7 @@ class PaymentIntent extends ApiResource * href="/docs/api/payment_intents/confirm">confirm API instead. * * @param string $id the ID of the resource to update - * @param null|array{amount?: int, amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: null|int, capture_method?: string, currency?: string, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, metadata?: null|array, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string, preferred_settlement_speed?: null|string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], receipt_email?: null|string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}, transfer_group?: string} $params + * @param null|array{amount?: int, amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: null|int, capture_method?: string, currency?: string, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, metadata?: null|array, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, bizum?: null|array{}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, scalapay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, sunbit?: null|array{capture_method?: null|string, setup_future_usage?: string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], receipt_email?: null|string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, metadata?: null|array, payment_data?: array{description?: string, metadata?: null|array}}, transfer_group?: string} $params * @param null|array|string $opts * * @return PaymentIntent the updated resource diff --git a/libs/stripe-php/lib/PaymentLink.php b/libs/stripe-php/lib/PaymentLink.php index 95521441..ee470d67 100644 --- a/libs/stripe-php/lib/PaymentLink.php +++ b/libs/stripe-php/lib/PaymentLink.php @@ -29,13 +29,15 @@ namespace Stripe; * @property null|string $inactive_message The custom message to be displayed to a customer when a payment link is no longer active. * @property null|(object{enabled: bool, invoice_data: null|(object{account_tax_ids: null|(string|TaxId)[], custom_fields: null|(object{name: string, value: string}&StripeObject)[], description: null|string, footer: null|string, issuer: null|(object{account?: Account|string, type: string}&StripeObject), metadata: null|StripeObject, rendering_options: null|(object{amount_tax_display: null|string, template: null|string}&StripeObject)}&StripeObject)}&StripeObject) $invoice_creation Configuration for creating invoice for payment mode payment links. * @property null|Collection $line_items The line items representing what is being sold. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|(object{enabled: bool}&StripeObject) $managed_payments Settings for Managed Payments for this Payment Link and resulting CheckoutSessions, PaymentIntents, Invoices, and Subscriptions. * @property StripeObject $metadata Set of key-value pairs 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 Connect documentation 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{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 string $payment_method_collection Configuration for collecting a payment method during checkout. Defaults to always. + * @property null|(object{card: null|(object{restrictions: null|(object{brands_blocked: string[]}&StripeObject)}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration. * @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings. * @property (object{enabled: bool}&StripeObject) $phone_number_collection * @property null|(object{completed_sessions: (object{count: int, limit: int}&StripeObject)}&StripeObject) $restrictions Settings that restrict the usage of a payment link. @@ -71,7 +73,7 @@ class PaymentLink extends ApiResource /** * 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, 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, 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, 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, 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, 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, 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, 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}[], managed_payments?: array{enabled?: bool}, metadata?: array, 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, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_options?: array{card?: array{restrictions?: array{brands_blocked?: 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, 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 * * @return PaymentLink the created resource @@ -130,7 +132,7 @@ class PaymentLink extends ApiResource * Updates a payment link. * * @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, 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, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array, 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, 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, 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, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|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, 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 * * @return PaymentLink the updated resource diff --git a/libs/stripe-php/lib/PaymentMethod.php b/libs/stripe-php/lib/PaymentMethod.php index f994852a..e74acaf9 100644 --- a/libs/stripe-php/lib/PaymentMethod.php +++ b/libs/stripe-php/lib/PaymentMethod.php @@ -25,7 +25,8 @@ namespace Stripe; * @property null|(object{}&StripeObject) $bancontact * @property null|(object{}&StripeObject) $billie * @property (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&StripeObject) $billing_details - * @property null|(object{}&StripeObject) $blik + * @property null|(object{buyer_id?: null|string}&StripeObject) $bizum + * @property null|(object{buyer_id?: null|string}&StripeObject) $blik * @property null|(object{tax_id: string}&StripeObject) $boleto * @property null|(object{brand: string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, generated_from: null|(object{charge: null|string, payment_method_details: null|(object{card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), type: string}&StripeObject), setup_attempt: null|SetupAttempt|string}&StripeObject), iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), regulated_status: null|string, three_d_secure_usage: null|(object{supported: bool}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject) $card * @property null|(object{brand: null|string, brand_product: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), preferred_locales: null|string[], read_method: null|string, wallet?: (object{type: string}&StripeObject)}&StripeObject) $card_present @@ -47,7 +48,7 @@ namespace Stripe; * @property null|(object{}&StripeObject) $konbini * @property null|(object{brand: null|string, last4: null|string}&StripeObject) $kr_card * @property null|(object{email: null|string, persistent_token?: string}&StripeObject) $link - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{}&StripeObject) $mb_way * @property null|StripeObject $metadata Set of key-value pairs 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 @@ -61,17 +62,20 @@ namespace Stripe; * @property null|(object{}&StripeObject) $paynow * @property null|(object{country: null|string, payer_email: null|string, payer_id: null|string}&StripeObject) $paypal * @property null|(object{bsb_number: null|string, last4: null|string, pay_id: null|string}&StripeObject) $payto - * @property null|(object{}&StripeObject) $pix + * @property null|(object{fingerprint?: null|string}&StripeObject) $pix * @property null|(object{}&StripeObject) $promptpay * @property null|(object{session?: string}&StripeObject) $radar_options Options to configure Radar. See Radar Session for more information. * @property null|(object{}&StripeObject) $revolut_pay * @property null|(object{}&StripeObject) $samsung_pay * @property null|(object{}&StripeObject) $satispay + * @property null|(object{}&StripeObject) $scalapay * @property null|(object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, generated_from: null|(object{charge: null|Charge|string, setup_attempt: null|SetupAttempt|string}&StripeObject), last4: null|string}&StripeObject) $sepa_debit * @property null|(object{country: null|string}&StripeObject) $sofort + * @property null|(object{}&StripeObject) $sunbit * @property null|(object{}&StripeObject) $swish * @property null|(object{}&StripeObject) $twint * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @property null|(object{vpa: null|string}&StripeObject) $upi * @property null|(object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, financial_connections_account: null|string, fingerprint: null|string, last4: null|string, networks: null|(object{preferred: null|string, supported: string[]}&StripeObject), routing_number: null|string, status_details: null|(object{blocked?: (object{network_code: null|string, reason: null|string}&StripeObject)}&StripeObject)}&StripeObject) $us_bank_account * @property null|(object{}&StripeObject) $wechat_pay * @property null|(object{}&StripeObject) $zip @@ -96,6 +100,7 @@ class PaymentMethod extends ApiResource const TYPE_BACS_DEBIT = 'bacs_debit'; const TYPE_BANCONTACT = 'bancontact'; const TYPE_BILLIE = 'billie'; + const TYPE_BIZUM = 'bizum'; const TYPE_BLIK = 'blik'; const TYPE_BOLETO = 'boleto'; const TYPE_CARD = 'card'; @@ -132,10 +137,13 @@ class PaymentMethod extends ApiResource const TYPE_REVOLUT_PAY = 'revolut_pay'; const TYPE_SAMSUNG_PAY = 'samsung_pay'; const TYPE_SATISPAY = 'satispay'; + const TYPE_SCALAPAY = 'scalapay'; const TYPE_SEPA_DEBIT = 'sepa_debit'; const TYPE_SOFORT = 'sofort'; + const TYPE_SUNBIT = 'sunbit'; const TYPE_SWISH = 'swish'; const TYPE_TWINT = 'twint'; + const TYPE_UPI = 'upi'; const TYPE_US_BANK_ACCOUNT = 'us_bank_account'; const TYPE_WECHAT_PAY = 'wechat_pay'; const TYPE_ZIP = 'zip'; @@ -151,7 +159,7 @@ class PaymentMethod extends ApiResource * href="/docs/payments/save-and-reuse">SetupIntent API to collect 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{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type?: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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 * * @return PaymentMethod the created resource diff --git a/libs/stripe-php/lib/PaymentMethodConfiguration.php b/libs/stripe-php/lib/PaymentMethodConfiguration.php index 6bdcfb31..8fc52271 100644 --- a/libs/stripe-php/lib/PaymentMethodConfiguration.php +++ b/libs/stripe-php/lib/PaymentMethodConfiguration.php @@ -35,6 +35,7 @@ namespace Stripe; * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $bacs_debit * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $bancontact * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $billie + * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $bizum * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $blik * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $boleto * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $card @@ -55,7 +56,7 @@ namespace Stripe; * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $konbini * @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 bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @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) $multibanco @@ -75,10 +76,13 @@ namespace Stripe; * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $revolut_pay * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $samsung_pay * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $satispay + * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $scalapay * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $sepa_debit * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $sofort + * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $sunbit * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $swish * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $twint + * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $upi * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $us_bank_account * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $wechat_pay * @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $zip @@ -92,7 +96,7 @@ class PaymentMethodConfiguration extends ApiResource /** * 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}}, 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}}, payto?: 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}}, bizum?: 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}}, payto?: 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}}, scalapay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, sunbit?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, upi?: 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 * * @return PaymentMethodConfiguration the created resource @@ -114,7 +118,7 @@ class PaymentMethodConfiguration extends ApiResource /** * List payment method configurations. * - * @param null|array{application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params + * @param null|array{active?: bool, application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params * @param null|array|string $opts * * @return Collection of ApiResources @@ -151,7 +155,7 @@ class PaymentMethodConfiguration extends ApiResource * Update payment method configuration. * * @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}}, 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}}, payto?: 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}}, bizum?: 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}}, payto?: 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}}, scalapay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, sunbit?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, upi?: 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 * * @return PaymentMethodConfiguration the updated resource diff --git a/libs/stripe-php/lib/PaymentMethodDomain.php b/libs/stripe-php/lib/PaymentMethodDomain.php index 328db8e9..932024d0 100644 --- a/libs/stripe-php/lib/PaymentMethodDomain.php +++ b/libs/stripe-php/lib/PaymentMethodDomain.php @@ -20,7 +20,7 @@ namespace Stripe; * @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $google_pay Indicates the status of a specific payment method on a payment method domain. * @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $klarna Indicates the status of a specific payment method on a payment method domain. * @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $link Indicates the status of a specific payment method on a payment method domain. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $paypal Indicates the status of a specific payment method on a payment method domain. */ class PaymentMethodDomain extends ApiResource diff --git a/libs/stripe-php/lib/PaymentRecord.php b/libs/stripe-php/lib/PaymentRecord.php index 64dced48..ddf76e24 100644 --- a/libs/stripe-php/lib/PaymentRecord.php +++ b/libs/stripe-php/lib/PaymentRecord.php @@ -25,9 +25,9 @@ namespace Stripe; * @property null|string $customer_presence Indicates whether the customer was present in your checkout flow during this payment. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string $latest_payment_attempt_record ID of the latest Payment Attempt Record attached to this Payment Record. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{authorization_code: null|string, brand: string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, iin: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer: null|string, last4: string, moto?: bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, stored_credential_usage: null|string, three_d_secure: null|(object{authentication_flow: null|string, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{}&StripeObject), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment. + * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&StripeObject), transaction_id: null|string}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment. * @property (object{custom?: (object{payment_reference: null|string}&StripeObject), type: string}&StripeObject) $processor_details Processor information associated with this payment. * @property string $reported_by Indicates who reported the payment. * @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), name: null|string, phone: null|string}&StripeObject) $shipping_details Shipping information for this payment. diff --git a/libs/stripe-php/lib/Payout.php b/libs/stripe-php/lib/Payout.php index c9c12a1a..3a4aeed7 100644 --- a/libs/stripe-php/lib/Payout.php +++ b/libs/stripe-php/lib/Payout.php @@ -29,7 +29,7 @@ namespace Stripe; * @property null|BalanceTransaction|string $failure_balance_transaction If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. * @property null|string $failure_code Error code that provides a reason for a payout failure, if available. View our list of failure codes. * @property null|string $failure_message Message that provides the reason for a payout failure, if available. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $method The method used to send this payout, which can be standard or instant. instant is supported for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts. * @property null|Payout|string $original_payout If the payout reverses another, this is the ID of the original payout. @@ -74,8 +74,8 @@ class Payout extends ApiResource * * If you create a manual payout on a Stripe account that uses multiple payment * source types, you need to specify the source type balance that the payout draws - * from. The balance object details available and - * pending amounts by source type. + * from. The balance object details available + * and pending amounts by source type. * * @param null|array{amount: int, currency: string, description?: string, destination?: string, expand?: string[], metadata?: array, method?: string, payout_method?: string, source_type?: string, statement_descriptor?: string} $params * @param null|array|string $options diff --git a/libs/stripe-php/lib/Plan.php b/libs/stripe-php/lib/Plan.php index 5b211c26..636c4ecc 100644 --- a/libs/stripe-php/lib/Plan.php +++ b/libs/stripe-php/lib/Plan.php @@ -24,7 +24,7 @@ namespace Stripe; * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $interval The frequency at which a subscription is billed. One of day, week, month or year. * @property int $interval_count The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs 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 $meter The meter tracking the usage of a metered price * @property null|string $nickname A brief description of the plan, hidden from customers. diff --git a/libs/stripe-php/lib/Price.php b/libs/stripe-php/lib/Price.php index 17fd2848..a2ae6b09 100644 --- a/libs/stripe-php/lib/Price.php +++ b/libs/stripe-php/lib/Price.php @@ -20,7 +20,7 @@ namespace Stripe; * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. * @property null|(object{maximum: null|int, minimum: null|int, preset: null|int}&StripeObject) $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $nickname A brief description of the price, hidden from customers. diff --git a/libs/stripe-php/lib/Product.php b/libs/stripe-php/lib/Product.php index e73af652..9f5423df 100644 --- a/libs/stripe-php/lib/Product.php +++ b/libs/stripe-php/lib/Product.php @@ -21,7 +21,7 @@ namespace Stripe; * @property null|Price|string $default_price The ID of the Price object that is the default price for this product. * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property (object{name?: string}&StripeObject)[] $marketing_features A list of up to 15 marketing features for this product. These are displayed in pricing tables. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $name The product's name, meant to be displayable to the customer. diff --git a/libs/stripe-php/lib/ProductFeature.php b/libs/stripe-php/lib/ProductFeature.php index a5aac756..b1292390 100644 --- a/libs/stripe-php/lib/ProductFeature.php +++ b/libs/stripe-php/lib/ProductFeature.php @@ -11,7 +11,7 @@ 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 Entitlements\Feature $entitlement_feature A feature represents a monetizable ability or functionality in your system. Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. */ class ProductFeature extends ApiResource { diff --git a/libs/stripe-php/lib/PromotionCode.php b/libs/stripe-php/lib/PromotionCode.php index 260427dc..8c176276 100644 --- a/libs/stripe-php/lib/PromotionCode.php +++ b/libs/stripe-php/lib/PromotionCode.php @@ -19,7 +19,7 @@ namespace Stripe; * @property null|Customer|string $customer The customer who can use this promotion code. * @property null|string $customer_account The account representing the customer who can use this promotion code. * @property null|int $expires_at Date at which the promotion code can no longer be redeemed. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed. * @property null|StripeObject $metadata Set of key-value pairs 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 diff --git a/libs/stripe-php/lib/Quote.php b/libs/stripe-php/lib/Quote.php index ec608042..ed945d15 100644 --- a/libs/stripe-php/lib/Quote.php +++ b/libs/stripe-php/lib/Quote.php @@ -32,7 +32,7 @@ namespace Stripe; * @property null|Invoice|string $invoice The invoice that was created from this quote. * @property (object{days_until_due: null|int, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings * @property null|Collection $line_items A list of items the customer is being quoted for. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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 $number A unique number that identifies this particular quote. This number is assigned once the quote is finalized. * @property null|Account|string $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details. diff --git a/libs/stripe-php/lib/Radar/EarlyFraudWarning.php b/libs/stripe-php/lib/Radar/EarlyFraudWarning.php index f85b3bab..cdd1775c 100644 --- a/libs/stripe-php/lib/Radar/EarlyFraudWarning.php +++ b/libs/stripe-php/lib/Radar/EarlyFraudWarning.php @@ -16,7 +16,7 @@ namespace Stripe\Radar; * @property string|\Stripe\Charge $charge ID of the charge this early fraud warning is for, optionally expanded. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded. */ class EarlyFraudWarning extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/Radar/PaymentEvaluation.php b/libs/stripe-php/lib/Radar/PaymentEvaluation.php index c4110320..96c24db8 100644 --- a/libs/stripe-php/lib/Radar/PaymentEvaluation.php +++ b/libs/stripe-php/lib/Radar/PaymentEvaluation.php @@ -13,16 +13,20 @@ namespace Stripe\Radar; * @property int $created_at Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|(object{customer: null|string, customer_account: null|string, email: null|string, name: null|string, phone: null|string}&\Stripe\StripeObject) $customer_details Customer details attached to this payment evaluation. * @property null|((object{dispute_opened?: (object{amount: int, currency: string, reason: string}&\Stripe\StripeObject), early_fraud_warning_received?: (object{fraud_type: string}&\Stripe\StripeObject), occurred_at: int, refunded?: (object{amount: int, currency: string, reason: string}&\Stripe\StripeObject), type: string, user_intervention_raised?: (object{custom?: (object{type: string}&\Stripe\StripeObject), key: string, type: string}&\Stripe\StripeObject), user_intervention_resolved?: (object{key: string, outcome: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject))[] $events Event information associated with the payment evaluation, such as refunds, dispute, early fraud warnings, or user interventions. - * @property (object{evaluated_at: int, fraudulent_dispute: (object{recommended_action: string, risk_score: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $insights Collection of scores and insights for this payment evaluation. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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{merchant_blocked?: (object{reason: string}&\Stripe\StripeObject), payment_intent_id?: string, rejected?: (object{card?: (object{address_line1_check: string, address_postal_code_check: string, cvc_check: string, reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), succeeded?: (object{card?: (object{address_line1_check: string, address_postal_code_check: string, cvc_check: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $outcome Indicates the final outcome for the payment evaluation. * @property null|(object{amount: int, currency: string, description: null|string, money_movement_details: null|(object{card: null|(object{customer_presence: null|string, payment_type: null|string}&\Stripe\StripeObject), money_movement_type: string}&\Stripe\StripeObject), payment_method_details: null|(object{billing_details: 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), email: null|string, name: null|string, phone: null|string}&\Stripe\StripeObject), payment_method: string|\Stripe\PaymentMethod}&\Stripe\StripeObject), shipping_details: 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), name: null|string, phone: null|string}&\Stripe\StripeObject), statement_descriptor: null|string}&\Stripe\StripeObject) $payment_details Payment details attached to this payment evaluation. + * @property string $recommended_action Recommended action based on the score of the fraudulent_payment signal. Possible values are block, continue and request_three_d_secure. + * @property (object{fraudulent_payment: (object{evaluated_at: int, risk_level: string, score: float}&\Stripe\StripeObject)}&\Stripe\StripeObject) $signals Collection of signals for this payment evaluation. */ class PaymentEvaluation extends \Stripe\ApiResource { const OBJECT_NAME = 'radar.payment_evaluation'; + const RECOMMENDED_ACTION_BLOCK = 'block'; + const RECOMMENDED_ACTION_CONTINUE = 'continue'; + /** * Request a Radar API fraud risk score from Stripe for a payment before sending it * for external processor authorization. diff --git a/libs/stripe-php/lib/Radar/ValueList.php b/libs/stripe-php/lib/Radar/ValueList.php index 25f0f1c9..aa26ddca 100644 --- a/libs/stripe-php/lib/Radar/ValueList.php +++ b/libs/stripe-php/lib/Radar/ValueList.php @@ -14,9 +14,9 @@ namespace Stripe\Radar; * @property string $alias The name of the value list for use in rules. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $created_by The name or email address of the user who created this value list. - * @property string $item_type The type of items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, customer_id, sepa_debit_fingerprint, or us_bank_account_fingerprint. + * @property string $item_type The type of items in the value list. One of card_fingerprint, card_bin, crypto_fingerprint, email, ip_address, country, string, case_sensitive_string, customer_id, account, sepa_debit_fingerprint, or us_bank_account_fingerprint. * @property \Stripe\Collection $list_items List of items contained within this value list. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $name The name of the value list. */ @@ -26,10 +26,12 @@ class ValueList extends \Stripe\ApiResource use \Stripe\ApiOperations\Update; + const ITEM_TYPE_ACCOUNT = 'account'; const ITEM_TYPE_CARD_BIN = 'card_bin'; const ITEM_TYPE_CARD_FINGERPRINT = 'card_fingerprint'; const ITEM_TYPE_CASE_SENSITIVE_STRING = 'case_sensitive_string'; const ITEM_TYPE_COUNTRY = 'country'; + const ITEM_TYPE_CRYPTO_FINGERPRINT = 'crypto_fingerprint'; const ITEM_TYPE_CUSTOMER_ID = 'customer_id'; const ITEM_TYPE_EMAIL = 'email'; const ITEM_TYPE_IP_ADDRESS = 'ip_address'; diff --git a/libs/stripe-php/lib/Radar/ValueListItem.php b/libs/stripe-php/lib/Radar/ValueListItem.php index 34e64da3..59f0e0ad 100644 --- a/libs/stripe-php/lib/Radar/ValueListItem.php +++ b/libs/stripe-php/lib/Radar/ValueListItem.php @@ -13,7 +13,7 @@ namespace Stripe\Radar; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $created_by The name or email address of the user who added this item to the value list. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $value The value of the item. * @property string $value_list The identifier of the value list this item belongs to. */ diff --git a/libs/stripe-php/lib/Refund.php b/libs/stripe-php/lib/Refund.php index 462dd47a..83a4377e 100644 --- a/libs/stripe-php/lib/Refund.php +++ b/libs/stripe-php/lib/Refund.php @@ -19,7 +19,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @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), 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), mb_way?: (object{reference: null|string, reference_status: null|string}&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), twint?: (object{}&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), mb_way?: (object{reference: null|string, reference_status: null|string}&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), scalapay?: (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), twint?: (object{}&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|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card, expired_or_canceled_card, charge_for_pending_refund_disputed, insufficient_funds, declined, merchant_request, or unknown. * @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. diff --git a/libs/stripe-php/lib/Reporting/ReportType.php b/libs/stripe-php/lib/Reporting/ReportType.php index a3cef891..b36cfeeb 100644 --- a/libs/stripe-php/lib/Reporting/ReportType.php +++ b/libs/stripe-php/lib/Reporting/ReportType.php @@ -19,7 +19,7 @@ namespace Stripe\Reporting; * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the columns parameter, this will be null.) - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $name Human-readable name of the Report Type * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch. * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. diff --git a/libs/stripe-php/lib/Reserve/Hold.php b/libs/stripe-php/lib/Reserve/Hold.php index 6e4bdb97..ad7e6ee6 100644 --- a/libs/stripe-php/lib/Reserve/Hold.php +++ b/libs/stripe-php/lib/Reserve/Hold.php @@ -15,9 +15,10 @@ namespace Stripe\Reserve; * @property string $created_by Indicates which party created this ReserveHold. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|bool $is_releasable Whether there are any funds available to release on this ReserveHold. Note that if the ReserveHold is in the process of being released, this could be false, even though the funds haven't been fully released yet. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $reason The reason for the ReserveHold. + * @property null|(object{amount: int, reserve_release: string}&\Stripe\StripeObject)[] $release_details List of ReserveReleases and the amounts released from this ReserveHold. * @property (object{release_after: null|int, scheduled_release: null|int}&\Stripe\StripeObject) $release_schedule * @property null|Plan|string $reserve_plan The ReservePlan which produced this ReserveHold (i.e., resplan_123) * @property null|string|\Stripe\Charge $source_charge The Charge which funded this ReserveHold (e.g., ch_123) diff --git a/libs/stripe-php/lib/Reserve/Plan.php b/libs/stripe-php/lib/Reserve/Plan.php index 034dd10d..76e64630 100644 --- a/libs/stripe-php/lib/Reserve/Plan.php +++ b/libs/stripe-php/lib/Reserve/Plan.php @@ -14,7 +14,7 @@ namespace Stripe\Reserve; * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. An unset currency indicates that the plan applies to all currencies. * @property null|int $disabled_at Time at which the ReservePlan was disabled. * @property null|(object{release_after: int, scheduled_release: int}&\Stripe\StripeObject) $fixed_release - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property int $percent The percent of each Charge to reserve. * @property null|(object{days_after_charge: int, expires_on: null|int}&\Stripe\StripeObject) $rolling_release diff --git a/libs/stripe-php/lib/Reserve/Release.php b/libs/stripe-php/lib/Reserve/Release.php index e9bc2d16..73825fbd 100644 --- a/libs/stripe-php/lib/Reserve/Release.php +++ b/libs/stripe-php/lib/Reserve/Release.php @@ -13,7 +13,7 @@ namespace Stripe\Reserve; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $created_by Indicates which party created this ReserveRelease. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $reason The reason for the ReserveRelease, indicating why the funds were released. * @property int $released_at The release timestamp of the funds. diff --git a/libs/stripe-php/lib/Review.php b/libs/stripe-php/lib/Review.php index fd29bad9..c98321a5 100644 --- a/libs/stripe-php/lib/Review.php +++ b/libs/stripe-php/lib/Review.php @@ -18,7 +18,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $ip_address The IP address where the payment originated. * @property null|(object{city: null|string, country: null|string, latitude: null|float, longitude: null|float, region: null|string}&StripeObject) $ip_address_location Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property bool $open If true, the review needs action. * @property string $opened_reason The reason the review was opened. One of rule or manual. * @property null|PaymentIntent|string $payment_intent The PaymentIntent ID associated with this review, if one exists. diff --git a/libs/stripe-php/lib/Service/AbstractService.php b/libs/stripe-php/lib/Service/AbstractService.php index 23132a37..fdafae75 100644 --- a/libs/stripe-php/lib/Service/AbstractService.php +++ b/libs/stripe-php/lib/Service/AbstractService.php @@ -49,18 +49,25 @@ abstract class AbstractService } /** - * Translate null values to empty strings. For service methods, - * we interpret null as a request to unset the field, which - * corresponds to sending an empty string for the field to the - * API. + * Translate null values to empty strings for v1 API requests. + * For v1, we interpret null as a request to unset the field, + * which corresponds to sending an empty string in the + * form-encoded body. + * + * For v2, null values are preserved as-is so they serialize + * to JSON null, which is the v2 mechanism for clearing fields. * * @param null|array $params + * @param 'v1'|'v2' $apiMode */ - private static function formatParams($params) + private static function formatParams($params, $apiMode) { if (null === $params) { return null; } + if ('v2' === $apiMode) { + return $params; + } \array_walk_recursive($params, static function (&$value, $key) { if (null === $value) { $value = ''; @@ -70,24 +77,44 @@ abstract class AbstractService return $params; } - protected function request($method, $path, $params, $opts) + protected function request($method, $path, $params, $opts, $schemas = null) { - return $this->getClient()->request($method, $path, self::formatParams($params), $opts); + $apiMode = \Stripe\Util\Util::getApiMode($path); + $params = self::formatParams($params, $apiMode); + if (null !== $schemas && isset($schemas['request_schema'])) { + $params = \Stripe\Util\Int64::coerceRequestParams($params, $schemas['request_schema']); + } + + return $this->getClient()->request($method, $path, $params, $opts); } protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) { - return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params), $opts); + $apiMode = \Stripe\Util\Util::getApiMode($path); + + return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, self::formatParams($params, $apiMode), $opts); } - protected function requestCollection($method, $path, $params, $opts) + protected function requestCollection($method, $path, $params, $opts, $schemas = null) { - return $this->getClient()->requestCollection($method, $path, self::formatParams($params), $opts); + $apiMode = \Stripe\Util\Util::getApiMode($path); + $params = self::formatParams($params, $apiMode); + if (null !== $schemas && isset($schemas['request_schema'])) { + $params = \Stripe\Util\Int64::coerceRequestParams($params, $schemas['request_schema']); + } + + return $this->getClient()->requestCollection($method, $path, $params, $opts); } - protected function requestSearchResult($method, $path, $params, $opts) + protected function requestSearchResult($method, $path, $params, $opts, $schemas = null) { - return $this->getClient()->requestSearchResult($method, $path, self::formatParams($params), $opts); + $apiMode = \Stripe\Util\Util::getApiMode($path); + $params = self::formatParams($params, $apiMode); + if (null !== $schemas && isset($schemas['request_schema'])) { + $params = \Stripe\Util\Int64::coerceRequestParams($params, $schemas['request_schema']); + } + + return $this->getClient()->requestSearchResult($method, $path, $params, $opts); } protected function buildPath($basePath, ...$ids) diff --git a/libs/stripe-php/lib/Service/AccountService.php b/libs/stripe-php/lib/Service/AccountService.php index b69760dd..176ca719 100644 --- a/libs/stripe-php/lib/Service/AccountService.php +++ b/libs/stripe-php/lib/Service/AccountService.php @@ -91,7 +91,7 @@ class AccountService extends AbstractService * information during account onboarding. You can prefill any information on the * account. * - * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params + * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, app_distribution?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, bizum_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, scalapay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, sunbit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, upi_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Account @@ -315,7 +315,7 @@ class AccountService extends AbstractService * more about updating accounts. * * @param string $id - * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params + * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, app_distribution?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, bizum_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, scalapay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, sunbit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, upi_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, 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_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}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|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, 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}}}, metadata?: null|array, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Account diff --git a/libs/stripe-php/lib/Service/AccountSessionService.php b/libs/stripe-php/lib/Service/AccountSessionService.php index f16182d4..c0bc154b 100644 --- a/libs/stripe-php/lib/Service/AccountSessionService.php +++ b/libs/stripe-php/lib/Service/AccountSessionService.php @@ -15,7 +15,7 @@ class AccountSessionService extends AbstractService * 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. * - * @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{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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\AccountSession diff --git a/libs/stripe-php/lib/Service/BalanceSettingsService.php b/libs/stripe-php/lib/Service/BalanceSettingsService.php index 2908492c..c0ce287c 100644 --- a/libs/stripe-php/lib/Service/BalanceSettingsService.php +++ b/libs/stripe-php/lib/Service/BalanceSettingsService.php @@ -31,7 +31,7 @@ class BalanceSettingsService extends AbstractService * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts. * - * @param null|array{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{minimum_balance_by_currency?: null|array, 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{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{automatic_transfer_rules_by_currency?: null|array, minimum_balance_by_currency?: null|array, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_timing?: array{delay_days_override?: null|int, start_of_day?: null|array{hour?: int, minutes?: int, timezone?: string}}}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\BalanceSettings diff --git a/libs/stripe-php/lib/Service/BalanceTransactionService.php b/libs/stripe-php/lib/Service/BalanceTransactionService.php index d00ea6c6..1877d61f 100644 --- a/libs/stripe-php/lib/Service/BalanceTransactionService.php +++ b/libs/stripe-php/lib/Service/BalanceTransactionService.php @@ -13,11 +13,11 @@ class BalanceTransactionService extends AbstractService { /** * Returns a list of transactions that have contributed to the Stripe account - * balance (e.g., charges, transfers, and so forth). The transactions are returned - * in sorted order, with the most recent transactions appearing first. + * balance (for example, charges, transfers, and so on). The transactions return in + * sorted order, with the most recent transactions appearing first. * - * Note that this endpoint was previously called “Balance history” and used the - * path /v1/balance/history. + * The previous name of this endpoint was “Balance history,” and it used the path + * /v1/balance/history. * * @param null|array{created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, payout?: string, source?: string, starting_after?: string, type?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts diff --git a/libs/stripe-php/lib/Service/ChargeService.php b/libs/stripe-php/lib/Service/ChargeService.php index 301fd2bf..8d3e70e9 100644 --- a/libs/stripe-php/lib/Service/ChargeService.php +++ b/libs/stripe-php/lib/Service/ChargeService.php @@ -57,7 +57,7 @@ class ChargeService extends AbstractService * payment instead. Confirmation of the PaymentIntent creates the * Charge object used to request payment. * - * @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|array, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string} $params + * @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|array, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, destination: string}, transfer_group?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Charge diff --git a/libs/stripe-php/lib/Service/Checkout/SessionService.php b/libs/stripe-php/lib/Service/Checkout/SessionService.php index 65bbbc2f..c574fdc1 100644 --- a/libs/stripe-php/lib/Service/Checkout/SessionService.php +++ b/libs/stripe-php/lib/Service/Checkout/SessionService.php @@ -48,7 +48,7 @@ class SessionService extends \Stripe\Service\AbstractService /** * Creates a Checkout Session object. * - * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: string}}, cancel_url?: string, client_reference_id?: 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?: string, customer_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], excluded_payment_method_types?: string[], expand?: string[], expires_at?: int, 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?: array, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: array, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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, tax_rates?: string[]}[], locale?: string, metadata?: array, mode?: string, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], origin_context?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: array, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, 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}, setup_future_usage?: string, target_date?: string, verification_method?: string}, affirm?: array{capture_method?: string, setup_future_usage?: string}, afterpay_clearpay?: array{capture_method?: string, setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, alma?: array{capture_method?: string}, amazon_pay?: array{capture_method?: string, setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string, target_date?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, bancontact?: array{setup_future_usage?: string}, billie?: array{capture_method?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{capture_method?: string, installments?: array{enabled?: bool}, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{capture_method?: string, setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, demo_pay?: array{setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{capture_method?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{capture_method?: string, setup_future_usage?: string}, mobilepay?: array{capture_method?: string, setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}, setup_future_usage?: string}, pix?: array{amount_includes_iof?: string, expires_after_seconds?: int, setup_future_usage?: string}, revolut_pay?: array{capture_method?: string, setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, satispay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, twint?: array{setup_future_usage?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, target_date?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update_shipping_details?: string}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_remove?: string, payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: array, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string, wallet_options?: array{link?: array{display?: string}}} $params + * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: string}}, cancel_url?: string, client_reference_id?: 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?: string, customer_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], excluded_payment_method_types?: string[], expand?: string[], expires_at?: int, integration_identifier?: 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?: array, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: array, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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, tax_rates?: string[]}[], locale?: string, managed_payments?: array{enabled?: bool}, metadata?: array, mode?: string, name_collection?: array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], origin_context?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: array, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, 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}, setup_future_usage?: string, target_date?: string, verification_method?: string}, affirm?: array{capture_method?: string, setup_future_usage?: string}, afterpay_clearpay?: array{capture_method?: string, setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, alma?: array{capture_method?: string}, amazon_pay?: array{capture_method?: string, setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string, target_date?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, bancontact?: array{setup_future_usage?: string}, billie?: array{capture_method?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{capture_method?: string, installments?: array{enabled?: bool}, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{capture_method?: string, setup_future_usage?: string}, crypto?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, demo_pay?: array{setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{capture_method?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing: array{amount: int, date: string}, reference: string}[]}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{capture_method?: string, setup_future_usage?: string}, mobilepay?: array{capture_method?: string, setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}, setup_future_usage?: string}, pix?: array{amount_includes_iof?: string, expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, revolut_pay?: array{capture_method?: string, setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, satispay?: array{capture_method?: string}, scalapay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string, target_date?: string}, sofort?: array{setup_future_usage?: string}, sunbit?: array{capture_method?: string, setup_future_usage?: string}, swish?: array{reference?: string}, twint?: array{setup_future_usage?: string}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, target_date?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update_shipping_details?: string}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_remove?: string, payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: array, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, 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}, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: array, on_behalf_of?: string, pending_invoice_item_interval?: array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string, wallet_options?: array{link?: array{display?: string}}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Checkout\Session diff --git a/libs/stripe-php/lib/Service/CreditNoteService.php b/libs/stripe-php/lib/Service/CreditNoteService.php index b1b7a263..fe277583 100644 --- a/libs/stripe-php/lib/Service/CreditNoteService.php +++ b/libs/stripe-php/lib/Service/CreditNoteService.php @@ -67,7 +67,13 @@ class CreditNoteService extends AbstractService * post_payment_credit_notes_amount, or both, depending on the * invoice’s amount_remaining 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, 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 + * For invoices that also have refunds created through the Refund API, the credit note API subtracts those + * refund amounts from the maximum creditable amount. This prevents the combined + * credit notes and refunds from exceeding the invoice amount. If you use both, + * ensure the combined total does not exceed the invoice’s paid amount. + * + * @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, metadata?: array, 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, 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 * * @return \Stripe\CreditNote @@ -82,7 +88,7 @@ class CreditNoteService extends AbstractService /** * 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, 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{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, metadata?: array, 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, 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 * * @return \Stripe\CreditNote @@ -99,7 +105,7 @@ class CreditNoteService extends AbstractService * property containing the first handful of those items. This URL you can retrieve * 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, 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|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, metadata?: array, 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, 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 * * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> diff --git a/libs/stripe-php/lib/Service/CustomerService.php b/libs/stripe-php/lib/Service/CustomerService.php index 63a4548d..d9e388df 100644 --- a/libs/stripe-php/lib/Service/CustomerService.php +++ b/libs/stripe-php/lib/Service/CustomerService.php @@ -167,7 +167,7 @@ class CustomerService extends AbstractService * * If the card’s owner has no default card, then the new card will become the * default. However, if the owner already has a default, then it will not change. - * To change the default, you should update the + * To change the default, you should update the * customer to have a new default_source. * * @param string $parentId diff --git a/libs/stripe-php/lib/Service/DisputeService.php b/libs/stripe-php/lib/Service/DisputeService.php index fadfe45b..3f22fa42 100644 --- a/libs/stripe-php/lib/Service/DisputeService.php +++ b/libs/stripe-php/lib/Service/DisputeService.php @@ -74,7 +74,7 @@ class DisputeService extends AbstractService * see our guide to dispute types. * * @param string $id - * @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|array, submit?: bool} $params + * @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{mastercard_compliance?: array{fee_acknowledged?: bool}, visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|array, submit?: bool} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Dispute diff --git a/libs/stripe-php/lib/Service/InvoiceItemService.php b/libs/stripe-php/lib/Service/InvoiceItemService.php index 07edc946..72b32e34 100644 --- a/libs/stripe-php/lib/Service/InvoiceItemService.php +++ b/libs/stripe-php/lib/Service/InvoiceItemService.php @@ -32,7 +32,7 @@ class InvoiceItemService extends AbstractService * no invoice is specified, the item will be on the next invoice created for the * customer specified. * - * @param null|array{amount?: int, currency?: string, customer?: string, customer_account?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params + * @param null|array{amount?: int, currency?: string, customer?: string, customer_account?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\InvoiceItem @@ -84,7 +84,7 @@ class InvoiceItemService extends AbstractService * closed. * * @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, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount_decimal?: 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, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount_decimal?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\InvoiceItem diff --git a/libs/stripe-php/lib/Service/InvoiceService.php b/libs/stripe-php/lib/Service/InvoiceService.php index a531c104..c582a87d 100644 --- a/libs/stripe-php/lib/Service/InvoiceService.php +++ b/libs/stripe-php/lib/Service/InvoiceService.php @@ -16,7 +16,7 @@ class InvoiceService extends AbstractService * still a draft. * * @param string $id - * @param null|array{expand?: string[], invoice_metadata?: null|array, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoice_item?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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{expand?: string[], invoice_metadata?: null|array, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoice_item?: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, 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 * * @return \Stripe\Invoice @@ -94,11 +94,11 @@ class InvoiceService extends AbstractService /** * This endpoint creates a draft invoice for a given customer. The invoice remains - * a draft until you finalize the invoice, which - * allows you to pay or finalize the invoice, + * which allows you to pay or send the invoice to your customers. * - * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params + * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Invoice @@ -139,7 +139,7 @@ class InvoiceService extends AbstractService * invoice creation. Learn * more * - * @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_account?: 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, 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, 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, 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, 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, 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_account?: 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, 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, quantity_decimal?: string, 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{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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}, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: 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, 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 * * @return \Stripe\Invoice @@ -155,7 +155,7 @@ class InvoiceService extends AbstractService * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to * delete invoices that are no longer in a draft state will fail; once an invoice * has been finalized or if an invoice is for a subscription, it must be voided. + * href="/api/invoices/void">voided. * * @param string $id * @param null|array $params @@ -312,7 +312,7 @@ class InvoiceService extends AbstractService * invoices, pass auto_advance=false. * * @param string $id - * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params + * @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, 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{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array}, metadata?: array, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Invoice @@ -334,7 +334,7 @@ class InvoiceService extends AbstractService * * @param string $parentId * @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, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, 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 * * @return \Stripe\InvoiceLineItem @@ -351,7 +351,7 @@ class InvoiceService extends AbstractService * is still a draft. * * @param string $id - * @param null|array{expand?: string[], invoice_metadata?: null|array, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, 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{expand?: string[], invoice_metadata?: null|array, lines: (array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id: string, metadata?: null|array, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: array, name: string, tax_code?: string, unit_label?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, quantity_decimal?: string, 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 * * @return \Stripe\Invoice @@ -365,15 +365,15 @@ class InvoiceService extends AbstractService /** * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is - * similar to deletion, however it only applies to - * finalized invoices and maintains a papertrail where the invoice can still be + * similar to deletion, however it only applies + * to finalized invoices and maintains a papertrail where the invoice can still be * found. * * Consult with local regulations to determine whether and how an invoice might be * amended, canceled, or voided in the jurisdiction you’re doing business in. You - * might need to issue another invoice or credit note instead. Stripe recommends that you - * consult with your legal counsel for advice specific to your business. + * might need to issue another invoice or credit note instead. Stripe recommends that + * you consult with your legal counsel for advice specific to your business. * * @param string $id * @param null|array{expand?: string[]} $params diff --git a/libs/stripe-php/lib/Service/Issuing/CardService.php b/libs/stripe-php/lib/Service/Issuing/CardService.php index 23dfd408..85d75af3 100644 --- a/libs/stripe-php/lib/Service/Issuing/CardService.php +++ b/libs/stripe-php/lib/Service/Issuing/CardService.php @@ -31,7 +31,7 @@ class CardService extends \Stripe\Service\AbstractService /** * Creates an Issuing Card object. * - * @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, metadata?: array, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params + * @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Issuing\Card @@ -64,7 +64,7 @@ class CardService extends \Stripe\Service\AbstractService * the parameters passed. Any parameters not provided will be left unchanged. * * @param string $id - * @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params + * @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Issuing\Card diff --git a/libs/stripe-php/lib/Service/Issuing/CardholderService.php b/libs/stripe-php/lib/Service/Issuing/CardholderService.php index 2b9a0a0e..7000fb14 100644 --- a/libs/stripe-php/lib/Service/Issuing/CardholderService.php +++ b/libs/stripe-php/lib/Service/Issuing/CardholderService.php @@ -31,7 +31,7 @@ class CardholderService extends \Stripe\Service\AbstractService /** * Creates a new Issuing Cardholder object that can be issued cards. * - * @param null|array{billing: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, name: string, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string, type?: string} $params + * @param null|array{billing: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, name: string, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string, type?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Issuing\Cardholder @@ -65,7 +65,7 @@ class CardholderService extends \Stripe\Service\AbstractService * unchanged. * * @param string $id - * @param null|array{billing?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string} $params + * @param null|array{billing?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}}, company?: array{tax_id?: string}, email?: string, expand?: string[], individual?: array{card_issuing?: array{user_terms_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, dob?: array{day: int, month: int, year: int}, first_name?: string, last_name?: string, verification?: array{document?: array{back?: string, front?: string}}}, metadata?: array, phone_number?: string, preferred_locales?: string[], spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[], spending_limits_currency?: string}, status?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Issuing\Cardholder diff --git a/libs/stripe-php/lib/Service/PaymentIntentService.php b/libs/stripe-php/lib/Service/PaymentIntentService.php index ecc1619d..861c6706 100644 --- a/libs/stripe-php/lib/Service/PaymentIntentService.php +++ b/libs/stripe-php/lib/Service/PaymentIntentService.php @@ -70,9 +70,9 @@ class PaymentIntentService extends AbstractService * status of requires_capture, the remaining * amount_capturable is automatically refunded. * - * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session - * instead. + * You can directly cancel the PaymentIntent for a Checkout Session only when the + * PaymentIntent has a status of requires_capture. Otherwise, you must + * expire the Checkout Session. * * @param string $id * @param null|array{cancellation_reason?: string, expand?: string[]} $params @@ -144,7 +144,7 @@ class PaymentIntentService extends AbstractService * transition the PaymentIntent to the canceled state. * * @param string $id - * @param null|array{amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, capture_method?: string, confirmation_token?: string, error_on_requires_action?: bool, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: string, mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, off_session?: array|bool|string, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string, preferred_settlement_speed?: null|string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: null|string, return_url?: string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, use_stripe_sdk?: bool} $params + * @param null|array{amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, amount_to_confirm?: int, capture_method?: string, confirmation_token?: string, error_on_requires_action?: bool, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: string, mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, off_session?: array|bool|string, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, bizum?: null|array{}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, scalapay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, sunbit?: null|array{capture_method?: null|string, setup_future_usage?: string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: null|string, return_url?: string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, use_stripe_sdk?: bool} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\PaymentIntent @@ -169,7 +169,7 @@ class PaymentIntentService extends AbstractService * parameters available in the confirm * API when you supply confirm=true. * - * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: 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, off_session?: array|bool|string, on_behalf_of?: string, payment_details?: array{customer_reference?: null|string, order_reference?: null|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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string, preferred_settlement_speed?: null|string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: 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}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string, use_stripe_sdk?: bool} $params + * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: 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, off_session?: array|bool|string, on_behalf_of?: string, payment_details?: array{customer_reference?: null|string, order_reference?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, bizum?: null|array{}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, scalapay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, sunbit?: null|array{capture_method?: null|string, setup_future_usage?: string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: 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}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, destination: string, metadata?: null|array, payment_data?: array{description?: string, metadata?: null|array}}, transfer_group?: string, use_stripe_sdk?: bool} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\PaymentIntent @@ -206,9 +206,11 @@ class PaymentIntentService extends AbstractService * including declines. After it’s captured, a PaymentIntent can no longer be * incremented. * - * Learn more about incremental - * authorizations. + * Learn more about incremental authorizations with in-person payments + * and online + * payments. * * @param string $id * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, description?: string, expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, metadata?: array, payment_details?: array{customer_reference?: null|string, order_reference?: null|string}, statement_descriptor?: string, transfer_data?: array{amount?: int}} $params @@ -276,7 +278,7 @@ class PaymentIntentService extends AbstractService * href="/docs/api/payment_intents/confirm">confirm API instead. * * @param string $id - * @param null|array{amount?: int, amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: null|int, capture_method?: string, currency?: string, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, metadata?: null|array, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string, preferred_settlement_speed?: null|string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], receipt_email?: null|string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}, transfer_group?: string} $params + * @param null|array{amount?: int, amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: null|int, capture_method?: string, currency?: string, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, metadata?: null|array, payment_details?: null|array{customer_reference?: null|string, order_reference?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, bizum?: null|array{}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_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?: null|array{capture_method?: string, request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, crypto?: null|array{setup_future_usage?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, on_demand?: array{average_amount?: int, maximum_amount?: int, minimum_amount?: int, purchase_interval?: string, purchase_interval_count?: int}, preferred_locale?: string, setup_future_usage?: string, subscriptions?: null|array{interval: string, interval_count?: int, name?: string, next_billing?: array{amount: int, date: string}, reference: string}[]}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mb_way?: null|array{setup_future_usage?: string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, payto?: null|array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string}, setup_future_usage?: null|string}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int, expires_at?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, satispay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, scalapay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, sunbit?: null|array{capture_method?: null|string, setup_future_usage?: string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: null|string}, us_bank_account?: null|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[]}, setup_future_usage?: null|string, target_date?: string, transaction_purpose?: null|string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], receipt_email?: null|string, setup_future_usage?: null|string, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, description?: string, metadata?: null|array, payment_data?: array{description?: string, metadata?: null|array}}, transfer_group?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\PaymentIntent diff --git a/libs/stripe-php/lib/Service/PaymentLinkService.php b/libs/stripe-php/lib/Service/PaymentLinkService.php index 7f4ee077..f40cb09a 100644 --- a/libs/stripe-php/lib/Service/PaymentLinkService.php +++ b/libs/stripe-php/lib/Service/PaymentLinkService.php @@ -48,7 +48,7 @@ class PaymentLinkService extends AbstractService /** * 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, 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, 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, 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, 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, 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, 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, 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}[], managed_payments?: array{enabled?: bool}, metadata?: array, 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, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_options?: array{card?: array{restrictions?: array{brands_blocked?: 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, 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 * * @return \Stripe\PaymentLink @@ -80,7 +80,7 @@ class PaymentLinkService extends AbstractService * Updates a payment link. * * @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, 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, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array, 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, 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, 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, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|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, 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 * * @return \Stripe\PaymentLink diff --git a/libs/stripe-php/lib/Service/PaymentMethodConfigurationService.php b/libs/stripe-php/lib/Service/PaymentMethodConfigurationService.php index 2f54573e..03deda20 100644 --- a/libs/stripe-php/lib/Service/PaymentMethodConfigurationService.php +++ b/libs/stripe-php/lib/Service/PaymentMethodConfigurationService.php @@ -14,7 +14,7 @@ class PaymentMethodConfigurationService extends AbstractService /** * List payment method configurations. * - * @param null|array{application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params + * @param null|array{active?: bool, application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Collection<\Stripe\PaymentMethodConfiguration> @@ -29,7 +29,7 @@ class PaymentMethodConfigurationService extends AbstractService /** * 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}}, 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}}, payto?: 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}}, bizum?: 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}}, payto?: 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}}, scalapay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, sunbit?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, upi?: 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 * * @return \Stripe\PaymentMethodConfiguration @@ -61,7 +61,7 @@ class PaymentMethodConfigurationService extends AbstractService * Update payment method configuration. * * @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}}, 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}}, payto?: 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}}, bizum?: 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}}, payto?: 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}}, scalapay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, sunbit?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, upi?: 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 * * @return \Stripe\PaymentMethodConfiguration diff --git a/libs/stripe-php/lib/Service/PaymentMethodService.php b/libs/stripe-php/lib/Service/PaymentMethodService.php index f52f947c..08cd0aec 100644 --- a/libs/stripe-php/lib/Service/PaymentMethodService.php +++ b/libs/stripe-php/lib/Service/PaymentMethodService.php @@ -70,7 +70,7 @@ class PaymentMethodService extends AbstractService * href="/docs/payments/save-and-reuse">SetupIntent API to collect 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{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type?: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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 * * @return \Stripe\PaymentMethod diff --git a/libs/stripe-php/lib/Service/PaymentRecordService.php b/libs/stripe-php/lib/Service/PaymentRecordService.php index d2668ae4..da73df85 100644 --- a/libs/stripe-php/lib/Service/PaymentRecordService.php +++ b/libs/stripe-php/lib/Service/PaymentRecordService.php @@ -118,7 +118,7 @@ class PaymentRecordService extends AbstractService * refunded. * * @param string $id - * @param null|array{amount?: array{currency: string, value: int}, expand?: string[], initiated_at?: int, metadata?: null|array, outcome: string, processor_details: array{custom?: array{refund_reference: string}, type: string}, refunded: array{refunded_at: int}} $params + * @param null|array{amount?: array{currency: string, value: int}, expand?: string[], initiated_at?: int, metadata?: null|array, 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 diff --git a/libs/stripe-php/lib/Service/PayoutService.php b/libs/stripe-php/lib/Service/PayoutService.php index a6e1b5cb..2fed81c2 100644 --- a/libs/stripe-php/lib/Service/PayoutService.php +++ b/libs/stripe-php/lib/Service/PayoutService.php @@ -56,8 +56,8 @@ class PayoutService extends AbstractService * * If you create a manual payout on a Stripe account that uses multiple payment * source types, you need to specify the source type balance that the payout draws - * from. The balance object details available and - * pending amounts by source type. + * from. The balance object details available + * and pending amounts by source type. * * @param null|array{amount: int, currency: string, description?: string, destination?: string, expand?: string[], metadata?: array, method?: string, payout_method?: string, source_type?: string, statement_descriptor?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts diff --git a/libs/stripe-php/lib/Service/SetupIntentService.php b/libs/stripe-php/lib/Service/SetupIntentService.php index 65c64e48..eadf4c44 100644 --- a/libs/stripe-php/lib/Service/SetupIntentService.php +++ b/libs/stripe-php/lib/Service/SetupIntentService.php @@ -63,7 +63,7 @@ class SetupIntentService extends AbstractService * or the canceled status if the confirmation limit is reached. * * @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{}, mb_way?: array{}, metadata?: array, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}}, bizum?: array{}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}}, pix?: array{mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: 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 * * @return \Stripe\SetupIntent @@ -82,7 +82,7 @@ class SetupIntentService extends AbstractService * href="/docs/api/setup_intents/confirm">confirm it to collect any required * 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, customer_account?: 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, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|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, customer_account?: 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, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}}, bizum?: array{}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}}, pix?: array{mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: 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 * * @return \Stripe\SetupIntent @@ -121,7 +121,7 @@ class SetupIntentService extends AbstractService * Updates a SetupIntent object. * * @param string $id - * @param null|array{attach_to_self?: bool, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|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, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}}, bizum?: array{}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}}, pix?: array{mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: 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 * * @return \Stripe\SetupIntent diff --git a/libs/stripe-php/lib/Service/SubscriptionScheduleService.php b/libs/stripe-php/lib/Service/SubscriptionScheduleService.php index 69b8f7cc..0db3b459 100644 --- a/libs/stripe-php/lib/Service/SubscriptionScheduleService.php +++ b/libs/stripe-php/lib/Service/SubscriptionScheduleService.php @@ -49,7 +49,7 @@ class SubscriptionScheduleService extends AbstractService * Creates a new subscription schedule object. Each customer can have up to 500 * active or scheduled subscriptions. * - * @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: 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, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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, customer_account?: 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, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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 * * @return \Stripe\SubscriptionSchedule @@ -104,7 +104,7 @@ class SubscriptionScheduleService extends AbstractService * Updates an existing subscription schedule. * * @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, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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 * * @return \Stripe\SubscriptionSchedule diff --git a/libs/stripe-php/lib/Service/SubscriptionService.php b/libs/stripe-php/lib/Service/SubscriptionService.php index 4d29cde9..adc5c20e 100644 --- a/libs/stripe-php/lib/Service/SubscriptionService.php +++ b/libs/stripe-php/lib/Service/SubscriptionService.php @@ -29,15 +29,16 @@ class SubscriptionService extends AbstractService /** * Cancels a customer’s subscription immediately. The customer won’t be charged - * again for the subscription. After it’s canceled, you can no longer update the - * subscription or its metadata. + * again for the subscription. After it’s canceled, the subscription is largely + * immutable. You can still update its metadata and + * cancellation_details. * * Any pending invoice items that you’ve created are still charged at the end of - * the period, unless manually deleted. If you’ve - * set the subscription to cancel at the end of the period, any pending prorations - * are also left in place and collected at the end of the period. But if the - * subscription is set to cancel immediately, pending prorations are removed if - * invoice_now and prorate are both set to true. + * the period, unless manually deleted. If + * you’ve set the subscription to cancel at the end of the period, any pending + * prorations are also left in place and collected at the end of the period. But if + * the subscription is set to cancel immediately, pending prorations are removed if + * invoice_now and prorate are both set to false. * * By default, upon subscription cancellation, Stripe stops automatic collection of * all finalized invoices for the customer. This is intended to prevent unexpected @@ -74,7 +75,7 @@ class SubscriptionService extends AbstractService * schedules instead. Schedules provide the flexibility to model more complex * billing configurations that change over time. * - * @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, customer_account?: 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, 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, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: 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, customer_account?: 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[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: 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, 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, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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 * * @return \Stripe\Subscription @@ -120,11 +121,17 @@ class SubscriptionService extends AbstractService /** * Initiates resumption of a paused subscription, optionally resetting the billing - * cycle anchor and creating prorations. If no resumption invoice is generated, the - * subscription becomes active immediately. If a resumption invoice is - * generated, the subscription remains paused until the invoice is - * paid or marked uncollectible. If the invoice is not paid by the expiration date, - * it is voided and the subscription remains paused. + * cycle anchor and creating prorations. Resume is only available for subscriptions + * that use charge_automatically collection. If Stripe doesn’t + * generate a resumption invoice, the subscription becomes active + * immediately. When a resumption invoice is generated, Stripe finalizes it + * immediately. If the invoice is paid or marked uncollectible, the subscription + * becomes active. If the invoice is manually voided, the subscription + * stays paused. If there is no payment attempt within 23 hours, + * Stripe voids the invoice and the subscription stays paused. Learn + * more about resuming + * subscriptions. * * @param string $id * @param null|array{billing_cycle_anchor?: string, expand?: string[], proration_behavior?: string, proration_date?: int} $params @@ -227,7 +234,7 @@ class SubscriptionService extends AbstractService * href="/docs/billing/subscriptions/usage-based">usage-based billing instead. * * @param string $id - * @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|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}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array, 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, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params + * @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: 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, 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, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Subscription diff --git a/libs/stripe-php/lib/Service/Terminal/ConfigurationService.php b/libs/stripe-php/lib/Service/Terminal/ConfigurationService.php index 8a14741f..6dcb6b05 100644 --- a/libs/stripe-php/lib/Service/Terminal/ConfigurationService.php +++ b/libs/stripe-php/lib/Service/Terminal/ConfigurationService.php @@ -29,7 +29,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService /** * Creates a new Configuration object. * - * @param null|array{bbpos_wisepad3?: array{splashscreen?: null|string}, bbpos_wisepos_e?: array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, stripe_s710?: 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}, 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|array{bbpos_wisepad3?: array{splashscreen?: null|string}, bbpos_wisepos_e?: array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, stripe_s710?: 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}, 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_m425?: array{splashscreen?: null|string}, verifone_p400?: array{splashscreen?: null|string}, verifone_p630?: array{splashscreen?: null|string}, verifone_ux700?: array{splashscreen?: null|string}, verifone_v660p?: 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 * * @return \Stripe\Terminal\Configuration @@ -77,7 +77,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService * Updates a new Configuration object. * * @param string $id - * @param null|array{bbpos_wisepad3?: null|array{splashscreen?: null|string}, bbpos_wisepos_e?: null|array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, 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}, stripe_s710?: 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}, 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|array{bbpos_wisepad3?: null|array{splashscreen?: null|string}, bbpos_wisepos_e?: null|array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, 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}, stripe_s710?: 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}, 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_m425?: null|array{splashscreen?: null|string}, verifone_p400?: null|array{splashscreen?: null|string}, verifone_p630?: null|array{splashscreen?: null|string}, verifone_ux700?: null|array{splashscreen?: null|string}, verifone_v660p?: 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 * * @return \Stripe\Terminal\Configuration diff --git a/libs/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php b/libs/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php index 0b90f8c2..16883239 100644 --- a/libs/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php +++ b/libs/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php @@ -14,7 +14,7 @@ class ConfirmationTokenService extends \Stripe\Service\AbstractService /** * 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{}, mb_way?: array{}, metadata?: array, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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 * * @return \Stripe\ConfirmationToken diff --git a/libs/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/libs/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php index a843304d..1aec8802 100644 --- a/libs/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php +++ b/libs/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php @@ -30,7 +30,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService /** * 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}, 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}, fraud_risk?: array{level: string, score?: float}, 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|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, level: string}, fraud_risk?: array{level: string, score?: float}, merchant_dispute_risk?: array{dispute_rate?: int, 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 * * @return \Stripe\Issuing\Authorization diff --git a/libs/stripe-php/lib/Service/TestHelpers/TestClockService.php b/libs/stripe-php/lib/Service/TestHelpers/TestClockService.php index 7d47271c..129baff5 100644 --- a/libs/stripe-php/lib/Service/TestHelpers/TestClockService.php +++ b/libs/stripe-php/lib/Service/TestHelpers/TestClockService.php @@ -46,7 +46,7 @@ class TestClockService extends \Stripe\Service\AbstractService /** * Creates a new test clock that can be attached to new customers and quotes. * - * @param null|array{expand?: string[], frozen_time: int, name?: string} $params + * @param null|array{customer?: string, expand?: string[], frozen_time: int, name?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\TestHelpers\TestClock diff --git a/libs/stripe-php/lib/Service/TopupService.php b/libs/stripe-php/lib/Service/TopupService.php index d7cb146c..7da9718f 100644 --- a/libs/stripe-php/lib/Service/TopupService.php +++ b/libs/stripe-php/lib/Service/TopupService.php @@ -45,7 +45,7 @@ class TopupService extends AbstractService /** * Top up the balance of an account. * - * @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|array, source?: string, statement_descriptor?: string, transfer_group?: string} $params + * @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|array, payment_method?: string, payment_method_options?: array{us_bank_account?: array{network: string}}, source?: string, statement_descriptor?: string, transfer_group?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\Topup diff --git a/libs/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php b/libs/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php index b46ac83d..fa8ca726 100644 --- a/libs/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php +++ b/libs/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php @@ -13,7 +13,7 @@ class MeterEventSessionService extends \Stripe\Service\AbstractService { /** * Creates a meter event session to send usage on the high-throughput meter event - * stream. Authentication tokens are only valid for 15 minutes, so you will need to + * stream. Authentication tokens are only valid for 15 minutes, so you need to * create a new meter event session when your token expires. * * @param null|array $params diff --git a/libs/stripe-php/lib/Service/V2/Commerce/CommerceServiceFactory.php b/libs/stripe-php/lib/Service/V2/Commerce/CommerceServiceFactory.php new file mode 100644 index 00000000..64f41e50 --- /dev/null +++ b/libs/stripe-php/lib/Service/V2/Commerce/CommerceServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'productCatalog' => ProductCatalog\ProductCatalogServiceFactory::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ImportService.php b/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ImportService.php new file mode 100644 index 00000000..b45f4dcf --- /dev/null +++ b/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ImportService.php @@ -0,0 +1,239 @@ + + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v2/commerce/product_catalog/imports', $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'data' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'status_details' => [ + 'kind' => 'object', + 'fields' => [ + 'processing' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => [ + 'kind' => 'int64_string', + ], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded' => [ + 'kind' => 'object', + 'fields' => [ + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded_with_errors' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => [ + 'kind' => 'int64_string', + ], + 'error_file' => [ + 'kind' => 'object', + 'fields' => [ + 'size' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'samples' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'row' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); + } + + /** + * Creates a ProductCatalogImport. + * + * @param null|array{feed_type: string, metadata: array, mode: string} $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @return \Stripe\V2\Commerce\ProductCatalogImport + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v2/commerce/product_catalog/imports', $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'status_details' => [ + 'kind' => 'object', + 'fields' => [ + 'processing' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded' => [ + 'kind' => 'object', + 'fields' => [ + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded_with_errors' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'error_file' => [ + 'kind' => 'object', + 'fields' => [ + 'size' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'samples' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'row' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + ], + ], + ], + ]); + } + + /** + * Retrieves a ProductCatalogImport by ID. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @return \Stripe\V2\Commerce\ProductCatalogImport + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v2/commerce/product_catalog/imports/%s', $id), $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'status_details' => [ + 'kind' => 'object', + 'fields' => [ + 'processing' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded' => [ + 'kind' => 'object', + 'fields' => [ + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'succeeded_with_errors' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'error_file' => [ + 'kind' => 'object', + 'fields' => [ + 'size' => [ + 'kind' => 'int64_string', + ], + ], + ], + 'samples' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'row' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + 'success_count' => [ + 'kind' => 'int64_string', + ], + ], + ], + ], + ], + ], + ], + ]); + } +} diff --git a/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ProductCatalogServiceFactory.php b/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ProductCatalogServiceFactory.php new file mode 100644 index 00000000..973f41d4 --- /dev/null +++ b/libs/stripe-php/lib/Service/V2/Commerce/ProductCatalog/ProductCatalogServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'imports' => ImportService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libs/stripe-php/lib/Service/V2/Core/AccountLinkService.php b/libs/stripe-php/lib/Service/V2/Core/AccountLinkService.php index 83fd1d72..e86b8b92 100644 --- a/libs/stripe-php/lib/Service/V2/Core/AccountLinkService.php +++ b/libs/stripe-php/lib/Service/V2/Core/AccountLinkService.php @@ -16,12 +16,12 @@ class AccountLinkService extends \Stripe\Service\AbstractService * use to access a Stripe-hosted flow for collecting or updating required * information. * - * @param null|array{account: string, use_case: array{type: string, account_onboarding?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}, account_update?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}}} $params + * @param null|array{account: string, use_case: array{account_onboarding?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}, account_update?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}, type: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\V2\Core\AccountLink * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function create($params = null, $opts = null) { diff --git a/libs/stripe-php/lib/Service/V2/Core/AccountService.php b/libs/stripe-php/lib/Service/V2/Core/AccountService.php index 541e4bcb..dfa7c5d6 100644 --- a/libs/stripe-php/lib/Service/V2/Core/AccountService.php +++ b/libs/stripe-php/lib/Service/V2/Core/AccountService.php @@ -29,11 +29,43 @@ class AccountService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Collection<\Stripe\V2\Core\Account> * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function all($params = null, $opts = null) { - return $this->requestCollection('get', '/v2/core/accounts', $params, $opts); + return $this->requestCollection('get', '/v2/core/accounts', $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'data' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** @@ -47,30 +79,101 @@ class AccountService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\Account * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function close($id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v2/core/accounts/%s/close', $id), $params, $opts); + return $this->request('post', $this->buildPath('/v2/core/accounts/%s/close', $id), $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** - * An Account is a representation of a company, individual or other entity that a - * user interacts with. Accounts contain identifying information about the entity, - * and configurations that store the features an account has access to. An account - * can be configured as any or all of the following configurations: Customer, - * Merchant and/or Recipient. + * Create an Account that represents a company, individual, or other entity that + * your business interacts with. Accounts contain identifying information about the + * entity, and configurations that store the features an account has access to. An + * account can be configured as any or all of the following configurations: + * Customer, Merchant and/or Recipient. * - * @param null|array{account_token?: string, configuration?: array{customer?: array{automatic_indirect_tax?: array{exempt?: string, ip_address?: string}, billing?: array{invoice?: array{custom_fields?: array{name: string, value: string}[], footer?: string, next_sequence?: int, prefix?: string, rendering?: array{amount_tax_display?: string, template?: string}}}, capabilities?: array{automatic_indirect_tax?: array{requested: bool}}, shipping?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}, test_clock?: string}, merchant?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, capabilities?: array{ach_debit_payments?: array{requested: bool}, acss_debit_payments?: array{requested: bool}, affirm_payments?: array{requested: bool}, afterpay_clearpay_payments?: array{requested: bool}, alma_payments?: array{requested: bool}, amazon_pay_payments?: array{requested: bool}, au_becs_debit_payments?: array{requested: bool}, bacs_debit_payments?: array{requested: bool}, bancontact_payments?: array{requested: bool}, blik_payments?: array{requested: bool}, boleto_payments?: array{requested: bool}, card_payments?: array{requested: bool}, cartes_bancaires_payments?: array{requested: bool}, cashapp_payments?: array{requested: bool}, eps_payments?: array{requested: bool}, fpx_payments?: array{requested: bool}, gb_bank_transfer_payments?: array{requested: bool}, grabpay_payments?: array{requested: bool}, ideal_payments?: array{requested: bool}, jcb_payments?: array{requested: bool}, jp_bank_transfer_payments?: array{requested: bool}, kakao_pay_payments?: array{requested: bool}, klarna_payments?: array{requested: bool}, konbini_payments?: array{requested: bool}, kr_card_payments?: array{requested: bool}, link_payments?: array{requested: bool}, mobilepay_payments?: array{requested: bool}, multibanco_payments?: array{requested: bool}, mx_bank_transfer_payments?: array{requested: bool}, naver_pay_payments?: array{requested: bool}, oxxo_payments?: array{requested: bool}, p24_payments?: array{requested: bool}, pay_by_bank_payments?: array{requested: bool}, payco_payments?: array{requested: bool}, paynow_payments?: array{requested: bool}, promptpay_payments?: array{requested: bool}, revolut_pay_payments?: array{requested: bool}, samsung_pay_payments?: array{requested: bool}, sepa_bank_transfer_payments?: array{requested: bool}, sepa_debit_payments?: array{requested: bool}, swish_payments?: array{requested: bool}, twint_payments?: array{requested: bool}, us_bank_transfer_payments?: array{requested: bool}, zip_payments?: array{requested: bool}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}}, konbini_payments?: array{support?: array{email?: string, hours?: array{end_time?: string, start_time?: string}, phone?: string}}, mcc?: string, script_statement_descriptor?: array{kana?: array{descriptor?: string, prefix?: string}, kanji?: array{descriptor?: string, prefix?: string}}, statement_descriptor?: array{descriptor?: string, prefix?: string}, support?: array{address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, email?: string, phone?: string, url?: string}}, recipient?: array{capabilities?: array{stripe_balance?: array{stripe_transfers?: array{requested: bool}}}}}, contact_email?: string, contact_phone?: string, dashboard?: string, defaults?: array{currency?: string, locales?: string[], profile?: array{business_url?: string, doing_business_as?: string, product_description?: string}, responsibilities?: array{fees_collector: string, losses_collector: string}}, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{date?: string, ip?: string, user_agent?: string}, ownership_declaration?: array{date?: string, ip?: string, user_agent?: string}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{date?: string, ip?: string, user_agent?: string}, terms_of_service?: array{account?: array{date: string, ip: string, user_agent?: string}}}, business_details?: array{address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: array{value?: int, currency?: string}, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: array{value?: int, currency?: string}}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, country?: string, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}, include?: string[], metadata?: array} $params + * @param null|array{account_token?: string, configuration?: array{customer?: array{automatic_indirect_tax?: array{exempt?: string, ip_address?: string}, billing?: array{invoice?: array{custom_fields?: array{name: string, value: string}[], footer?: string, next_sequence?: int, prefix?: string, rendering?: array{amount_tax_display?: string, template?: string}}}, capabilities?: array{automatic_indirect_tax?: array{requested: bool}}, shipping?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}, test_clock?: string}, merchant?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, capabilities?: array{ach_debit_payments?: array{requested: bool}, acss_debit_payments?: array{requested: bool}, affirm_payments?: array{requested: bool}, afterpay_clearpay_payments?: array{requested: bool}, alma_payments?: array{requested: bool}, amazon_pay_payments?: array{requested: bool}, au_becs_debit_payments?: array{requested: bool}, bacs_debit_payments?: array{requested: bool}, bancontact_payments?: array{requested: bool}, blik_payments?: array{requested: bool}, boleto_payments?: array{requested: bool}, card_payments?: array{requested: bool}, cartes_bancaires_payments?: array{requested: bool}, cashapp_payments?: array{requested: bool}, eps_payments?: array{requested: bool}, fpx_payments?: array{requested: bool}, gb_bank_transfer_payments?: array{requested: bool}, grabpay_payments?: array{requested: bool}, ideal_payments?: array{requested: bool}, jcb_payments?: array{requested: bool}, jp_bank_transfer_payments?: array{requested: bool}, kakao_pay_payments?: array{requested: bool}, klarna_payments?: array{requested: bool}, konbini_payments?: array{requested: bool}, kr_card_payments?: array{requested: bool}, link_payments?: array{requested: bool}, mobilepay_payments?: array{requested: bool}, multibanco_payments?: array{requested: bool}, mx_bank_transfer_payments?: array{requested: bool}, naver_pay_payments?: array{requested: bool}, oxxo_payments?: array{requested: bool}, p24_payments?: array{requested: bool}, pay_by_bank_payments?: array{requested: bool}, payco_payments?: array{requested: bool}, paynow_payments?: array{requested: bool}, promptpay_payments?: array{requested: bool}, revolut_pay_payments?: array{requested: bool}, samsung_pay_payments?: array{requested: bool}, sepa_bank_transfer_payments?: array{requested: bool}, sepa_debit_payments?: array{requested: bool}, sunbit_payments?: array{requested: bool}, swish_payments?: array{requested: bool}, twint_payments?: array{requested: bool}, us_bank_transfer_payments?: array{requested: bool}, zip_payments?: array{requested: bool}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}}, konbini_payments?: array{support?: array{email?: string, hours?: array{end_time?: string, start_time?: string}, phone?: string}}, mcc?: string, script_statement_descriptor?: array{kana?: array{descriptor?: string, prefix?: string}, kanji?: array{descriptor?: string, prefix?: string}}, statement_descriptor?: array{descriptor?: string, prefix?: string}, support?: array{address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, email?: string, phone?: string, url?: string}}, recipient?: array{capabilities?: array{stripe_balance?: array{stripe_transfers?: array{requested: bool}}}}}, contact_email?: string, contact_phone?: string, dashboard?: string, defaults?: array{currency?: string, locales?: string[], profile?: array{business_url?: string, doing_business_as?: string, product_description?: string}, responsibilities?: array{fees_collector: string, losses_collector: string}}, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{date?: string, ip?: string, user_agent?: string}, ownership_declaration?: array{date?: string, ip?: string, user_agent?: string}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{date?: string, ip?: string, user_agent?: string}, terms_of_service?: array{account?: array{date: string, ip: string, user_agent?: string}}}, business_details?: array{address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: \Stripe\StripeObject, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], signer?: array{person: string}, type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], signer?: array{person: string}, type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: \Stripe\StripeObject}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, country?: string, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}, include?: string[], metadata?: array} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\V2\Core\Account * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function create($params = null, $opts = null) { - return $this->request('post', '/v2/core/accounts', $params, $opts); + return $this->request('post', '/v2/core/accounts', $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** @@ -82,27 +185,98 @@ class AccountService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\Account * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function retrieve($id, $params = null, $opts = null) { - return $this->request('get', $this->buildPath('/v2/core/accounts/%s', $id), $params, $opts); + return $this->request('get', $this->buildPath('/v2/core/accounts/%s', $id), $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** * Updates the details of an Account. * * @param string $id - * @param null|array{account_token?: string, configuration?: array{customer?: array{applied?: bool, automatic_indirect_tax?: array{exempt?: string, ip_address?: string, validate_location?: string}, billing?: array{default_payment_method?: string, invoice?: array{custom_fields?: array{name: string, value: string}[], footer?: string, next_sequence?: int, prefix?: string, rendering?: array{amount_tax_display?: string, template?: string}}}, capabilities?: array{automatic_indirect_tax?: array{requested?: bool}}, shipping?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}, test_clock?: string}, merchant?: array{applied?: bool, bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, capabilities?: array{ach_debit_payments?: array{requested?: bool}, acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}}, konbini_payments?: array{support?: array{email?: string, hours?: array{end_time?: string, start_time?: string}, phone?: string}}, mcc?: string, script_statement_descriptor?: array{kana?: array{descriptor?: string, prefix?: string}, kanji?: array{descriptor?: string, prefix?: string}}, statement_descriptor?: array{descriptor?: string, prefix?: string}, support?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, email?: string, phone?: string, url?: string}}, recipient?: array{applied?: bool, capabilities?: array{stripe_balance?: array{stripe_transfers?: array{requested?: bool}}}}}, contact_email?: string, contact_phone?: string, dashboard?: string, defaults?: array{currency?: string, locales?: string[], profile?: array{business_url?: string, doing_business_as?: string, product_description?: string}, responsibilities?: array{fees_collector: string, losses_collector: string}}, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{date?: string, ip?: string, user_agent?: string}, ownership_declaration?: array{date?: string, ip?: string, user_agent?: string}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{date?: string, ip?: string, user_agent?: string}, terms_of_service?: array{account?: array{date?: string, ip?: string, user_agent?: string}, crypto_storer?: array{date?: string, ip?: string, user_agent?: string}, storer?: array{date?: string, ip?: string, user_agent?: string}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: array{value?: int, currency?: string}, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: array{value?: int, currency?: string}}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, country?: string, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}, include?: string[], metadata?: array} $params + * @param null|array{account_token?: string, configuration?: array{customer?: array{applied?: bool, automatic_indirect_tax?: array{exempt?: string, ip_address?: string, validate_location?: string}, billing?: array{default_payment_method?: string, invoice?: array{custom_fields?: array{name: string, value: string}[], footer?: string, next_sequence?: int, prefix?: string, rendering?: array{amount_tax_display?: string, template?: string}}}, capabilities?: array{automatic_indirect_tax?: array{requested?: bool}}, shipping?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name?: string, phone?: string}, test_clock?: string}, merchant?: array{applied?: bool, bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, capabilities?: array{ach_debit_payments?: array{requested?: bool}, acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sunbit_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}}, konbini_payments?: array{support?: array{email?: string, hours?: array{end_time?: string, start_time?: string}, phone?: string}}, mcc?: string, script_statement_descriptor?: array{kana?: array{descriptor?: string, prefix?: string}, kanji?: array{descriptor?: string, prefix?: string}}, statement_descriptor?: array{descriptor?: string, prefix?: string}, support?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, email?: string, phone?: string, url?: string}}, recipient?: array{applied?: bool, capabilities?: array{stripe_balance?: array{stripe_transfers?: array{requested?: bool}}}}}, contact_email?: string, contact_phone?: string, dashboard?: string, defaults?: array{currency?: string, locales?: string[], profile?: array{business_url?: string, doing_business_as?: string, product_description?: string}, responsibilities?: array{fees_collector: string, losses_collector: string}}, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{date?: string, ip?: string, user_agent?: string}, ownership_declaration?: array{date?: string, ip?: string, user_agent?: string}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{date?: string, ip?: string, user_agent?: string}, terms_of_service?: array{account?: array{date?: string, ip?: string, user_agent?: string}, crypto_money_manager?: array{date?: string, ip?: string, user_agent?: string}, money_manager?: array{date?: string, ip?: string, user_agent?: string}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: \Stripe\StripeObject, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], signer?: array{person: string}, type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], signer?: array{person: string}, type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: \Stripe\StripeObject}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, country?: string, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}, include?: string[], metadata?: array} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\V2\Core\Account * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function update($id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v2/core/accounts/%s', $id), $params, $opts); + return $this->request('post', $this->buildPath('/v2/core/accounts/%s', $id), $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } protected function getServiceClass($name) diff --git a/libs/stripe-php/lib/Service/V2/Core/AccountTokenService.php b/libs/stripe-php/lib/Service/V2/Core/AccountTokenService.php index de59b857..44f68f12 100644 --- a/libs/stripe-php/lib/Service/V2/Core/AccountTokenService.php +++ b/libs/stripe-php/lib/Service/V2/Core/AccountTokenService.php @@ -12,18 +12,47 @@ namespace Stripe\Service\V2\Core; class AccountTokenService extends \Stripe\Service\AbstractService { /** - * Creates an Account Token. + * Create an account token with a publishable key and pass it to the Accounts v2 + * API to create or update an account without its data touching your server. Learn + * more about [account tokens](https://docs.stripe.com/connect/account-tokens). In + * live mode, you can only create account tokens with your application's + * publishable key. In test mode, you can create account tokens with your secret + * key or publishable key. * - * @param null|array{contact_email?: string, contact_phone?: string, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{attested?: bool}, ownership_declaration?: array{attested?: bool}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{attested?: bool}, terms_of_service?: array{account?: array{shown_and_accepted?: bool}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: array{value?: int, currency?: string}, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: array{value?: int, currency?: string}}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}} $params + * @param null|array{contact_email?: string, contact_phone?: string, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{attested?: bool}, ownership_declaration?: array{attested?: bool}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{attested?: bool}, terms_of_service?: array{account?: array{shown_and_accepted?: bool}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: \Stripe\StripeObject, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], signer?: array{person: string}, type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], signer?: array{person: string}, type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: \Stripe\StripeObject}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\V2\Core\AccountToken * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function create($params = null, $opts = null) { - return $this->request('post', '/v2/core/account_tokens', $params, $opts); + return $this->request('post', '/v2/core/account_tokens', $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** @@ -35,7 +64,7 @@ class AccountTokenService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountToken * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function retrieve($id, $params = null, $opts = null) { diff --git a/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonService.php b/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonService.php index f55768b2..dc0fa77a 100644 --- a/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonService.php +++ b/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonService.php @@ -20,11 +20,33 @@ class PersonService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Collection<\Stripe\V2\Core\AccountPerson> * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function all($id, $params = null, $opts = null) { - return $this->requestCollection('get', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts); + return $this->requestCollection('get', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'data' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ], + ]); } /** @@ -37,11 +59,34 @@ class PersonService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountPerson * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function create($id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts); + return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + ]); } /** @@ -54,7 +99,7 @@ class PersonService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\DeletedObject * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function delete($parentId, $id, $params = null, $opts = null) { @@ -71,11 +116,23 @@ class PersonService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountPerson * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function retrieve($parentId, $id, $params = null, $opts = null) { - return $this->request('get', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + return $this->request('get', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts, [ + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + ]); } /** @@ -88,10 +145,33 @@ class PersonService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountPerson * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function update($parentId, $id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + 'response_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + ]); } } diff --git a/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonTokenService.php b/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonTokenService.php index 081fc43a..e1e21a97 100644 --- a/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonTokenService.php +++ b/libs/stripe-php/lib/Service/V2/Core/Accounts/PersonTokenService.php @@ -12,7 +12,12 @@ namespace Stripe\Service\V2\Core\Accounts; class PersonTokenService extends \Stripe\Service\AbstractService { /** - * Creates a Person Token associated with an Account. + * Creates a single-use token that represents the details for a person. Use this + * when you create or update persons associated with an Account v2. Learn more + * about [account tokens](https://docs.stripe.com/connect/account-tokens). You can + * only create person tokens with your application's publishable key and in live + * mode. You can use your application's secret key to create person tokens only in + * test mode. * * @param string $id * @param null|array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], additional_terms_of_service?: array{account?: array{shown_and_accepted?: bool}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string} $params @@ -20,11 +25,23 @@ class PersonTokenService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountPersonToken * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function create($id, $params = null, $opts = null) { - return $this->request('post', $this->buildPath('/v2/core/accounts/%s/person_tokens', $id), $params, $opts); + return $this->request('post', $this->buildPath('/v2/core/accounts/%s/person_tokens', $id), $params, $opts, [ + 'request_schema' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ], + ], + ]); } /** @@ -37,7 +54,7 @@ class PersonTokenService extends \Stripe\Service\AbstractService * * @return \Stripe\V2\Core\AccountPersonToken * - * @throws \Stripe\Exception\ApiErrorException if the request fails + * @throws \Stripe\Exception\RateLimitException */ public function retrieve($parentId, $id, $params = null, $opts = null) { diff --git a/libs/stripe-php/lib/Service/V2/Core/EventDestinationService.php b/libs/stripe-php/lib/Service/V2/Core/EventDestinationService.php index b021525d..233a1f2b 100644 --- a/libs/stripe-php/lib/Service/V2/Core/EventDestinationService.php +++ b/libs/stripe-php/lib/Service/V2/Core/EventDestinationService.php @@ -29,7 +29,7 @@ class EventDestinationService extends \Stripe\Service\AbstractService /** * Create a new event destination. * - * @param null|array{description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array, 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{amazon_eventbridge?: array{aws_account_id: string, aws_region: string}, azure_event_grid?: array{azure_region: string, azure_resource_group_name: string, azure_subscription_id: string}, description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array, name: string, snapshot_api_version?: string, type: string, webhook_endpoint?: array{url: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @return \Stripe\V2\Core\EventDestination diff --git a/libs/stripe-php/lib/Service/V2/Core/EventService.php b/libs/stripe-php/lib/Service/V2/Core/EventService.php index 627c51e5..35cb6d20 100644 --- a/libs/stripe-php/lib/Service/V2/Core/EventService.php +++ b/libs/stripe-php/lib/Service/V2/Core/EventService.php @@ -27,7 +27,9 @@ class EventService extends \Stripe\Service\AbstractService } /** - * Retrieves the details of an event. + * Retrieves the details of an event if it was created in the last 30 days. Supply + * the unique identifier of the event, which might have been delivered to your + * event destination. * * @param string $id * @param null|array $params diff --git a/libs/stripe-php/lib/Service/V2/V2ServiceFactory.php b/libs/stripe-php/lib/Service/V2/V2ServiceFactory.php index f16fe623..305d53b9 100644 --- a/libs/stripe-php/lib/Service/V2/V2ServiceFactory.php +++ b/libs/stripe-php/lib/Service/V2/V2ServiceFactory.php @@ -8,6 +8,7 @@ namespace Stripe\Service\V2; * Service factory class for API resources in the V2 namespace. * * @property Billing\BillingServiceFactory $billing + * @property Commerce\CommerceServiceFactory $commerce * @property Core\CoreServiceFactory $core */ class V2ServiceFactory extends \Stripe\Service\AbstractServiceFactory @@ -17,6 +18,7 @@ class V2ServiceFactory extends \Stripe\Service\AbstractServiceFactory */ private static $classMap = [ 'billing' => Billing\BillingServiceFactory::class, + 'commerce' => Commerce\CommerceServiceFactory::class, 'core' => Core\CoreServiceFactory::class, ]; diff --git a/libs/stripe-php/lib/SetupAttempt.php b/libs/stripe-php/lib/SetupAttempt.php index a5d42093..5d342c7d 100644 --- a/libs/stripe-php/lib/SetupAttempt.php +++ b/libs/stripe-php/lib/SetupAttempt.php @@ -18,10 +18,10 @@ namespace Stripe; * @property null|Customer|string $customer The value of customer on the SetupIntent at the time of this confirmation. * @property null|string $customer_account The value of customer_account on the SetupIntent at the time of this confirmation. * @property null|string[] $flow_directions

Indicates the directions of money movement for which this payment method is intended to be used.

Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound 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.

- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|Account|string $on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation. * @property PaymentMethod|string $payment_method ID of the payment method used with this SetupAttempt. - * @property (object{acss_debit?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{}&StripeObject), bacs_debit?: (object{}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), boleto?: (object{}&StripeObject), card?: (object{brand: null|string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, network: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{}&StripeObject), google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{generated_card: null|PaymentMethod|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject)}&StripeObject), cashapp?: (object{}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, verified_name: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{buyer_id?: string}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{}&StripeObject), payto?: (object{}&StripeObject), revolut_pay?: (object{}&StripeObject), sepa_debit?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), type: string, us_bank_account?: (object{}&StripeObject)}&StripeObject) $payment_method_details + * @property (object{acss_debit?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{}&StripeObject), bacs_debit?: (object{}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), boleto?: (object{}&StripeObject), card?: (object{brand: null|string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, moto?: bool, network: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{}&StripeObject), google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{generated_card: null|PaymentMethod|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject)}&StripeObject), cashapp?: (object{}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, verified_name: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{buyer_id?: string}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{}&StripeObject), payto?: (object{}&StripeObject), pix?: (object{fingerprint?: null|string}&StripeObject), revolut_pay?: (object{}&StripeObject), satispay?: (object{}&StripeObject), sepa_debit?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), twint?: (object{}&StripeObject), type: string, upi?: (object{}&StripeObject), us_bank_account?: (object{}&StripeObject)}&StripeObject) $payment_method_details * @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) $setup_error The error encountered during this attempt to confirm the SetupIntent, if any. * @property SetupIntent|string $setup_intent ID of the SetupIntent that this attempt belongs to. * @property string $status Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned. diff --git a/libs/stripe-php/lib/SetupIntent.php b/libs/stripe-php/lib/SetupIntent.php index d9328de5..052f50a7 100644 --- a/libs/stripe-php/lib/SetupIntent.php +++ b/libs/stripe-php/lib/SetupIntent.php @@ -42,14 +42,15 @@ namespace Stripe; * @property null|string[] $flow_directions

Indicates the directions of money movement for which this payment method is intended to be used.

Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound 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.

* @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 bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|(object{enabled: bool}&StripeObject) $managed_payments * @property null|Mandate|string $mandate ID of the multi use Mandate generated by the SetupIntent. * @property null|StripeObject $metadata Set of key-value pairs 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{cashapp_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), redirect_to_url?: (object{return_url: null|string, url: null|string}&StripeObject), type: string, use_stripe_sdk?: StripeObject, verify_with_microdeposits?: (object{arrival_date: int, hosted_verification_url: string, microdeposit_type: null|string}&StripeObject)}&StripeObject) $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + * @property null|(object{blik_authorize?: (object{}&StripeObject), cashapp_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, mobile_auth_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), pix_display_qr_code?: (object{data: string, expires_at: int, hosted_instructions_url: string, image_url_png: string, image_url_svg: string}&StripeObject), redirect_to_url?: (object{return_url: null|string, url: null|string}&StripeObject), type: string, upi_handle_redirect_or_display_qr_code?: (object{hosted_instructions_url: string, qr_code: (object{expires_at: int, image_url_png: string, image_url_svg: string}&StripeObject)}&StripeObject), use_stripe_sdk?: StripeObject, verify_with_microdeposits?: (object{arrival_date: int, hosted_verification_url: string, microdeposit_type: null|string}&StripeObject)}&StripeObject) $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup. * @property null|Account|string $on_behalf_of The account (if any) for which the setup is intended. * @property null|PaymentMethod|string $payment_method ID of the payment method used with this SetupIntent. If the payment method is card_present and isn't a digital wallet, then the generated_card associated with the latest_attempt is attached to the Customer instead. * @property null|(object{id: string, parent: null|string}&StripeObject) $payment_method_configuration_details Information about the payment method configuration used for this Setup Intent. - * @property null|(object{acss_debit?: (object{currency: null|string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), amazon_pay?: (object{}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), card?: (object{mandate_options: null|(object{amount: int, amount_type: string, currency: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), card_present?: (object{}&StripeObject), klarna?: (object{currency: null|string, preferred_locale: null|string}&StripeObject), link?: (object{persistent_token: null|string}&StripeObject), paypal?: (object{billing_agreement_id: null|string}&StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&StripeObject)}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject) $payment_method_options Payment method-specific configuration for this SetupIntent. + * @property null|(object{acss_debit?: (object{currency: null|string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), amazon_pay?: (object{}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), bizum?: (object{}&StripeObject), card?: (object{mandate_options: null|(object{amount: int, amount_type: string, currency: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), card_present?: (object{}&StripeObject), klarna?: (object{currency: null|string, preferred_locale: null|string}&StripeObject), link?: (object{persistent_token: null|string}&StripeObject), paypal?: (object{billing_agreement_id: null|string}&StripeObject), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&StripeObject)}&StripeObject), pix?: (object{mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject)}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), upi?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject) $payment_method_options Payment method-specific configuration for this SetupIntent. * @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found here. * @property null|Mandate|string $single_use_mandate ID of the single_use Mandate generated by the SetupIntent. * @property string $status Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. @@ -79,7 +80,7 @@ class SetupIntent extends ApiResource * href="/docs/api/setup_intents/confirm">confirm it to collect any required * 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, customer_account?: 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, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|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, customer_account?: 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, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}}, bizum?: array{}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}}, pix?: array{mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: 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 * * @return SetupIntent the created resource @@ -145,7 +146,7 @@ class SetupIntent extends ApiResource * Updates a SetupIntent object. * * @param string $id the ID of the resource to update - * @param null|array{attach_to_self?: bool, customer?: string, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|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, customer_account?: string, description?: string, excluded_payment_method_types?: null|string[], expand?: string[], flow_directions?: string[], metadata?: null|array, 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}, bizum?: array{}, 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, 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{}, payto?: array{account_number?: string, bsb_number?: string, pay_id?: string}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, scalapay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, sunbit?: array{}, swish?: array{}, twint?: array{}, type: string, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}}, bizum?: array{}, 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}, payto?: array{mandate_options?: array{amount?: null|int, amount_type?: null|string, end_date?: null|string, payment_schedule?: null|string, payments_per_period?: null|int, purpose?: null|string, start_date?: null|string}}, pix?: array{mandate_options?: array{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, upi?: array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}, setup_future_usage?: 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 * * @return SetupIntent the updated resource diff --git a/libs/stripe-php/lib/ShippingRate.php b/libs/stripe-php/lib/ShippingRate.php index a213a2eb..ccf357d6 100644 --- a/libs/stripe-php/lib/ShippingRate.php +++ b/libs/stripe-php/lib/ShippingRate.php @@ -15,7 +15,7 @@ namespace Stripe; * @property null|(object{maximum: null|(object{unit: string, value: int}&StripeObject), minimum: null|(object{unit: string, value: int}&StripeObject)}&StripeObject) $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. * @property null|(object{amount: int, currency: string, currency_options?: StripeObject}&StripeObject) $fixed_amount - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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 $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. * @property null|string|TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001. diff --git a/libs/stripe-php/lib/Sigma/ScheduledQueryRun.php b/libs/stripe-php/lib/Sigma/ScheduledQueryRun.php index 53f84a64..dc0d885a 100644 --- a/libs/stripe-php/lib/Sigma/ScheduledQueryRun.php +++ b/libs/stripe-php/lib/Sigma/ScheduledQueryRun.php @@ -16,7 +16,7 @@ namespace Stripe\Sigma; * @property int $data_load_time When the query was run, Sigma contained a snapshot of your Stripe data at this time. * @property null|(object{message: string}&\Stripe\StripeObject) $error * @property null|\Stripe\File $file The file object representing the results of the query. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property int $result_available_until Time at which the result expires and is no longer available for download. * @property string $sql SQL for the query. * @property string $status The query's execution status, which will be completed for successful runs, and canceled, failed, or timed_out otherwise. diff --git a/libs/stripe-php/lib/Source.php b/libs/stripe-php/lib/Source.php index dba4cca5..b163f89c 100644 --- a/libs/stripe-php/lib/Source.php +++ b/libs/stripe-php/lib/Source.php @@ -38,7 +38,7 @@ namespace Stripe; * @property null|(object{bank_code?: null|string, bank_name?: null|string, bic?: null|string, statement_descriptor?: null|string}&StripeObject) $giropay * @property null|(object{bank?: null|string, bic?: null|string, iban_last4?: null|string, statement_descriptor?: null|string}&StripeObject) $ideal * @property null|(object{background_image_url?: string, client_token?: null|string, first_name?: string, last_name?: string, locale?: string, logo_url?: string, page_title?: string, pay_later_asset_urls_descriptive?: string, pay_later_asset_urls_standard?: string, pay_later_name?: string, pay_later_redirect_url?: string, pay_now_asset_urls_descriptive?: string, pay_now_asset_urls_standard?: string, pay_now_name?: string, pay_now_redirect_url?: string, pay_over_time_asset_urls_descriptive?: string, pay_over_time_asset_urls_standard?: string, pay_over_time_name?: string, pay_over_time_redirect_url?: string, payment_method_categories?: string, purchase_country?: string, purchase_type?: string, redirect_url?: string, shipping_delay?: int, shipping_first_name?: string, shipping_last_name?: string}&StripeObject) $klarna - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs 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{entity?: null|string, reference?: null|string, refund_account_holder_address_city?: null|string, refund_account_holder_address_country?: null|string, refund_account_holder_address_line1?: null|string, refund_account_holder_address_line2?: null|string, refund_account_holder_address_postal_code?: null|string, refund_account_holder_address_state?: null|string, refund_account_holder_name?: null|string, refund_iban?: null|string}&StripeObject) $multibanco * @property null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, verified_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), verified_email: null|string, verified_name: null|string, verified_phone: null|string}&StripeObject) $owner Information about the owner of the payment instrument that may be used or required by particular source types. diff --git a/libs/stripe-php/lib/SourceMandateNotification.php b/libs/stripe-php/lib/SourceMandateNotification.php index 91928ab5..8a0db2e3 100644 --- a/libs/stripe-php/lib/SourceMandateNotification.php +++ b/libs/stripe-php/lib/SourceMandateNotification.php @@ -15,7 +15,7 @@ namespace Stripe; * @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is debit_initiated. * @property null|(object{last4?: string}&StripeObject) $bacs_debit * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $reason The reason of the mandate notification. Valid reasons are mandate_confirmed or debit_initiated. * @property null|(object{creditor_identifier?: string, last4?: string, mandate_reference?: string}&StripeObject) $sepa_debit * @property Source $source

Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.

Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API provides access to our latest features and payment method types.

Related guides: Sources API and Sources & Customers.

diff --git a/libs/stripe-php/lib/SourceTransaction.php b/libs/stripe-php/lib/SourceTransaction.php index 79966b75..70e927be 100644 --- a/libs/stripe-php/lib/SourceTransaction.php +++ b/libs/stripe-php/lib/SourceTransaction.php @@ -18,7 +18,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|(object{fingerprint?: string, funding_method?: string, last4?: string, reference?: string, sender_account_number?: string, sender_name?: string, sender_sort_code?: string}&StripeObject) $gbp_credit_transfer - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{available_at?: string, invoices?: string}&StripeObject) $paper_check * @property null|(object{reference?: string, sender_iban?: string, sender_name?: string}&StripeObject) $sepa_credit_transfer * @property string $source The ID of the source this transaction is attached to. diff --git a/libs/stripe-php/lib/Stripe.php b/libs/stripe-php/lib/Stripe.php index b09db93c..5f6bf4cb 100644 --- a/libs/stripe-php/lib/Stripe.php +++ b/libs/stripe-php/lib/Stripe.php @@ -58,13 +58,10 @@ class Stripe /** @var float Maximum delay between retries, in seconds */ private static $maxNetworkRetryDelay = 2.0; - /** @var float Maximum delay between retries, in seconds, that will be respected from the Stripe API */ - private static $maxRetryAfter = 60.0; - /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '19.4.1'; + const VERSION = '21.0.0'; /** * @return string the API key used for requests @@ -247,14 +244,6 @@ class Stripe return self::$maxNetworkRetryDelay; } - /** - * @return float Maximum delay between retries, in seconds, that will be respected from the Stripe API - */ - public static function getMaxRetryAfter() - { - return self::$maxRetryAfter; - } - /** * @return float Initial delay between retries, in seconds */ diff --git a/libs/stripe-php/lib/StripeObject.php b/libs/stripe-php/lib/StripeObject.php index 58eb1098..6c3b3069 100644 --- a/libs/stripe-php/lib/StripeObject.php +++ b/libs/stripe-php/lib/StripeObject.php @@ -296,6 +296,16 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable $values = $values->toArray(); } + // Apply int64_string response coercion on raw values before hydration. + // V2 resource classes declare fieldEncodings() with metadata about which + // fields are int64_string (wire format: JSON string, SDK type: PHP int). + if (\method_exists(static::class, 'fieldEncodings')) { + $encodings = static::fieldEncodings(); + if (!empty($encodings)) { + $values = Util\Int64::coerceResponseValues($values, $encodings); + } + } + // Wipe old state before setting new. This is useful for e.g. updating a // customer, where there is no persistent card parameter. Mark those values // which don't persist as transient @@ -331,7 +341,8 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // This is necessary in case metadata is empty, as PHP arrays do // not differentiate between lists and hashes, and we consider // empty arrays to be lists. - if (('metadata' === $k) && \is_array($v)) { + // The same applies to the previous_attributes attribute. + if (('metadata' === $k || 'previous_attributes' === $k) && \is_array($v)) { $this->_values[$k] = StripeObject::constructFrom($v, $opts, $apiMode); } else { $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts, $apiMode); diff --git a/libs/stripe-php/lib/Subscription.php b/libs/stripe-php/lib/Subscription.php index 90c92231..5057426f 100644 --- a/libs/stripe-php/lib/Subscription.php +++ b/libs/stripe-php/lib/Subscription.php @@ -17,6 +17,7 @@ namespace Stripe; * @property int $billing_cycle_anchor The reference point that aligns future billing cycle dates. It sets the day of week for week intervals, the day of month for month and year intervals, and the month of year for year intervals. The timestamp is in UTC format. * @property null|(object{day_of_month: int, hour: null|int, minute: null|int, month: null|int, second: null|int}&StripeObject) $billing_cycle_anchor_config The fixed values used to calculate the billing_cycle_anchor. * @property (object{flexible: null|(object{proration_discounts?: string}&StripeObject), type: string, updated_at?: int}&StripeObject) $billing_mode The billing mode of the subscription. + * @property ((object{applies_to: null|((object{price: null|Price|string, type: string}&StripeObject))[], bill_until: (object{computed_timestamp: int, duration: null|(object{interval: string, interval_count: null|int}&StripeObject), timestamp: null|int, type: string}&StripeObject), key: string}&StripeObject))[] $billing_schedules Billing schedules for this subscription. * @property null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject) $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled * @property bool $cancel_at_period_end Whether this subscription will (if status=active) or did (if status=canceled) cancel at the end of the current billing period. @@ -34,18 +35,20 @@ namespace Stripe; * @property null|string $description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. * @property (Discount|string)[] $discounts The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use expand[]=discounts to expand each discount. * @property null|int $ended_at If the subscription has ended, the date the subscription ended. - * @property (object{account_tax_ids: null|(string|TaxId)[], issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings + * @property (object{account_tax_ids: null|(string|TaxId)[], custom_fields: null|(object{name: string, value: string}&StripeObject)[], description: null|string, footer: null|string, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings * @property Collection $items List of subscription items, each with an attached price. * @property null|Invoice|string $latest_invoice The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated). - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. + * @property null|(object{enabled: bool}&StripeObject) $managed_payments Settings for Managed Payments for this Subscription and resulting Invoices and PaymentIntents. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval. * @property null|Account|string $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. * @property null|(object{behavior: string, resumes_at: null|int}&StripeObject) $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to paused. Learn more about pausing collection. - * @property null|(object{payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[], save_default_payment_method: null|string}&StripeObject) $payment_settings Payment settings passed on to invoices created by the subscription. - * @property null|(object{interval: string, interval_count: int}&StripeObject) $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval. + * @property null|(object{payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), pix: null|(object{expires_after_seconds?: int, mandate_options?: (object{amount: null|int, amount_includes_iof: null|string, end_date: null|string, payment_schedule: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[], save_default_payment_method: null|string}&StripeObject) $payment_settings Payment settings passed on to invoices created by the subscription. + * @property null|(object{interval: string, interval_count: int}&StripeObject) $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval. * @property null|SetupIntent|string $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide. - * @property null|(object{billing_cycle_anchor: null|int, expires_at: int, subscription_items: null|SubscriptionItem[], trial_end: null|int, trial_from_plan: null|bool}&StripeObject) $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid. + * @property null|(object{billing_cycle_anchor: null|int, discount: null|Discount, discounts: null|(Discount|string)[], expires_at: int, metadata: null|StripeObject, subscription_items: null|SubscriptionItem[], trial_end: null|int, trial_from_plan: null|bool}&StripeObject) $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid. + * @property null|(object{presentment_currency: string}&StripeObject) $presentment_details * @property null|string|SubscriptionSchedule $schedule The schedule attached to the subscription * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating. * @property string $status

Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, or paused.

For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active status. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal status, the open invoice will be voided and no further invoices will be generated.

A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.

A subscription can only enter a paused status when a trial ends without a payment method. A paused subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The paused status is different from pausing collection, which still generates invoices and leaves the subscription's status unchanged.

If subscription collection_method=charge_automatically, it becomes past_due when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become canceled or unpaid (depending on your subscriptions settings).

If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.

@@ -88,7 +91,7 @@ class Subscription extends ApiResource * schedules instead. Schedules provide the flexibility to model more complex * billing configurations that change over time. * - * @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, customer_account?: 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, 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, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: 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, customer_account?: 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[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: 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, 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, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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|string $options * * @return Subscription the created resource @@ -196,7 +199,7 @@ class Subscription extends ApiResource * href="/docs/billing/subscriptions/usage-based">usage-based billing instead. * * @param string $id the ID of the resource to update - * @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|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}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array, 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, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, 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, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params + * @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: 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, 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, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, 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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params * @param null|array|string $opts * * @return Subscription the updated resource diff --git a/libs/stripe-php/lib/SubscriptionItem.php b/libs/stripe-php/lib/SubscriptionItem.php index 5e6f66a4..abb64e18 100644 --- a/libs/stripe-php/lib/SubscriptionItem.php +++ b/libs/stripe-php/lib/SubscriptionItem.php @@ -10,6 +10,7 @@ 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 $billed_until The time period the subscription item has been billed for. * @property null|(object{usage_gte: null|int}&StripeObject) $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property int $current_period_end The end time of this subscription item's current billing period. diff --git a/libs/stripe-php/lib/SubscriptionSchedule.php b/libs/stripe-php/lib/SubscriptionSchedule.php index bee52936..1971da76 100644 --- a/libs/stripe-php/lib/SubscriptionSchedule.php +++ b/libs/stripe-php/lib/SubscriptionSchedule.php @@ -21,9 +21,9 @@ namespace Stripe; * @property null|string $customer_account ID of the account who owns the subscription schedule. * @property (object{application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, default_payment_method: null|PaymentMethod|string, description: null|string, invoice_settings: (object{account_tax_ids: null|(string|TaxId)[], days_until_due: null|int, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject), on_behalf_of: null|Account|string, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject)}&StripeObject) $default_settings * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release or cancel with the default being release. release will end the subscription schedule and keep the underlying subscription running. cancel will end the subscription schedule and cancel the underlying subscription. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property ((object{add_invoice_items: ((object{discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, period: (object{end: (object{timestamp?: int, type: string}&StripeObject), start: (object{timestamp?: int, type: string}&StripeObject)}&StripeObject), price: Price|string, quantity: null|int, tax_rates?: null|TaxRate[]}&StripeObject))[], application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: null|string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, currency: string, default_payment_method: null|PaymentMethod|string, default_tax_rates?: null|TaxRate[], description: null|string, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], end_date: int, invoice_settings: null|(object{account_tax_ids: null|(string|TaxId)[], days_until_due: null|int, issuer: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), items: ((object{billing_thresholds: null|(object{usage_gte: null|int}&StripeObject), discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, plan: Plan|string, price: Price|string, quantity?: int, tax_rates?: null|TaxRate[]}&StripeObject))[], metadata: null|StripeObject, on_behalf_of: null|Account|string, proration_behavior: string, start_date: int, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject), trial_end: null|int}&StripeObject))[] $phases Configuration for the subscription schedule's phases. + * @property ((object{add_invoice_items: ((object{discountable: null|bool, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, period: (object{end: (object{timestamp?: int, type: string}&StripeObject), start: (object{timestamp?: int, type: string}&StripeObject)}&StripeObject), price: Price|string, quantity: null|int, tax_rates?: null|TaxRate[]}&StripeObject))[], application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: null|string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, currency: string, default_payment_method: null|PaymentMethod|string, default_tax_rates?: null|TaxRate[], description: null|string, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], end_date: int, invoice_settings: null|(object{account_tax_ids: null|(string|TaxId)[], days_until_due: null|int, issuer: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), items: ((object{billing_thresholds: null|(object{usage_gte: null|int}&StripeObject), discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, plan: Plan|string, price: Price|string, quantity?: int, tax_rates?: null|TaxRate[]}&StripeObject))[], metadata: null|StripeObject, on_behalf_of: null|Account|string, proration_behavior: string, start_date: int, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject), trial_end: null|int}&StripeObject))[] $phases Configuration for the subscription schedule's phases. * @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. * @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released). * @property string $status The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide. @@ -51,7 +51,7 @@ class SubscriptionSchedule extends ApiResource * Creates a new subscription schedule object. Each customer can have up to 500 * active or scheduled subscriptions. * - * @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: 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, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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, customer_account?: 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, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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|string $options * * @return SubscriptionSchedule the created resource @@ -112,7 +112,7 @@ class SubscriptionSchedule extends ApiResource * Updates an existing subscription schedule. * * @param string $id the ID of the resource to update - * @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, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array, 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, 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, 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|string $opts * * @return SubscriptionSchedule the updated resource diff --git a/libs/stripe-php/lib/Tax/Calculation.php b/libs/stripe-php/lib/Tax/Calculation.php index 7218d9d5..822a28bc 100644 --- a/libs/stripe-php/lib/Tax/Calculation.php +++ b/libs/stripe-php/lib/Tax/Calculation.php @@ -11,19 +11,19 @@ namespace Stripe\Tax; * * @property null|string $id Unique identifier for the calculation. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount_total Total amount after taxes in the smallest currency unit. + * @property int $amount_total Total amount after taxes in the smallest currency unit. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $customer The ID of an existing Customer used for the resource. * @property (object{address: null|(object{city: null|string, country: string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_source: null|string, ip_address: null|string, tax_ids: (object{type: string, value: string}&\Stripe\StripeObject)[], taxability_override: string}&\Stripe\StripeObject) $customer_details * @property null|int $expires_at Timestamp of date at which the tax calculation will expire. * @property null|\Stripe\Collection $line_items The list of items the customer is purchasing. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{address: (object{city: null|string, country: string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $ship_from_details The details of the ship from location, such as the address. * @property null|(object{amount: int, amount_tax: int, shipping_rate?: string, tax_behavior: string, tax_breakdown?: ((object{amount: int, jurisdiction: (object{country: string, display_name: string, level: string, state: null|string}&\Stripe\StripeObject), sourcing: string, tax_rate_details: null|(object{display_name: string, percentage_decimal: string, tax_type: string}&\Stripe\StripeObject), taxability_reason: string, taxable_amount: int}&\Stripe\StripeObject))[], tax_code: string}&\Stripe\StripeObject) $shipping_cost The shipping cost details for the calculation. * @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices. * @property int $tax_amount_inclusive The amount of tax already included in the line item prices. * @property ((object{amount: int, inclusive: bool, tax_rate_details: (object{country: null|string, flat_amount: null|(object{amount: int, currency: string}&\Stripe\StripeObject), percentage_decimal: string, rate_type: null|string, state: null|string, tax_type: null|string}&\Stripe\StripeObject), taxability_reason: string, taxable_amount: int}&\Stripe\StripeObject))[] $tax_breakdown Breakdown of individual tax amounts that add up to the total. - * @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation. + * @property int $tax_date The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. */ class Calculation extends \Stripe\ApiResource { diff --git a/libs/stripe-php/lib/Tax/CalculationLineItem.php b/libs/stripe-php/lib/Tax/CalculationLineItem.php index a84e415a..c3f4eb1c 100644 --- a/libs/stripe-php/lib/Tax/CalculationLineItem.php +++ b/libs/stripe-php/lib/Tax/CalculationLineItem.php @@ -7,9 +7,9 @@ namespace Stripe\Tax; /** * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount The line item amount in the smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $amount The line item amount in the smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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 $product The ID of an existing Product. * @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed. diff --git a/libs/stripe-php/lib/Tax/Registration.php b/libs/stripe-php/lib/Tax/Registration.php index 234048b0..87d5a41b 100644 --- a/libs/stripe-php/lib/Tax/Registration.php +++ b/libs/stripe-php/lib/Tax/Registration.php @@ -18,7 +18,7 @@ namespace Stripe\Tax; * @property (object{ae?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), al?: (object{type: string}&\Stripe\StripeObject), am?: (object{type: string}&\Stripe\StripeObject), ao?: (object{type: string}&\Stripe\StripeObject), at?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), au?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), aw?: (object{type: string}&\Stripe\StripeObject), az?: (object{type: string}&\Stripe\StripeObject), ba?: (object{type: string}&\Stripe\StripeObject), bb?: (object{type: string}&\Stripe\StripeObject), bd?: (object{type: string}&\Stripe\StripeObject), be?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), bf?: (object{type: string}&\Stripe\StripeObject), bg?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), bh?: (object{type: string}&\Stripe\StripeObject), bj?: (object{type: string}&\Stripe\StripeObject), bs?: (object{type: string}&\Stripe\StripeObject), by?: (object{type: string}&\Stripe\StripeObject), ca?: (object{province_standard?: (object{province: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), cd?: (object{type: string}&\Stripe\StripeObject), ch?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), cl?: (object{type: string}&\Stripe\StripeObject), cm?: (object{type: string}&\Stripe\StripeObject), co?: (object{type: string}&\Stripe\StripeObject), cr?: (object{type: string}&\Stripe\StripeObject), cv?: (object{type: string}&\Stripe\StripeObject), cy?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), cz?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), de?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), dk?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ec?: (object{type: string}&\Stripe\StripeObject), ee?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), eg?: (object{type: string}&\Stripe\StripeObject), es?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), et?: (object{type: string}&\Stripe\StripeObject), fi?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), fr?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), gb?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ge?: (object{type: string}&\Stripe\StripeObject), gn?: (object{type: string}&\Stripe\StripeObject), gr?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), hr?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), hu?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), id?: (object{type: string}&\Stripe\StripeObject), ie?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), in?: (object{type: string}&\Stripe\StripeObject), is?: (object{type: string}&\Stripe\StripeObject), it?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), jp?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ke?: (object{type: string}&\Stripe\StripeObject), kg?: (object{type: string}&\Stripe\StripeObject), kh?: (object{type: string}&\Stripe\StripeObject), kr?: (object{type: string}&\Stripe\StripeObject), kz?: (object{type: string}&\Stripe\StripeObject), la?: (object{type: string}&\Stripe\StripeObject), lk?: (object{type: string}&\Stripe\StripeObject), lt?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), lu?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), lv?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ma?: (object{type: string}&\Stripe\StripeObject), md?: (object{type: string}&\Stripe\StripeObject), me?: (object{type: string}&\Stripe\StripeObject), mk?: (object{type: string}&\Stripe\StripeObject), mr?: (object{type: string}&\Stripe\StripeObject), mt?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), mx?: (object{type: string}&\Stripe\StripeObject), my?: (object{type: string}&\Stripe\StripeObject), ng?: (object{type: string}&\Stripe\StripeObject), nl?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), no?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), np?: (object{type: string}&\Stripe\StripeObject), nz?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), om?: (object{type: string}&\Stripe\StripeObject), pe?: (object{type: string}&\Stripe\StripeObject), ph?: (object{type: string}&\Stripe\StripeObject), pl?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), pt?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ro?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), rs?: (object{type: string}&\Stripe\StripeObject), ru?: (object{type: string}&\Stripe\StripeObject), sa?: (object{type: string}&\Stripe\StripeObject), se?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), sg?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), si?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), sk?: (object{standard?: (object{place_of_supply_scheme: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), sn?: (object{type: string}&\Stripe\StripeObject), sr?: (object{type: string}&\Stripe\StripeObject), th?: (object{type: string}&\Stripe\StripeObject), tj?: (object{type: string}&\Stripe\StripeObject), tr?: (object{type: string}&\Stripe\StripeObject), tw?: (object{type: string}&\Stripe\StripeObject), tz?: (object{type: string}&\Stripe\StripeObject), ua?: (object{type: string}&\Stripe\StripeObject), ug?: (object{type: string}&\Stripe\StripeObject), us?: (object{local_amusement_tax?: (object{jurisdiction: string}&\Stripe\StripeObject), local_lease_tax?: (object{jurisdiction: string}&\Stripe\StripeObject), state: string, state_sales_tax?: (object{elections?: (object{jurisdiction?: string, type: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), uy?: (object{type: string}&\Stripe\StripeObject), uz?: (object{type: string}&\Stripe\StripeObject), vn?: (object{type: string}&\Stripe\StripeObject), za?: (object{type: string}&\Stripe\StripeObject), zm?: (object{type: string}&\Stripe\StripeObject), zw?: (object{type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $country_options * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|int $expires_at If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status The status of the registration. This field is present for convenience and can be deduced from active_from and expires_at. */ class Registration extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/Tax/Settings.php b/libs/stripe-php/lib/Tax/Settings.php index 321e5d3a..32293b43 100644 --- a/libs/stripe-php/lib/Tax/Settings.php +++ b/libs/stripe-php/lib/Tax/Settings.php @@ -12,7 +12,7 @@ namespace Stripe\Tax; * @property string $object String representing the object's type. Objects of the same type share the same value. * @property (object{provider: string, tax_behavior: null|string, tax_code: null|string}&\Stripe\StripeObject) $defaults * @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)}&\Stripe\StripeObject) $head_office The place where your business is located. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status The status of the Tax Settings. * @property (object{active?: (object{}&\Stripe\StripeObject), pending?: (object{missing_fields: null|string[]}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details */ diff --git a/libs/stripe-php/lib/Tax/Transaction.php b/libs/stripe-php/lib/Tax/Transaction.php index e851a952..93fb83fe 100644 --- a/libs/stripe-php/lib/Tax/Transaction.php +++ b/libs/stripe-php/lib/Tax/Transaction.php @@ -16,14 +16,14 @@ namespace Stripe\Tax; * @property null|string $customer The ID of an existing Customer used for the resource. * @property (object{address: null|(object{city: null|string, country: string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_source: null|string, ip_address: null|string, tax_ids: (object{type: string, value: string}&\Stripe\StripeObject)[], taxability_override: string}&\Stripe\StripeObject) $customer_details * @property null|\Stripe\Collection $line_items The tax collected or refunded, by line item. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property int $posted_at The Unix timestamp representing when the tax liability is assumed or reduced. * @property string $reference A custom unique identifier, such as 'myOrder_123'. * @property null|(object{original_transaction: null|string}&\Stripe\StripeObject) $reversal If type=reversal, contains information about what was reversed. * @property null|(object{address: (object{city: null|string, country: string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $ship_from_details The details of the ship from location, such as the address. * @property null|(object{amount: int, amount_tax: int, shipping_rate?: string, tax_behavior: string, tax_breakdown?: ((object{amount: int, jurisdiction: (object{country: string, display_name: string, level: string, state: null|string}&\Stripe\StripeObject), sourcing: string, tax_rate_details: null|(object{display_name: string, percentage_decimal: string, tax_type: string}&\Stripe\StripeObject), taxability_reason: string, taxable_amount: int}&\Stripe\StripeObject))[], tax_code: string}&\Stripe\StripeObject) $shipping_cost The shipping cost details for the transaction. - * @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation. + * @property int $tax_date The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. * @property string $type If reversal, this transaction reverses an earlier transaction. */ class Transaction extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/Tax/TransactionLineItem.php b/libs/stripe-php/lib/Tax/TransactionLineItem.php index fae64c44..2ed48936 100644 --- a/libs/stripe-php/lib/Tax/TransactionLineItem.php +++ b/libs/stripe-php/lib/Tax/TransactionLineItem.php @@ -7,9 +7,9 @@ namespace Stripe\Tax; /** * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount The line item amount in the smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $amount The line item amount in the smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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 $product The ID of an existing Product. * @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed. diff --git a/libs/stripe-php/lib/TaxId.php b/libs/stripe-php/lib/TaxId.php index c3caa060..a0a6cd6a 100644 --- a/libs/stripe-php/lib/TaxId.php +++ b/libs/stripe-php/lib/TaxId.php @@ -16,9 +16,9 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|Customer|string $customer ID of the customer. * @property null|string $customer_account ID of the Account representing the customer. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|(object{account?: Account|string, application?: Application|string, customer?: Customer|string, customer_account: null|string, type: string}&StripeObject) $owner The account or customer the tax ID belongs to. - * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat, bj_ifu, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cm_niu, cn_tin, co_nit, cr_tin, cv_nif, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, et_tin, eu_oss_vat, eu_vat, gb_vat, ge_vat, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kg_tin, kh_tin, kr_brn, kz_bin, la_tin, li_uid, li_vat, lk_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, pl_nip, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, or zw_tin. Note that some legacy tax IDs have type unknown + * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat, bj_ifu, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cm_niu, cn_tin, co_nit, cr_tin, cv_nif, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, et_tin, eu_oss_vat, eu_vat, fo_vat, gb_vat, ge_vat, gi_tin, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, it_cf, jp_cn, jp_rn, jp_trn, ke_pin, kg_tin, kh_tin, kr_brn, kz_bin, la_tin, li_uid, li_vat, lk_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, pl_nip, py_ruc, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, or zw_tin. Note that some legacy tax IDs have type unknown * @property string $value Value of the tax ID. * @property null|(object{status: string, verified_address: null|string, verified_name: null|string}&StripeObject) $verification Tax ID verification information. */ @@ -71,8 +71,10 @@ class TaxId extends ApiResource const TYPE_ET_TIN = 'et_tin'; const TYPE_EU_OSS_VAT = 'eu_oss_vat'; const TYPE_EU_VAT = 'eu_vat'; + const TYPE_FO_VAT = 'fo_vat'; const TYPE_GB_VAT = 'gb_vat'; const TYPE_GE_VAT = 'ge_vat'; + const TYPE_GI_TIN = 'gi_tin'; const TYPE_GN_NIF = 'gn_nif'; const TYPE_HK_BR = 'hk_br'; const TYPE_HR_OIB = 'hr_oib'; @@ -81,6 +83,7 @@ class TaxId extends ApiResource const TYPE_IL_VAT = 'il_vat'; const TYPE_IN_GST = 'in_gst'; const TYPE_IS_VAT = 'is_vat'; + const TYPE_IT_CF = 'it_cf'; const TYPE_JP_CN = 'jp_cn'; const TYPE_JP_RN = 'jp_rn'; const TYPE_JP_TRN = 'jp_trn'; @@ -111,6 +114,7 @@ class TaxId extends ApiResource const TYPE_PE_RUC = 'pe_ruc'; const TYPE_PH_TIN = 'ph_tin'; const TYPE_PL_NIP = 'pl_nip'; + const TYPE_PY_RUC = 'py_ruc'; const TYPE_RO_TIN = 'ro_tin'; const TYPE_RS_PIB = 'rs_pib'; const TYPE_RU_INN = 'ru_inn'; diff --git a/libs/stripe-php/lib/TaxRate.php b/libs/stripe-php/lib/TaxRate.php index 148745a7..e0eb5bdf 100644 --- a/libs/stripe-php/lib/TaxRate.php +++ b/libs/stripe-php/lib/TaxRate.php @@ -21,7 +21,7 @@ namespace Stripe; * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive. * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. * @property null|string $jurisdiction_level The level of the jurisdiction that imposes this tax rate. Will be null for manually defined tax rates. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property float $percentage Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. * @property null|string $rate_type Indicates the type of tax rate applied to the taxable amount. This value can be null when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. diff --git a/libs/stripe-php/lib/TelemetryId.php b/libs/stripe-php/lib/TelemetryId.php new file mode 100644 index 00000000..f6a1b90c --- /dev/null +++ b/libs/stripe-php/lib/TelemetryId.php @@ -0,0 +1,105 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $name String indicating the name of the Configuration object, set by the user * @property null|(object{enabled: null|bool}&\Stripe\StripeObject) $offline * @property null|(object{end_hour: int, start_hour: int}&\Stripe\StripeObject) $reboot_window * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $stripe_s700 * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $stripe_s710 * @property null|(object{aed?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), aud?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), cad?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), chf?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), czk?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), dkk?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), eur?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), gbp?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), gip?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), hkd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), huf?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), jpy?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), mxn?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), myr?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), nok?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), nzd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), pln?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), ron?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), sek?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), sgd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject), usd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $tipping + * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $verifone_m425 * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $verifone_p400 + * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $verifone_p630 + * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $verifone_ux700 + * @property null|(object{splashscreen?: string|\Stripe\File}&\Stripe\StripeObject) $verifone_v660p * @property null|(object{enterprise_eap_peap?: (object{ca_certificate_file?: string, password: string, ssid: string, username: string}&\Stripe\StripeObject), enterprise_eap_tls?: (object{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}&\Stripe\StripeObject), personal_psk?: (object{password: string, ssid: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $wifi */ class Configuration extends \Stripe\ApiResource @@ -33,7 +37,7 @@ class Configuration extends \Stripe\ApiResource /** * Creates a new Configuration object. * - * @param null|array{bbpos_wisepad3?: array{splashscreen?: null|string}, bbpos_wisepos_e?: array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, stripe_s710?: 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}, 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|array{bbpos_wisepad3?: array{splashscreen?: null|string}, bbpos_wisepos_e?: array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, stripe_s710?: 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}, 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_m425?: array{splashscreen?: null|string}, verifone_p400?: array{splashscreen?: null|string}, verifone_p630?: array{splashscreen?: null|string}, verifone_ux700?: array{splashscreen?: null|string}, verifone_v660p?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params * @param null|array|string $options * * @return Configuration the created resource @@ -113,7 +117,7 @@ class Configuration extends \Stripe\ApiResource * Updates a new Configuration object. * * @param string $id the ID of the resource to update - * @param null|array{bbpos_wisepad3?: null|array{splashscreen?: null|string}, bbpos_wisepos_e?: null|array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, 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}, stripe_s710?: 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}, 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|array{bbpos_wisepad3?: null|array{splashscreen?: null|string}, bbpos_wisepos_e?: null|array{splashscreen?: null|string}, cellular?: null|array{enabled: bool}, 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}, stripe_s710?: 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}, 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_m425?: null|array{splashscreen?: null|string}, verifone_p400?: null|array{splashscreen?: null|string}, verifone_p630?: null|array{splashscreen?: null|string}, verifone_ux700?: null|array{splashscreen?: null|string}, verifone_v660p?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params * @param null|array|string $opts * * @return Configuration the updated resource diff --git a/libs/stripe-php/lib/Terminal/Location.php b/libs/stripe-php/lib/Terminal/Location.php index ed55213b..885d710a 100644 --- a/libs/stripe-php/lib/Terminal/Location.php +++ b/libs/stripe-php/lib/Terminal/Location.php @@ -18,7 +18,7 @@ namespace Stripe\Terminal; * @property string $display_name The display name of the location. * @property null|string $display_name_kana The Kana variation of the display name of the location. * @property null|string $display_name_kanji The Kanji variation of the display name of the location. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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 $phone The phone number of the location. */ diff --git a/libs/stripe-php/lib/Terminal/Reader.php b/libs/stripe-php/lib/Terminal/Reader.php index 8bf16c18..9b237c4d 100644 --- a/libs/stripe-php/lib/Terminal/Reader.php +++ b/libs/stripe-php/lib/Terminal/Reader.php @@ -11,13 +11,13 @@ namespace Stripe\Terminal; * * @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|(object{collect_inputs?: (object{inputs: ((object{custom_text: null|(object{description: null|string, skip_button: null|string, submit_button: null|string, title: null|string}&\Stripe\StripeObject), email?: (object{value: null|string}&\Stripe\StripeObject), numeric?: (object{value: null|string}&\Stripe\StripeObject), phone?: (object{value: null|string}&\Stripe\StripeObject), required: null|bool, selection?: (object{choices: ((object{id: null|string, style: null|string, text: string}&\Stripe\StripeObject))[], id: null|string, text: null|string}&\Stripe\StripeObject), signature?: (object{value: null|string}&\Stripe\StripeObject), skipped?: bool, text?: (object{value: null|string}&\Stripe\StripeObject), toggles: null|((object{default_value: null|string, description: null|string, title: null|string, value: null|string}&\Stripe\StripeObject))[], type: string}&\Stripe\StripeObject))[], metadata: null|\Stripe\StripeObject}&\Stripe\StripeObject), collect_payment_method?: (object{collect_config?: (object{enable_customer_cancellation?: bool, skip_tipping?: bool, tipping?: (object{amount_eligible?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject), payment_intent: string|\Stripe\PaymentIntent, payment_method?: \Stripe\PaymentMethod}&\Stripe\StripeObject), confirm_payment_intent?: (object{confirm_config?: (object{return_url?: string}&\Stripe\StripeObject), payment_intent: string|\Stripe\PaymentIntent}&\Stripe\StripeObject), failure_code: null|string, failure_message: null|string, process_payment_intent?: (object{payment_intent: string|\Stripe\PaymentIntent, process_config?: (object{enable_customer_cancellation?: bool, return_url?: string, skip_tipping?: bool, tipping?: (object{amount_eligible?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), process_setup_intent?: (object{generated_card?: string, process_config?: (object{enable_customer_cancellation?: bool}&\Stripe\StripeObject), setup_intent: string|\Stripe\SetupIntent}&\Stripe\StripeObject), refund_payment?: (object{amount?: int, charge?: string|\Stripe\Charge, metadata?: \Stripe\StripeObject, payment_intent?: string|\Stripe\PaymentIntent, reason?: string, refund?: string|\Stripe\Refund, refund_application_fee?: bool, refund_payment_config?: (object{enable_customer_cancellation?: bool}&\Stripe\StripeObject), reverse_transfer?: bool}&\Stripe\StripeObject), set_reader_display?: (object{cart: null|(object{currency: string, line_items: (object{amount: int, description: string, quantity: int}&\Stripe\StripeObject)[], tax: null|int, total: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), status: string, type: string}&\Stripe\StripeObject) $action The most recent action performed by the reader. + * @property null|(object{api_error: 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?: \Stripe\PaymentIntent, payment_method?: \Stripe\PaymentMethod, payment_method_type?: string, request_log_url?: string, setup_intent?: \Stripe\SetupIntent, source?: \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source, type: string}&\Stripe\StripeObject), collect_inputs?: (object{inputs: ((object{custom_text: null|(object{description: null|string, skip_button: null|string, submit_button: null|string, title: null|string}&\Stripe\StripeObject), email?: (object{value: null|string}&\Stripe\StripeObject), numeric?: (object{value: null|string}&\Stripe\StripeObject), phone?: (object{value: null|string}&\Stripe\StripeObject), required: null|bool, selection?: (object{choices: ((object{id: null|string, style: null|string, text: string}&\Stripe\StripeObject))[], id: null|string, text: null|string}&\Stripe\StripeObject), signature?: (object{value: null|string}&\Stripe\StripeObject), skipped?: bool, text?: (object{value: null|string}&\Stripe\StripeObject), toggles: null|((object{default_value: null|string, description: null|string, title: null|string, value: null|string}&\Stripe\StripeObject))[], type: string}&\Stripe\StripeObject))[], metadata: null|\Stripe\StripeObject}&\Stripe\StripeObject), collect_payment_method?: (object{collect_config?: (object{enable_customer_cancellation?: bool, skip_tipping?: bool, tipping?: (object{amount_eligible?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject), payment_intent: string|\Stripe\PaymentIntent, payment_method?: \Stripe\PaymentMethod}&\Stripe\StripeObject), confirm_payment_intent?: (object{confirm_config?: (object{return_url?: string}&\Stripe\StripeObject), payment_intent: string|\Stripe\PaymentIntent}&\Stripe\StripeObject), failure_code: null|string, failure_message: null|string, print_content?: (object{image?: (object{created_at: int, filename: string, size: int, type: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), process_payment_intent?: (object{payment_intent: string|\Stripe\PaymentIntent, process_config?: (object{enable_customer_cancellation?: bool, return_url?: string, skip_tipping?: bool, tipping?: (object{amount_eligible?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), process_setup_intent?: (object{generated_card?: string, process_config?: (object{enable_customer_cancellation?: bool}&\Stripe\StripeObject), setup_intent: string|\Stripe\SetupIntent}&\Stripe\StripeObject), refund_payment?: (object{amount?: int, charge?: string|\Stripe\Charge, metadata?: \Stripe\StripeObject, payment_intent?: string|\Stripe\PaymentIntent, reason?: string, refund?: string|\Stripe\Refund, refund_application_fee?: bool, refund_payment_config?: (object{enable_customer_cancellation?: bool}&\Stripe\StripeObject), reverse_transfer?: bool}&\Stripe\StripeObject), set_reader_display?: (object{cart: null|(object{currency: string, line_items: (object{amount: int, description: string, quantity: int}&\Stripe\StripeObject)[], tax: null|int, total: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), status: string, type: string}&\Stripe\StripeObject) $action The most recent action performed by the reader. * @property null|string $device_sw_version The current software version of the reader. * @property string $device_type Device type of the reader. * @property null|string $ip_address The local IP address of the reader. * @property string $label Custom label given to the reader for easier identification. * @property null|int $last_seen_at The last time this reader reported to Stripe backend. Timestamp is measured in milliseconds since the Unix epoch. Unlike most other Stripe timestamp fields which use seconds, this field uses milliseconds. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|Location|string $location The location identifier of the reader. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $serial_number Serial number of the reader. @@ -35,11 +35,19 @@ class Reader extends \Stripe\ApiResource const DEVICE_TYPE_MOBILE_PHONE_READER = 'mobile_phone_reader'; const DEVICE_TYPE_SIMULATED_STRIPE_S700 = 'simulated_stripe_s700'; const DEVICE_TYPE_SIMULATED_STRIPE_S710 = 'simulated_stripe_s710'; + const DEVICE_TYPE_SIMULATED_VERIFONE_M425 = 'simulated_verifone_m425'; + const DEVICE_TYPE_SIMULATED_VERIFONE_P630 = 'simulated_verifone_p630'; + const DEVICE_TYPE_SIMULATED_VERIFONE_UX700 = 'simulated_verifone_ux700'; + const DEVICE_TYPE_SIMULATED_VERIFONE_V660P = 'simulated_verifone_v660p'; const DEVICE_TYPE_SIMULATED_WISEPOS_E = 'simulated_wisepos_e'; const DEVICE_TYPE_STRIPE_M2 = 'stripe_m2'; const DEVICE_TYPE_STRIPE_S700 = 'stripe_s700'; const DEVICE_TYPE_STRIPE_S710 = 'stripe_s710'; + const DEVICE_TYPE_VERIFONE_M425 = 'verifone_m425'; const DEVICE_TYPE_VERIFONE_P400 = 'verifone_P400'; + const DEVICE_TYPE_VERIFONE_P630 = 'verifone_p630'; + const DEVICE_TYPE_VERIFONE_UX700 = 'verifone_ux700'; + const DEVICE_TYPE_VERIFONE_V660P = 'verifone_v660p'; const STATUS_OFFLINE = 'offline'; const STATUS_ONLINE = 'online'; diff --git a/libs/stripe-php/lib/TestHelpers/TestClock.php b/libs/stripe-php/lib/TestHelpers/TestClock.php index 61d86f1d..4e842392 100644 --- a/libs/stripe-php/lib/TestHelpers/TestClock.php +++ b/libs/stripe-php/lib/TestHelpers/TestClock.php @@ -14,7 +14,7 @@ namespace Stripe\TestHelpers; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property int $deletes_after Time at which this clock is scheduled to auto delete. * @property int $frozen_time Time at which all objects belonging to this clock are frozen. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|string $name The custom name supplied at creation. * @property string $status The status of the Test Clock. * @property (object{advancing?: (object{target_frozen_time: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details @@ -30,7 +30,7 @@ class TestClock extends \Stripe\ApiResource /** * Creates a new test clock that can be attached to new customers and quotes. * - * @param null|array{expand?: string[], frozen_time: int, name?: string} $params + * @param null|array{customer?: string, expand?: string[], frozen_time: int, name?: string} $params * @param null|array|string $options * * @return TestClock the created resource diff --git a/libs/stripe-php/lib/Token.php b/libs/stripe-php/lib/Token.php index 4aa0182f..4e2b5c3f 100644 --- a/libs/stripe-php/lib/Token.php +++ b/libs/stripe-php/lib/Token.php @@ -32,7 +32,7 @@ namespace Stripe; * @property null|Card $card

You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.

Related guide: Card payments with Sources

* @property null|string $client_ip IP address of the client that generates the token. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $type Type of the token: account, bank_account, card, or pii. * @property bool $used Determines if you have already used this token (you can only use tokens once). */ diff --git a/libs/stripe-php/lib/Topup.php b/libs/stripe-php/lib/Topup.php index 70028016..bacfb504 100644 --- a/libs/stripe-php/lib/Topup.php +++ b/libs/stripe-php/lib/Topup.php @@ -19,9 +19,9 @@ namespace Stripe; * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|int $expected_availability_date Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. - * @property null|string $failure_code Error code explaining reason for top-up failure if available (see the errors section for a list of codes). + * @property null|string $failure_code Error code explaining reason for top-up failure if available (see the errors section for a list of codes). * @property null|string $failure_message Message to user further explaining reason for top-up failure if available. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|Source $source The source field is deprecated. It might not always be present in the API response. * @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. @@ -43,7 +43,7 @@ class Topup extends ApiResource /** * Top up the balance of an account. * - * @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|array, source?: string, statement_descriptor?: string, transfer_group?: string} $params + * @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|array, payment_method?: string, payment_method_options?: array{us_bank_account?: array{network: string}}, source?: string, statement_descriptor?: string, transfer_group?: string} $params * @param null|array|string $options * * @return Topup the created resource diff --git a/libs/stripe-php/lib/Transfer.php b/libs/stripe-php/lib/Transfer.php index 0c4eca5e..4f6a8fbd 100644 --- a/libs/stripe-php/lib/Transfer.php +++ b/libs/stripe-php/lib/Transfer.php @@ -26,7 +26,7 @@ namespace Stripe; * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|Account|string $destination ID of the Stripe account the transfer was sent to. * @property null|Charge|string $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property Collection $reversals A list of reversals that have been applied to the transfer. * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. diff --git a/libs/stripe-php/lib/Treasury/CreditReversal.php b/libs/stripe-php/lib/Treasury/CreditReversal.php index 5f65a695..7a4ea617 100644 --- a/libs/stripe-php/lib/Treasury/CreditReversal.php +++ b/libs/stripe-php/lib/Treasury/CreditReversal.php @@ -14,7 +14,7 @@ namespace Stripe\Treasury; * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property string $financial_account The FinancialAccount to reverse funds from. * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $network The rails used to reverse the funds. * @property string $received_credit The ReceivedCredit being reversed. diff --git a/libs/stripe-php/lib/Treasury/DebitReversal.php b/libs/stripe-php/lib/Treasury/DebitReversal.php index c2c400d2..727f3e69 100644 --- a/libs/stripe-php/lib/Treasury/DebitReversal.php +++ b/libs/stripe-php/lib/Treasury/DebitReversal.php @@ -15,7 +15,7 @@ namespace Stripe\Treasury; * @property null|string $financial_account The FinancialAccount to reverse funds from. * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. * @property null|(object{issuing_dispute: null|string}&\Stripe\StripeObject) $linked_flows Other flows linked to a DebitReversal. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $network The rails used to reverse the funds. * @property string $received_debit The ReceivedDebit being reversed. diff --git a/libs/stripe-php/lib/Treasury/FinancialAccount.php b/libs/stripe-php/lib/Treasury/FinancialAccount.php index 5ef63fb2..43e2168c 100644 --- a/libs/stripe-php/lib/Treasury/FinancialAccount.php +++ b/libs/stripe-php/lib/Treasury/FinancialAccount.php @@ -17,7 +17,7 @@ namespace Stripe\Treasury; * @property null|FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. Stripe or the platform can control Features via the requested field. * @property ((object{aba?: (object{account_holder_name: string, account_number?: null|string, account_number_last4: string, bank_name: string, routing_number: string}&\Stripe\StripeObject), supported_networks?: string[], type: string}&\Stripe\StripeObject))[] $financial_addresses The set of credentials that resolve to a FinancialAccount. * @property null|bool $is_default - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $nickname The nickname for the FinancialAccount. * @property null|string[] $pending_features The array of paths to pending Features in the Features hash. diff --git a/libs/stripe-php/lib/Treasury/InboundTransfer.php b/libs/stripe-php/lib/Treasury/InboundTransfer.php index 9ed106eb..568b7f02 100644 --- a/libs/stripe-php/lib/Treasury/InboundTransfer.php +++ b/libs/stripe-php/lib/Treasury/InboundTransfer.php @@ -20,7 +20,7 @@ namespace Stripe\Treasury; * @property string $financial_account The FinancialAccount that received the funds. * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. * @property (object{received_debit: null|string}&\Stripe\StripeObject) $linked_flows - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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 $origin_payment_method The origin payment method to be debited for an InboundTransfer. * @property null|(object{billing_details: (object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), email: null|string, name: null|string}&\Stripe\StripeObject), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, fingerprint: null|string, last4: null|string, mandate?: string|\Stripe\Mandate, network: string, routing_number: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $origin_payment_method_details Details about the PaymentMethod for an InboundTransfer. diff --git a/libs/stripe-php/lib/Treasury/OutboundPayment.php b/libs/stripe-php/lib/Treasury/OutboundPayment.php index 727de900..9aa119d9 100644 --- a/libs/stripe-php/lib/Treasury/OutboundPayment.php +++ b/libs/stripe-php/lib/Treasury/OutboundPayment.php @@ -25,7 +25,7 @@ namespace Stripe\Treasury; * @property int $expected_arrival_date The date when funds are expected to arrive in the destination account. * @property string $financial_account The FinancialAccount that funds were pulled from. * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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{code: string, transaction: string|Transaction}&\Stripe\StripeObject) $returned_details Details about a returned OutboundPayment. Only set when the status is returned. * @property string $statement_descriptor The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). diff --git a/libs/stripe-php/lib/Treasury/OutboundTransfer.php b/libs/stripe-php/lib/Treasury/OutboundTransfer.php index 7e01b575..c6311bcb 100644 --- a/libs/stripe-php/lib/Treasury/OutboundTransfer.php +++ b/libs/stripe-php/lib/Treasury/OutboundTransfer.php @@ -23,7 +23,7 @@ namespace Stripe\Treasury; * @property int $expected_arrival_date The date when funds are expected to arrive in the destination account. * @property string $financial_account The FinancialAccount that funds were pulled from. * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property \Stripe\StripeObject $metadata Set of key-value pairs 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{code: string, transaction: string|Transaction}&\Stripe\StripeObject) $returned_details Details about a returned OutboundTransfer. Only set when the status is returned. * @property string $statement_descriptor Information about the OutboundTransfer to be sent to the recipient account. diff --git a/libs/stripe-php/lib/Treasury/ReceivedCredit.php b/libs/stripe-php/lib/Treasury/ReceivedCredit.php index 4fb198de..3ecf0551 100644 --- a/libs/stripe-php/lib/Treasury/ReceivedCredit.php +++ b/libs/stripe-php/lib/Treasury/ReceivedCredit.php @@ -18,7 +18,7 @@ namespace Stripe\Treasury; * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. * @property (object{balance?: string, billing_details: (object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), email: null|string, name: null|string}&\Stripe\StripeObject), financial_account?: (object{id: string, network: string}&\Stripe\StripeObject), issuing_card?: string, type: string, us_bank_account?: (object{bank_name: null|string, last4: null|string, routing_number: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $initiating_payment_method_details * @property (object{credit_reversal: null|string, issuing_authorization: null|string, issuing_transaction: null|string, source_flow: null|string, source_flow_details?: null|(object{credit_reversal?: CreditReversal, outbound_payment?: OutboundPayment, outbound_transfer?: OutboundTransfer, payout?: \Stripe\Payout, type: string}&\Stripe\StripeObject), source_flow_type: null|string}&\Stripe\StripeObject) $linked_flows - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $network The rails used to send the funds. * @property null|(object{deadline: null|int, restricted_reason: null|string}&\Stripe\StripeObject) $reversal_details Details describing when a ReceivedCredit may be reversed. * @property string $status Status of the ReceivedCredit. ReceivedCredits are created either succeeded (approved) or failed (declined). If a ReceivedCredit is declined, the failure reason can be found in the failure_code field. diff --git a/libs/stripe-php/lib/Treasury/ReceivedDebit.php b/libs/stripe-php/lib/Treasury/ReceivedDebit.php index 8753abe8..9d74951d 100644 --- a/libs/stripe-php/lib/Treasury/ReceivedDebit.php +++ b/libs/stripe-php/lib/Treasury/ReceivedDebit.php @@ -18,7 +18,7 @@ namespace Stripe\Treasury; * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. * @property null|(object{balance?: string, billing_details: (object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), email: null|string, name: null|string}&\Stripe\StripeObject), financial_account?: (object{id: string, network: string}&\Stripe\StripeObject), issuing_card?: string, type: string, us_bank_account?: (object{bank_name: null|string, last4: null|string, routing_number: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $initiating_payment_method_details * @property (object{debit_reversal: null|string, inbound_transfer: null|string, issuing_authorization: null|string, issuing_transaction: null|string, payout: null|string, topup: null|string}&\Stripe\StripeObject) $linked_flows - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $network The network used for the ReceivedDebit. * @property null|(object{deadline: null|int, restricted_reason: null|string}&\Stripe\StripeObject) $reversal_details Details describing when a ReceivedDebit might be reversed. * @property string $status Status of the ReceivedDebit. ReceivedDebits are created with a status of either succeeded (approved) or failed (declined). The failure reason can be found under the failure_code. diff --git a/libs/stripe-php/lib/Treasury/Transaction.php b/libs/stripe-php/lib/Treasury/Transaction.php index e16a9912..e032ae51 100644 --- a/libs/stripe-php/lib/Treasury/Transaction.php +++ b/libs/stripe-php/lib/Treasury/Transaction.php @@ -19,7 +19,7 @@ namespace Stripe\Treasury; * @property null|string $flow ID of the flow that created the Transaction. * @property null|(object{credit_reversal?: CreditReversal, debit_reversal?: DebitReversal, inbound_transfer?: InboundTransfer, issuing_authorization?: \Stripe\Issuing\Authorization, outbound_payment?: OutboundPayment, outbound_transfer?: OutboundTransfer, received_credit?: ReceivedCredit, received_debit?: ReceivedDebit, type: string}&\Stripe\StripeObject) $flow_details Details of the flow that created the Transaction. * @property string $flow_type Type of the flow that created the Transaction. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string $status Status of the Transaction. * @property (object{posted_at: null|int, void_at: null|int}&\Stripe\StripeObject) $status_transitions */ diff --git a/libs/stripe-php/lib/Treasury/TransactionEntry.php b/libs/stripe-php/lib/Treasury/TransactionEntry.php index 130b2981..f41b4128 100644 --- a/libs/stripe-php/lib/Treasury/TransactionEntry.php +++ b/libs/stripe-php/lib/Treasury/TransactionEntry.php @@ -17,7 +17,7 @@ namespace Stripe\Treasury; * @property null|string $flow Token of the flow associated with the TransactionEntry. * @property null|(object{credit_reversal?: CreditReversal, debit_reversal?: DebitReversal, inbound_transfer?: InboundTransfer, issuing_authorization?: \Stripe\Issuing\Authorization, outbound_payment?: OutboundPayment, outbound_transfer?: OutboundTransfer, received_credit?: ReceivedCredit, received_debit?: ReceivedDebit, type: string}&\Stripe\StripeObject) $flow_details Details of the flow associated with the TransactionEntry. * @property string $flow_type Type of the flow associated with the TransactionEntry. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property string|Transaction $transaction The Transaction associated with this object. * @property string $type The specific money movement that generated the TransactionEntry. */ diff --git a/libs/stripe-php/lib/Util/ApiVersion.php b/libs/stripe-php/lib/Util/ApiVersion.php index fe1e30cf..e81f065a 100644 --- a/libs/stripe-php/lib/Util/ApiVersion.php +++ b/libs/stripe-php/lib/Util/ApiVersion.php @@ -6,6 +6,6 @@ namespace Stripe\Util; class ApiVersion { - const CURRENT = '2026-02-25.clover'; - const CURRENT_MAJOR = 'clover'; + const CURRENT = '2026-06-24.dahlia'; + const CURRENT_MAJOR = 'dahlia'; } diff --git a/libs/stripe-php/lib/Util/EventNotificationTypes.php b/libs/stripe-php/lib/Util/EventNotificationTypes.php index f3dc9f48..222e7784 100644 --- a/libs/stripe-php/lib/Util/EventNotificationTypes.php +++ b/libs/stripe-php/lib/Util/EventNotificationTypes.php @@ -8,6 +8,10 @@ class EventNotificationTypes // The beginning of the section generated from our OpenAPI spec \Stripe\Events\V1BillingMeterErrorReportTriggeredEventNotification::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterErrorReportTriggeredEventNotification::class, \Stripe\Events\V1BillingMeterNoMeterFoundEventNotification::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterNoMeterFoundEventNotification::class, + \Stripe\Events\V2CommerceProductCatalogImportsFailedEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsFailedEventNotification::class, + \Stripe\Events\V2CommerceProductCatalogImportsProcessingEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsProcessingEventNotification::class, + \Stripe\Events\V2CommerceProductCatalogImportsSucceededEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsSucceededEventNotification::class, + \Stripe\Events\V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification::class, \Stripe\Events\V2CoreAccountClosedEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountClosedEventNotification::class, \Stripe\Events\V2CoreAccountCreatedEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountCreatedEventNotification::class, \Stripe\Events\V2CoreAccountUpdatedEventNotification::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountUpdatedEventNotification::class, diff --git a/libs/stripe-php/lib/Util/EventTypes.php b/libs/stripe-php/lib/Util/EventTypes.php index 1e26a910..7ac9a5d6 100644 --- a/libs/stripe-php/lib/Util/EventTypes.php +++ b/libs/stripe-php/lib/Util/EventTypes.php @@ -8,6 +8,10 @@ class EventTypes // The beginning of the section generated from our OpenAPI spec \Stripe\Events\V1BillingMeterErrorReportTriggeredEvent::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterErrorReportTriggeredEvent::class, \Stripe\Events\V1BillingMeterNoMeterFoundEvent::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterNoMeterFoundEvent::class, + \Stripe\Events\V2CommerceProductCatalogImportsFailedEvent::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsFailedEvent::class, + \Stripe\Events\V2CommerceProductCatalogImportsProcessingEvent::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsProcessingEvent::class, + \Stripe\Events\V2CommerceProductCatalogImportsSucceededEvent::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsSucceededEvent::class, + \Stripe\Events\V2CommerceProductCatalogImportsSucceededWithErrorsEvent::LOOKUP_TYPE => \Stripe\Events\V2CommerceProductCatalogImportsSucceededWithErrorsEvent::class, \Stripe\Events\V2CoreAccountClosedEvent::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountClosedEvent::class, \Stripe\Events\V2CoreAccountCreatedEvent::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountCreatedEvent::class, \Stripe\Events\V2CoreAccountUpdatedEvent::LOOKUP_TYPE => \Stripe\Events\V2CoreAccountUpdatedEvent::class, diff --git a/libs/stripe-php/lib/Util/Int64.php b/libs/stripe-php/lib/Util/Int64.php new file mode 100644 index 00000000..ff2bccbc --- /dev/null +++ b/libs/stripe-php/lib/Util/Int64.php @@ -0,0 +1,128 @@ + 'object', 'fields' => ['amount' => ['kind' => 'int64_string']]] + * + * @return mixed + */ + public static function coerceRequestParams($params, $schema) + { + if (null === $params) { + return null; + } + + if (!isset($schema['kind'])) { + return $params; + } + + if ('int64_string' === $schema['kind']) { + if (\is_int($params)) { + return (string) $params; + } + + return $params; + } + + if ('array' === $schema['kind'] && isset($schema['items'])) { + if (\is_array($params)) { + $result = []; + foreach ($params as $key => $value) { + $result[$key] = self::coerceRequestParams($value, $schema['items']); + } + + return $result; + } + + return $params; + } + + if ('object' === $schema['kind'] && isset($schema['fields'])) { + if (\is_array($params)) { + $result = $params; + foreach ($schema['fields'] as $field => $fieldSchema) { + if (\array_key_exists($field, $result)) { + $result[$field] = self::coerceRequestParams($result[$field], $fieldSchema); + } + } + + return $result; + } + + return $params; + } + + return $params; + } + + /** + * Coerce inbound response values: convert JSON strings to PHP ints where + * the field encodings indicate an int64_string field. + * + * @param mixed $values + * @param array $encodings e.g. ['amount' => ['kind' => 'int64_string'], 'nested' => ['kind' => 'object', 'fields' => [...]]] + * + * @return mixed + */ + public static function coerceResponseValues($values, $encodings) + { + if (!\is_array($values)) { + return $values; + } + + foreach ($encodings as $field => $encoding) { + if (!\array_key_exists($field, $values)) { + continue; + } + + $value = $values[$field]; + + if (!isset($encoding['kind'])) { + continue; + } + + if ('int64_string' === $encoding['kind']) { + if (\is_string($value) && \is_numeric($value)) { + $values[$field] = (int) $value; + } + } elseif ('array' === $encoding['kind'] && isset($encoding['items'])) { + if (\is_array($value)) { + foreach ($value as $i => $item) { + if (!isset($encoding['items']['kind'])) { + continue; + } + + if ('int64_string' === $encoding['items']['kind']) { + if (\is_string($item) && \is_numeric($item)) { + $values[$field][$i] = (int) $item; + } + } elseif ('object' === $encoding['items']['kind'] && isset($encoding['items']['fields'])) { + if (\is_array($item)) { + $values[$field][$i] = self::coerceResponseValues($item, $encoding['items']['fields']); + } + } + } + } + } elseif ('object' === $encoding['kind'] && isset($encoding['fields'])) { + if (\is_array($value)) { + $values[$field] = self::coerceResponseValues($value, $encoding['fields']); + } + } + } + + return $values; + } +} diff --git a/libs/stripe-php/lib/Util/ObjectTypes.php b/libs/stripe-php/lib/Util/ObjectTypes.php index 4935fb3d..63b0bade 100644 --- a/libs/stripe-php/lib/Util/ObjectTypes.php +++ b/libs/stripe-php/lib/Util/ObjectTypes.php @@ -172,6 +172,7 @@ class ObjectTypes \Stripe\V2\Billing\MeterEvent::OBJECT_NAME => \Stripe\V2\Billing\MeterEvent::class, \Stripe\V2\Billing\MeterEventAdjustment::OBJECT_NAME => \Stripe\V2\Billing\MeterEventAdjustment::class, \Stripe\V2\Billing\MeterEventSession::OBJECT_NAME => \Stripe\V2\Billing\MeterEventSession::class, + \Stripe\V2\Commerce\ProductCatalogImport::OBJECT_NAME => \Stripe\V2\Commerce\ProductCatalogImport::class, \Stripe\V2\Core\Account::OBJECT_NAME => \Stripe\V2\Core\Account::class, \Stripe\V2\Core\AccountLink::OBJECT_NAME => \Stripe\V2\Core\AccountLink::class, \Stripe\V2\Core\AccountPerson::OBJECT_NAME => \Stripe\V2\Core\AccountPerson::class, diff --git a/libs/stripe-php/lib/Util/Util.php b/libs/stripe-php/lib/Util/Util.php index 96f92a61..2388b92e 100644 --- a/libs/stripe-php/lib/Util/Util.php +++ b/libs/stripe-php/lib/Util/Util.php @@ -154,11 +154,17 @@ abstract class Util * ApiResource, then it is replaced by the resource's ID. * Also clears out null values. * + * When $serializeNull is true (used for V2 POST request + * bodies), null values in associative arrays are preserved instead of + * stripped. This is necessary because V2 JSON bodies use explicit null + * to signal "delete this field / metadata key". + * * @param mixed $h + * @param bool $serializeNull when true, preserve null values instead of stripping them * * @return mixed */ - public static function objectsToIds($h) + public static function objectsToIds($h, $serializeNull) { if ($h instanceof \Stripe\ApiResource) { return $h->id; @@ -166,7 +172,7 @@ abstract class Util if (static::isList($h)) { $results = []; foreach ($h as $v) { - $results[] = static::objectsToIds($v); + $results[] = static::objectsToIds($v, $serializeNull); } return $results; @@ -175,9 +181,21 @@ abstract class Util $results = []; foreach ($h as $k => $v) { if (null === $v) { + if ($serializeNull) { + $results[$k] = null; + } + continue; } - $results[$k] = static::objectsToIds($v); + $results[$k] = static::objectsToIds($v, $serializeNull); + } + + // If the input was an associative array with string keys but + // all values were stripped, $results is an empty indexed array. + // PHP's json_encode would render that as [] (JSON array) instead + // of {} (JSON object). Cast to object to preserve the type. + if (empty($results) && !empty($h)) { + return (object) $results; } return $results; @@ -256,12 +274,12 @@ abstract class Util if (self::isList($elem)) { $result = \array_merge( $result, - self::flattenParamsList($elem, $calculatedKey) + self::flattenParamsList($elem, "{$calculatedKey}[{$i}]", $apiMode) ); } elseif (\is_array($elem)) { $result = \array_merge( $result, - self::flattenParams($elem, "{$calculatedKey}[{$i}]") + self::flattenParams($elem, "{$calculatedKey}[{$i}]", $apiMode) ); } else { // Always use indexed format for arrays diff --git a/libs/stripe-php/lib/V2/Billing/MeterEventAdjustment.php b/libs/stripe-php/lib/V2/Billing/MeterEventAdjustment.php index f5bfd362..fd473e28 100644 --- a/libs/stripe-php/lib/V2/Billing/MeterEventAdjustment.php +++ b/libs/stripe-php/lib/V2/Billing/MeterEventAdjustment.php @@ -7,14 +7,14 @@ namespace Stripe\V2\Billing; /** * A Meter Event Adjustment is used to cancel or modify previously recorded meter events. Meter Event Adjustments allow you to correct billing data by canceling individual events or event ranges, with tracking of adjustment status and creation time. * - * @property string $id The unique id of this meter event adjustment. + * @property string $id The unique ID of this meter event adjustment. * @property string $object String representing the object's type. Objects of the same type share the same value of the object field. * @property (object{identifier: string}&\Stripe\StripeObject) $cancel Specifies which event to cancel. * @property int $created The time the adjustment was created. * @property string $event_name The name of the meter event. Corresponds with the event_name field on a meter. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property string $status Open Enum. The meter event adjustment’s status. - * @property string $type Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + * @property string $type Open Enum. Specifies the type of cancellation. Currently supports canceling a single event. */ class MeterEventAdjustment extends \Stripe\ApiResource { diff --git a/libs/stripe-php/lib/V2/Billing/MeterEventSession.php b/libs/stripe-php/lib/V2/Billing/MeterEventSession.php index e81585e6..4b865f46 100644 --- a/libs/stripe-php/lib/V2/Billing/MeterEventSession.php +++ b/libs/stripe-php/lib/V2/Billing/MeterEventSession.php @@ -7,11 +7,11 @@ namespace Stripe\V2\Billing; /** * A Meter Event Session is an authentication session for the high-throughput meter event API. Meter Event Sessions provide temporary authentication tokens with expiration times, enabling secure and efficient bulk submission of usage events. * - * @property string $id The unique id of this auth session. + * @property string $id The unique ID of this auth session. * @property string $object String representing the object's type. Objects of the same type share the same value of the object field. - * @property string $authentication_token The authentication token for this session. Use this token when calling the high-throughput meter event API. + * @property string $authentication_token The authentication token for this session. Use this token when calling the high-throughput meter event API. * @property int $created The creation time of this session. - * @property int $expires_at The time at which this session will expire. + * @property int $expires_at The time at which this session expires. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. */ class MeterEventSession extends \Stripe\ApiResource diff --git a/libs/stripe-php/lib/V2/Commerce/ProductCatalogImport.php b/libs/stripe-php/lib/V2/Commerce/ProductCatalogImport.php new file mode 100644 index 00000000..e2a6b82a --- /dev/null +++ b/libs/stripe-php/lib/V2/Commerce/ProductCatalogImport.php @@ -0,0 +1,83 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Additional information about the object in a structured format. + * @property string $mode The import strategy for handling existing catalog data. + * @property string $status The current status of this ProductCatalogImport. + * @property null|(object{awaiting_upload?: (object{upload_url: (object{expires_at: int, url: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), failed?: (object{code: string, failure_message: string, type: string}&\Stripe\StripeObject), processing?: (object{error_count: int, success_count: int}&\Stripe\StripeObject), succeeded?: (object{success_count: int}&\Stripe\StripeObject), succeeded_with_errors?: (object{error_count: int, error_file: (object{content_type: string, download_url: (object{expires_at: int, url: string}&\Stripe\StripeObject), size: int}&\Stripe\StripeObject), samples: (object{error_message: string, field: string, id: string, row: int}&\Stripe\StripeObject)[], success_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Details about the current import status. + */ +class ProductCatalogImport extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'v2.commerce.product_catalog_import'; + + public static function fieldEncodings() + { + return [ + 'status_details' => [ + 'kind' => 'object', + 'fields' => [ + 'processing' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'success_count' => ['kind' => 'int64_string'], + ], + ], + 'succeeded' => [ + 'kind' => 'object', + 'fields' => [ + 'success_count' => ['kind' => 'int64_string'], + ], + ], + 'succeeded_with_errors' => [ + 'kind' => 'object', + 'fields' => [ + 'error_count' => ['kind' => 'int64_string'], + 'error_file' => [ + 'kind' => 'object', + 'fields' => [ + 'size' => ['kind' => 'int64_string'], + ], + ], + 'samples' => [ + 'kind' => 'array', + 'element' => [ + 'kind' => 'object', + 'fields' => [ + 'row' => ['kind' => 'int64_string'], + ], + ], + ], + 'success_count' => ['kind' => 'int64_string'], + ], + ], + ], + ], + ]; + } + + const FEED_TYPE_INVENTORY = 'inventory'; + const FEED_TYPE_PRICING = 'pricing'; + const FEED_TYPE_PRODUCT = 'product'; + const FEED_TYPE_PROMOTION = 'promotion'; + + const MODE_REPLACE = 'replace'; + const MODE_UPSERT = 'upsert'; + + const STATUS_AWAITING_UPLOAD = 'awaiting_upload'; + const STATUS_FAILED = 'failed'; + const STATUS_PROCESSING = 'processing'; + const STATUS_SUCCEEDED = 'succeeded'; + const STATUS_SUCCEEDED_WITH_ERRORS = 'succeeded_with_errors'; +} diff --git a/libs/stripe-php/lib/V2/Core/Account.php b/libs/stripe-php/lib/V2/Core/Account.php index 57fc0f53..84c5658e 100644 --- a/libs/stripe-php/lib/V2/Core/Account.php +++ b/libs/stripe-php/lib/V2/Core/Account.php @@ -5,23 +5,22 @@ namespace Stripe\V2\Core; /** - * An Account v2 object represents a company, individual, or other entity that interacts with a platform on Stripe. It contains both identifying information and properties that control its behavior and functionality. An Account can have one or more configurations that enable sets of related features, such as allowing it to act as a merchant or customer. - * The Accounts v2 API supports both the Global Payouts preview feature and the Connect-Billing integration preview feature. However, a particular Account can only access one of them. - * The Connect-Billing integration preview feature allows an Account v2 to pay subscription fees to a platform. An Account v1 required a separate Customer object to pay subscription fees. + * An Account v2 object represents a company, individual, or other entity that your Stripe integration interacts with. It contains both identifying information and properties that control its behavior and functionality. An Account can have one or more configurations that enable sets of related features, such as allowing it to act as a merchant or customer. + * The Accounts v2 API is broadly available to Connect platforms, and to other users in preview. The Accounts v2 API also supports the Global Payouts preview feature. * * @property string $id Unique identifier for the Account. * @property string $object String representing the object's type. Objects of the same type share the same value of the object field. * @property string[] $applied_configurations The configurations that have been applied to this account. * @property null|bool $closed Indicates whether the account has been closed. - * @property null|(object{customer?: (object{applied: bool, automatic_indirect_tax?: (object{exempt?: string, ip_address?: string, location?: (object{country?: string, state?: string}&\Stripe\StripeObject), location_source?: string}&\Stripe\StripeObject), billing?: (object{default_payment_method?: string, invoice?: (object{custom_fields: (object{name: string, value: string}&\Stripe\StripeObject)[], footer?: string, next_sequence?: int, prefix?: string, rendering?: (object{amount_tax_display?: string, template?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), capabilities?: (object{automatic_indirect_tax?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), shipping?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&\Stripe\StripeObject), name?: string, phone?: string}&\Stripe\StripeObject), test_clock?: string}&\Stripe\StripeObject), merchant?: (object{applied: bool, bacs_debit_payments?: (object{display_name?: string, service_user_number?: string}&\Stripe\StripeObject), branding?: (object{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}&\Stripe\StripeObject), capabilities?: (object{ach_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), acss_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), affirm_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), afterpay_clearpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), alma_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), amazon_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), au_becs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bacs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bancontact_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), blik_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), boleto_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cartes_bancaires_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cashapp_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eps_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), fpx_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gb_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), grabpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), ideal_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jcb_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jp_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kakao_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), klarna_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), konbini_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kr_card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), link_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mobilepay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), multibanco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mx_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), naver_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), oxxo_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), p24_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), pay_by_bank_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), payco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), paynow_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), promptpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), revolut_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), samsung_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), swish_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), twint_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), us_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), zip_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_payments?: (object{decline_on?: (object{avs_failure?: bool, cvc_failure?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini_payments?: (object{support?: (object{email?: string, hours?: (object{end_time?: string, start_time?: string}&\Stripe\StripeObject), phone?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), mcc?: string, script_statement_descriptor?: (object{kana?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), kanji?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), sepa_debit_payments?: (object{creditor_id?: string}&\Stripe\StripeObject), statement_descriptor?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), support?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), email?: string, phone?: string, url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), recipient?: (object{applied: bool, capabilities?: (object{stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_transfers?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $configuration An Account represents a company, individual, or other entity that a user interacts with. Accounts store identity information and one or more configurations that enable product-specific capabilities. You can assign configurations at creation or add them later. - * @property null|string $contact_email The default contact email address for the Account. Required when configuring the account as a merchant or recipient. + * @property null|(object{customer?: (object{applied: bool, automatic_indirect_tax?: (object{exempt?: string, ip_address?: string, location?: (object{country?: string, state?: string}&\Stripe\StripeObject), location_source?: string}&\Stripe\StripeObject), billing?: (object{default_payment_method?: string, invoice?: (object{custom_fields: (object{name: string, value: string}&\Stripe\StripeObject)[], footer?: string, next_sequence?: int, prefix?: string, rendering?: (object{amount_tax_display?: string, template?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), capabilities?: (object{automatic_indirect_tax?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), shipping?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&\Stripe\StripeObject), name?: string, phone?: string}&\Stripe\StripeObject), test_clock?: string}&\Stripe\StripeObject), merchant?: (object{applied: bool, bacs_debit_payments?: (object{display_name?: string, service_user_number?: string}&\Stripe\StripeObject), branding?: (object{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}&\Stripe\StripeObject), capabilities?: (object{ach_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), acss_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), affirm_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), afterpay_clearpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), alma_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), amazon_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), au_becs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bacs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bancontact_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), blik_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), boleto_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cartes_bancaires_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cashapp_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eps_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), fpx_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gb_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), grabpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), ideal_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jcb_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jp_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kakao_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), klarna_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), konbini_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kr_card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), link_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mobilepay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), multibanco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mx_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), naver_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), oxxo_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), p24_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), pay_by_bank_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), payco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), paynow_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), promptpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), revolut_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), samsung_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), sunbit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), swish_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), twint_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), us_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), zip_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_payments?: (object{decline_on?: (object{avs_failure?: bool, cvc_failure?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini_payments?: (object{support?: (object{email?: string, hours?: (object{end_time?: string, start_time?: string}&\Stripe\StripeObject), phone?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), mcc?: string, script_statement_descriptor?: (object{kana?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), kanji?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), sepa_debit_payments?: (object{creditor_id?: string}&\Stripe\StripeObject), statement_descriptor?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), support?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), email?: string, phone?: string, url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), recipient?: (object{applied: bool, capabilities?: (object{stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_transfers?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $configuration An Account represents a company, individual, or other entity that a user interacts with. Accounts store identity information and one or more configurations that enable product-specific capabilities. You can assign configurations at creation or add them later. + * @property null|string $contact_email The primary contact email address for the Account. * @property null|string $contact_phone The default contact phone for the Account. * @property int $created Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. * @property null|string $dashboard A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. * @property null|(object{currency?: string, locales?: string[], profile?: (object{business_url?: string, doing_business_as?: string, product_description?: string}&\Stripe\StripeObject), responsibilities: (object{fees_collector?: string, losses_collector?: string, requirements_collector: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $defaults Default values for settings shared across Account configurations. * @property null|string $display_name A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. * @property null|(object{entries?: (object{awaiting_action_from: string, description: string, errors: (object{code: string, description: string}&\Stripe\StripeObject)[], impact: (object{restricts_capabilities?: (object{capability: string, configuration: string, deadline: (object{status: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), minimum_deadline: (object{status: string}&\Stripe\StripeObject), reference?: (object{inquiry?: string, resource?: string, type: string}&\Stripe\StripeObject), requested_reasons: (object{code: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)[], minimum_transition_date?: int, summary?: (object{minimum_deadline?: (object{status: string, time?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $future_requirements Information about the future requirements for the Account that will eventually come into effect, including what information needs to be collected, and by when. - * @property null|(object{attestations?: (object{directorship_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), ownership_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), persons_provided?: (object{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}&\Stripe\StripeObject), representative_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), business_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), annual_revenue?: (object{amount?: (object{value?: int, currency?: string}&\Stripe\StripeObject), fiscal_year_end?: string}&\Stripe\StripeObject), documents?: (object{bank_account_ownership_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_license?: (object{files: string[], type: string}&\Stripe\StripeObject), company_memorandum_of_association?: (object{files: string[], type: string}&\Stripe\StripeObject), company_ministerial_decree?: (object{files: string[], type: string}&\Stripe\StripeObject), company_registration_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_tax_id_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_address?: (object{files: string[], type: string}&\Stripe\StripeObject), proof_of_registration?: (object{files: string[], type: string}&\Stripe\StripeObject), proof_of_ultimate_beneficial_ownership?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), estimated_worker_count?: int, id_numbers?: (object{registrar?: string, type: string}&\Stripe\StripeObject)[], monthly_estimated_revenue?: (object{amount?: (object{value?: int, currency?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), phone?: string, registered_name?: string, registration_date?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{registered_name?: string}&\Stripe\StripeObject), kanji?: (object{registered_name?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), structure?: string}&\Stripe\StripeObject), country?: string, entity_type?: string, individual?: (object{account: string, additional_addresses?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}&\Stripe\StripeObject)[], additional_names?: (object{full_name?: string, given_name?: string, purpose: string, surname?: string}&\Stripe\StripeObject)[], additional_terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), created: int, date_of_birth?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), documents?: (object{company_authorization?: (object{files: string[], type: string}&\Stripe\StripeObject), passport?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), secondary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), visa?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), email?: string, given_name?: string, id: string, id_numbers?: (object{type: string}&\Stripe\StripeObject)[], legal_gender?: string, metadata?: \Stripe\StripeObject, nationalities?: string[], object: string, phone?: string, political_exposure?: string, relationship?: (object{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject), kanji?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), surname?: string, updated: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $identity Information about the company, individual, and business represented by the Account. + * @property null|(object{attestations?: (object{directorship_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), ownership_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), persons_provided?: (object{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}&\Stripe\StripeObject), representative_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), business_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), annual_revenue?: (object{amount?: \Stripe\StripeObject, fiscal_year_end?: string}&\Stripe\StripeObject), documents?: (object{bank_account_ownership_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_license?: (object{files: string[], type: string}&\Stripe\StripeObject), company_memorandum_of_association?: (object{files: string[], type: string}&\Stripe\StripeObject), company_ministerial_decree?: (object{files: string[], type: string}&\Stripe\StripeObject), company_registration_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_tax_id_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_address?: (object{files: string[], type: string}&\Stripe\StripeObject), proof_of_registration?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_ultimate_beneficial_ownership?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), estimated_worker_count?: int, id_numbers?: (object{registrar?: string, type: string}&\Stripe\StripeObject)[], monthly_estimated_revenue?: (object{amount?: \Stripe\StripeObject}&\Stripe\StripeObject), phone?: string, registered_name?: string, registration_date?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{registered_name?: string}&\Stripe\StripeObject), kanji?: (object{registered_name?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), structure?: string}&\Stripe\StripeObject), country?: string, entity_type?: string, individual?: (object{account: string, additional_addresses?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}&\Stripe\StripeObject)[], additional_names?: (object{full_name?: string, given_name?: string, purpose: string, surname?: string}&\Stripe\StripeObject)[], additional_terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), created: int, date_of_birth?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), documents?: (object{company_authorization?: (object{files: string[], type: string}&\Stripe\StripeObject), passport?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), secondary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), visa?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), email?: string, given_name?: string, id: string, id_numbers?: (object{type: string}&\Stripe\StripeObject)[], legal_gender?: string, metadata?: \Stripe\StripeObject, nationalities?: string[], object: string, phone?: string, political_exposure?: string, relationship?: (object{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject), kanji?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), surname?: string, updated: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $identity Information about the company, individual, and business represented by the Account. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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{entries?: (object{awaiting_action_from: string, description: string, errors: (object{code: string, description: string}&\Stripe\StripeObject)[], impact: (object{restricts_capabilities?: (object{capability: string, configuration: string, deadline: (object{status: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), minimum_deadline: (object{status: string}&\Stripe\StripeObject), reference?: (object{inquiry?: string, resource?: string, type: string}&\Stripe\StripeObject), requested_reasons: (object{code: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)[], summary?: (object{minimum_deadline?: (object{status: string, time?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $requirements Information about the active requirements for the Account, including what information needs to be collected, and by when. @@ -30,6 +29,30 @@ class Account extends \Stripe\ApiResource { const OBJECT_NAME = 'v2.core.account'; + public static function fieldEncodings() + { + return [ + 'identity' => [ + 'kind' => 'object', + 'fields' => [ + 'individual' => [ + 'kind' => 'object', + 'fields' => [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => [ + 'kind' => 'decimal_string', + ], + ], + ], + ], + ], + ], + ], + ]; + } + const DASHBOARD_EXPRESS = 'express'; const DASHBOARD_FULL = 'full'; const DASHBOARD_NONE = 'none'; diff --git a/libs/stripe-php/lib/V2/Core/AccountLink.php b/libs/stripe-php/lib/V2/Core/AccountLink.php index 4ed024ba..d70451e0 100644 --- a/libs/stripe-php/lib/V2/Core/AccountLink.php +++ b/libs/stripe-php/lib/V2/Core/AccountLink.php @@ -13,7 +13,7 @@ namespace Stripe\V2\Core; * @property int $expires_at The timestamp at which this Account Link will expire. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property string $url The URL at which the account can access the Stripe-hosted flow. - * @property (object{type: string, account_onboarding?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), account_update?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $use_case Hash containing usage options. + * @property (object{account_onboarding?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), account_update?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $use_case Hash containing usage options. */ class AccountLink extends \Stripe\ApiResource { diff --git a/libs/stripe-php/lib/V2/Core/AccountPerson.php b/libs/stripe-php/lib/V2/Core/AccountPerson.php index 0afc0a5b..b0f4e398 100644 --- a/libs/stripe-php/lib/V2/Core/AccountPerson.php +++ b/libs/stripe-php/lib/V2/Core/AccountPerson.php @@ -36,6 +36,18 @@ class AccountPerson extends \Stripe\ApiResource { const OBJECT_NAME = 'v2.core.account_person'; + public static function fieldEncodings() + { + return [ + 'relationship' => [ + 'kind' => 'object', + 'fields' => [ + 'percent_ownership' => ['kind' => 'decimal_string'], + ], + ], + ]; + } + const LEGAL_GENDER_FEMALE = 'female'; const LEGAL_GENDER_MALE = 'male'; diff --git a/libs/stripe-php/lib/V2/Core/AccountToken.php b/libs/stripe-php/lib/V2/Core/AccountToken.php index d6c6419a..0e17e63e 100644 --- a/libs/stripe-php/lib/V2/Core/AccountToken.php +++ b/libs/stripe-php/lib/V2/Core/AccountToken.php @@ -5,7 +5,7 @@ namespace Stripe\V2\Core; /** - * Account tokens are single-use tokens which tokenize company/individual/business information, and are used for creating or updating an Account. + * Account tokens are single-use tokens which tokenize an account's contact_email, display_name, contact_phone, and identity. * * @property string $id Unique identifier for the token. * @property string $object String representing the object's type. Objects of the same type share the same value of the object field. diff --git a/libs/stripe-php/lib/V2/Core/EventDestination.php b/libs/stripe-php/lib/V2/Core/EventDestination.php index b6b5b250..9aa106f2 100644 --- a/libs/stripe-php/lib/V2/Core/EventDestination.php +++ b/libs/stripe-php/lib/V2/Core/EventDestination.php @@ -10,11 +10,12 @@ namespace Stripe\V2\Core; * @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 of the object field. * @property null|(object{aws_account_id: string, aws_event_source_arn: string, aws_event_source_status: string}&\Stripe\StripeObject) $amazon_eventbridge Amazon EventBridge configuration. + * @property null|(object{azure_partner_topic_name: string, azure_partner_topic_status: string, azure_region: string, azure_resource_group_name: string, azure_subscription_id: string}&\Stripe\StripeObject) $azure_event_grid Azure Event Grid configuration. * @property int $created Time at which the object was created. * @property string $description An optional description of what the event destination is used for. * @property string[] $enabled_events The list of events to enable for this endpoint. * @property string $event_payload Payload type of events being subscribed to. - * @property null|string[] $events_from Where events should be routed from. + * @property null|string[] $events_from Specifies which accounts' events route to this destination. @self: Receive events from the account that owns the event destination. @accounts: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. @organization_members: Receive events from accounts directly linked to the organization. @organization_members/@accounts: Receive events from all accounts connected to any platform accounts in the organization. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|\Stripe\StripeObject $metadata Metadata. * @property string $name Event destination name. @@ -36,5 +37,6 @@ class EventDestination extends \Stripe\ApiResource const STATUS_ENABLED = 'enabled'; const TYPE_AMAZON_EVENTBRIDGE = 'amazon_eventbridge'; + const TYPE_AZURE_EVENT_GRID = 'azure_event_grid'; const TYPE_WEBHOOK_ENDPOINT = 'webhook_endpoint'; } diff --git a/libs/stripe-php/lib/V2/Core/EventNotification.php b/libs/stripe-php/lib/V2/Core/EventNotification.php index 35bc921a..e285f9d3 100644 --- a/libs/stripe-php/lib/V2/Core/EventNotification.php +++ b/libs/stripe-php/lib/V2/Core/EventNotification.php @@ -65,7 +65,7 @@ abstract class EventNotification /** * Helper for constructing an Event Notification. Doesn't perform signature validation, so you - * should use \Stripe\BaseStripeClient#parseEventNotification instead for + * should use \Stripe\BaseStripeClient::parseEventNotification instead for * initial handling. This is useful in unit tests and working with EventNotifications that you've * already validated the authenticity of. * @@ -78,6 +78,12 @@ abstract class EventNotification { $json = json_decode($jsonStr, true); + if (isset($json['object']) && 'event' === $json['object']) { + throw new \Stripe\Exception\UnexpectedValueException( + 'You passed a webhook payload to StripeClient::parseEventNotification, which expects an event notification. Use Webhook::constructEvent instead.' + ); + } + $class = UnknownEventNotification::class; $eventNotificationTypes = EventNotificationTypes::v2EventMapping; if (\array_key_exists($json['type'], $eventNotificationTypes)) { diff --git a/libs/stripe-php/lib/Webhook.php b/libs/stripe-php/lib/Webhook.php index 6f4e9c3c..1a7dbc2c 100644 --- a/libs/stripe-php/lib/Webhook.php +++ b/libs/stripe-php/lib/Webhook.php @@ -32,11 +32,17 @@ abstract class Webhook $jsonError = \json_last_error(); if (null === $data && \JSON_ERROR_NONE !== $jsonError) { $msg = "Invalid payload: {$payload} " - . "(json_last_error() was {$jsonError})"; + . "(json_last_error() was {$jsonError})"; throw new Exception\UnexpectedValueException($msg); } + if (isset($data['object']) && 'v2.core.event' === $data['object']) { + throw new Exception\UnexpectedValueException( + 'You passed an event notification to Webhook::constructEvent, which expects a webhook payload. Use StripeClient::parseEventNotification instead.' + ); + } + return Event::constructFrom($data); } } diff --git a/libs/stripe-php/lib/WebhookEndpoint.php b/libs/stripe-php/lib/WebhookEndpoint.php index 70753a6c..d2f6685b 100644 --- a/libs/stripe-php/lib/WebhookEndpoint.php +++ b/libs/stripe-php/lib/WebhookEndpoint.php @@ -20,7 +20,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $description An optional description of what the webhook is used for. * @property string[] $enabled_events The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection. - * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false. * @property StripeObject $metadata Set of key-value pairs 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 $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation. * @property string $status The status of the webhook. It can be enabled or disabled. diff --git a/libs/stripe-php/lib/version_check.php b/libs/stripe-php/lib/version_check.php new file mode 100644 index 00000000..a253e2d9 --- /dev/null +++ b/libs/stripe-php/lib/version_check.php @@ -0,0 +1,9 @@ + 0 ? end($database_updates_applied) : $old_db_version; + fwrite(STDERR, "Error: database update failed at $database_updates_error\n"); + fwrite(STDERR, "The database is at version $stopped_at_version - re-running will resume at the failed update.\n"); + exit(1); + } + + if (count($database_updates_applied) > 0) { + echo "Database updated from version $old_db_version to $latest_db_version.\n"; } else { echo "Database is already at the latest version ($latest_db_version). No updates were applied.\n"; } -} \ No newline at end of file +}